Skip to content

Conversation

@creydr
Copy link
Member

@creydr creydr commented Nov 19, 2025

Changes

  • 🎁 Adding the --registry-authfile string build parameter to allow to specify a custom registry auth file location

/kind enhancement

Release Note

Add the --registry-authfile build parameter to allow to specify a custom registry auth file location

@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 19, 2025
@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 94.54545% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.55%. Comparing base (b039190) to head (ee37f59).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
cmd/client.go 62.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3208      +/-   ##
==========================================
+ Coverage   51.81%   54.55%   +2.74%     
==========================================
  Files         162      162              
  Lines       19131    19216      +85     
==========================================
+ Hits         9912    10484     +572     
+ Misses       8241     7688     -553     
- Partials      978     1044      +66     
Flag Coverage Δ
e2e 39.68% <88.88%> (?)
e2e go 35.61% <88.88%> (?)
e2e node 30.98% <88.88%> (?)
e2e python 35.34% <77.77%> (?)
e2e quarkus 31.14% <88.88%> (?)
e2e rust 30.55% <77.77%> (?)
e2e springboot 30.61% <77.77%> (?)
e2e typescript 31.10% <88.88%> (?)
integration 17.90% <0.00%> (+0.01%) ⬆️
unit macos-14 44.33% <95.55%> (-0.05%) ⬇️
unit macos-latest 44.33% <95.55%> (-0.05%) ⬇️
unit ubuntu-24.04-arm 44.53% <94.54%> (-0.04%) ⬇️
unit ubuntu-latest 45.26% <95.55%> (-0.05%) ⬇️
unit windows-latest 44.35% <95.55%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@creydr
Copy link
Member Author

creydr commented Nov 19, 2025

/hold
need to verify with remote deploy

@knative-prow knative-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 19, 2025
@creydr
Copy link
Member Author

creydr commented Nov 19, 2025

/unhold

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 19, 2025
@creydr creydr force-pushed the add-registry-authfile-build-option branch 2 times, most recently from ba236bd to a1e3e31 Compare November 20, 2025 10:30
@creydr
Copy link
Member Author

creydr commented Nov 20, 2025

/test ?

@knative-prow
Copy link

knative-prow bot commented Nov 20, 2025

@creydr: The following commands are available to trigger required jobs:

/test unit-tests

Use /test all to run all jobs.

Details

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@creydr
Copy link
Member Author

creydr commented Nov 20, 2025

/retest

Copy link
Member

@lkingland lkingland left a comment

Choose a reason for hiding this comment

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

👍🏻 Nice

Can we make this change to the oci.Pusher as well, so that it works withe the Host builder (and for users with no docker/podman available)? They're all using the creds package, so I assume this could work for both pushers.

Also, if you rebase on main you'll get some improved E2E tests.

@creydr creydr force-pushed the add-registry-authfile-build-option branch from a1e3e31 to 2f563bf Compare November 21, 2025 07:06
@creydr
Copy link
Member Author

creydr commented Nov 21, 2025

👍🏻 Nice

Can we make this change to the oci.Pusher as well, so that it works withe the Host builder (and for users with no docker/podman available)? They're all using the creds package, so I assume this could work for both pushers.

Also, if you rebase on main you'll get some improved E2E tests.

Hey @lkingland,
I added / reinitialized the pusher in the build.go clientOptions() with the credentials provider for host,pack,s2i builders (see https://github.com/creydr/knative-func/blob/2f563bfd250c78850f7b1fc61b232880cc1f3178/cmd/build.go#L498), as we there had the registry-authfile flag parsed. Or do you mean something different?

@creydr
Copy link
Member Author

creydr commented Nov 21, 2025

Rebased. Tests seem to pass now again

@creydr
Copy link
Member Author

creydr commented Nov 21, 2025

/cc @lkingland @gauron99

@knative-prow knative-prow bot requested review from gauron99 and lkingland November 21, 2025 10:04
@creydr
Copy link
Member Author

creydr commented Nov 25, 2025

@lkingland @gauron99 can you recheck?

Copy link
Contributor

@twoGiants twoGiants left a comment

Choose a reason for hiding this comment

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

Looks good 😸 👍

Found only minor things in the test. See comments below.

t.Fatalf("failed to create temp auth file: %s", err)
}
t.Cleanup(func() {
os.Remove(authFile.Name())
Copy link
Contributor

Choose a reason for hiding this comment

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

You could use t.TempDir and create the file there. Then you would not need to cleanup as the temp dir is removed automatically.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Updated it

Comment on lines 891 to 895
// ASSERT
if err != nil {
t.Errorf("%v", err)
return
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// ASSERT
if err != nil {
t.Errorf("%v", err)
return
}
if err != nil {
t.Fatalf("unexpected error: %v", err)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

This can probably updated in few more tests in this file.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 Updated it


// ********************** helper functions below **************************** \\

func resetHomeDir(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Right below that line in 906 is t.TempDir() which probably should be t.Helper(). And the function right below resetHomePermissions is missing the t.Helper() too.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 25, 2025
@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 26, 2025
@creydr creydr requested a review from twoGiants November 26, 2025 06:28
Copy link
Contributor

@twoGiants twoGiants left a comment

Choose a reason for hiding this comment

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

Looks great! 😸 👍

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 26, 2025
@creydr
Copy link
Member Author

creydr commented Nov 26, 2025

/assign @gauron99 @lkingland

@gauron99
Copy link
Contributor

/lgtm
/approve

@knative-prow
Copy link

knative-prow bot commented Nov 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, gauron99, twoGiants

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

The pull request process is described here

Details 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 Nov 26, 2025
@knative-prow knative-prow bot merged commit 5d86d20 into knative:main Nov 26, 2025
42 checks passed
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.

4 participants