Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add exposed_ports to oci_image #404

Merged
merged 2 commits into from
Nov 21, 2023
Merged

Conversation

gzm0
Copy link
Contributor

@gzm0 gzm0 commented Oct 25, 2023

Fixes #220.

@gzm0 gzm0 changed the title Fix #220: Add exposed_ports to oci_image fix #220: Add exposed_ports to oci_image Oct 25, 2023
@gzm0 gzm0 changed the title fix #220: Add exposed_ports to oci_image feat: add exposed_ports to oci_image Oct 25, 2023
@gzm0
Copy link
Contributor Author

gzm0 commented Oct 31, 2023

Seems this fails with bazelmod. I'm investigating.

@gzm0
Copy link
Contributor Author

gzm0 commented Oct 31, 2023

Seems like under bzlmod, we're not using LATEST_CRANE_VERSION:

oci.toolchains(crane_version = "v0.14.0")

Is this deliberate?

@gzm0
Copy link
Contributor Author

gzm0 commented Oct 31, 2023

I have bumped the crane version in the MODULE.bazel of the e2e test. The test passes locally. Let's see what CI says.

If you are concerned with the test not testing with the lowest supported crane version anymore, I'm happy to split it out.

This is a separate discussion, but I find the choice of toolchain version management under bzlmod odd: I'd expect that by default, I'd get the latest known versions (but the ability to downgrade the versions if necessary).

@trym-b
Copy link

trym-b commented Nov 14, 2023

Thank you for adding this feature.

Is there anything blocking this PR?
I would like to get my hands on this feature as I have some container images that I need to convert to bazel that require exposing some ports (more specifically this).

@thesayyn
Copy link
Collaborator

We'll unblock this shortly this week. We need to upgrade the crane version which is an undocumented public API contract we never intended to expose. We'll have to document it and tell users to register their own toolchains if they rely on a specific version of crane.

@thesayyn thesayyn merged commit 612e472 into bazel-contrib:main Nov 21, 2023
16 checks passed
@salrashid123
Copy link

I don't think this in included in the latest 1.4.3 release but its cited in the docs as supported already.

When is the next release going out?

@gzm0 gzm0 deleted the exposed-ports branch December 12, 2023 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oci_image should allow setting ports
4 participants