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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: s2i builder env var interpolation #991

Merged
merged 2 commits into from
Apr 25, 2022

Conversation

lkingland
Copy link
Member

@lkingland lkingland commented Apr 25, 2022

  • 馃巵 S2I Builder Env Interpolation

More specifically:

  • Extracts env var interpolation logic from buildpack builder to shared package static fn.Interpolate
  • Refactors implementation slightly to pass-through unmatched values (previously a bit ambiguous, presuming permissive).
  • Adds interpolation tests, including explicit tests for asserting both unmatched strings pass through and nil value pointers indicate env var should be omitted from the final interpolated map.
  • Integrates interpolated build envs into S2I builder.

/kind enhancement

Fixes #990

@knative-prow knative-prow bot added kind/enhancement size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 25, 2022
@knative-prow
Copy link

knative-prow bot commented Apr 25, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lkingland

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 25, 2022
@codecov
Copy link

codecov bot commented Apr 25, 2022

Codecov Report

Merging #991 (b4baba7) into main (ce26a23) will increase coverage by 0.08%.
The diff coverage is 63.15%.

@@            Coverage Diff             @@
##             main     #991      +/-   ##
==========================================
+ Coverage   46.05%   46.14%   +0.08%     
==========================================
  Files          57       57              
  Lines        7458     7496      +38     
==========================================
+ Hits         3435     3459      +24     
- Misses       3697     3710      +13     
- Partials      326      327       +1     
Impacted Files Coverage 螖
s2i/builder.go 26.98% <0.00%> (-5.71%) 猬囷笍
function.go 60.25% <88.88%> (+3.64%) 猬嗭笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update ce26a23...b4baba7. Read the comment docs.

@lkingland lkingland requested a review from lance April 25, 2022 11:47
Copy link
Member

@lance lance left a comment

Choose a reason for hiding this comment

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

Nice consolidation - ty
/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 25, 2022
@knative-prow knative-prow bot merged commit 1424831 into knative:main Apr 25, 2022
@lkingland lkingland deleted the lkingland/s2i-runtime-envs branch September 20, 2022 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/enhancement lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S2I builds ignore environment
2 participants