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: gate target-cpu=native with portable feature #4489

Merged
merged 2 commits into from Mar 6, 2024

Conversation

obycode
Copy link
Contributor

@obycode obycode commented Mar 5, 2024

We believe this flag can cause some problems with docker images.

We believe this can cause some problems with docker images.
Copy link
Member

@CharlieC3 CharlieC3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this Brice!

Related PR: #4460

The PR linked above explicitly defines the CPU target when an image is being built via GHA. But when this Docker image is being built locally (which I've had to do numerous times) intended for cloud deployments, it'll be helpful to have this feature flag in place to ensure the image is being built the same way it's always been, which has been compatible with most cloud infra.

I would suggest getting @wileyj's approval in this before merging as well.

@CharlieC3 CharlieC3 requested a review from wileyj March 5, 2024 21:43
@obycode
Copy link
Contributor Author

obycode commented Mar 5, 2024

So maybe it would be good to have that "portable" feature enabled conditionally, with an environment variable for example?

@CharlieC3
Copy link
Member

So maybe it would be good to have that "portable" feature enabled conditionally, with an environment variable for example?

@obycode I actually like the way you have it right now. In the scenario I painted above when I need to build the image locally, I use the .github/actions/dockerfiles/Dockerfile.debian-source Dockerfile. So this PR effectively helps my specific workflow while leaving the others untouched.
So if a dev wants to build from source, unless they're using the .github/actions/dockerfiles/Dockerfile.debian-source, it would still build using the native CPU target. If there's an ENV var required, I feel it's another manual step I may forget.

@obycode
Copy link
Contributor Author

obycode commented Mar 5, 2024

@obycode I actually like the way you have it right now. In the scenario I painted above when I need to build the image locally, I use the .github/actions/dockerfiles/Dockerfile.debian-source Dockerfile. So this PR effectively helps my specific workflow while leaving the others untouched. So if a dev wants to build from source, unless they're using the .github/actions/dockerfiles/Dockerfile.debian-source, it would still build using the native CPU target. If there's an ENV var required, I feel it's another manual step I may forget.

Ah, got it. Thanks for clarifying!

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.28%. Comparing base (bf5a833) to head (e971d94).
Report is 20 commits behind head on next.

Additional details and impacted files
@@             Coverage Diff             @@
##             next    #4489       +/-   ##
===========================================
- Coverage   83.17%   55.28%   -27.90%     
===========================================
  Files         451      451               
  Lines      324497   324497               
  Branches      318      318               
===========================================
- Hits       269916   179409    -90507     
- Misses      54573   145080    +90507     
  Partials        8        8               

see 327 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf5a833...e971d94. Read the comment docs.

@zone117x zone117x enabled auto-merge March 6, 2024 14:01
@zone117x zone117x added this pull request to the merge queue Mar 6, 2024
Merged via the queue into next with commit 04e5eb2 Mar 6, 2024
1 of 2 checks passed
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.

None yet

3 participants