GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Remember `--registry-insecure` setting on recurring runs by creydr · Pull Request #3490 · knative/func Conversation…rameter (knative#3484)" This reverts commit da21fa2.
creydr
force-pushed
the
respect-insecure-registry-on-consecutive-runs
branch
from
d77bad2 to
37ae142
Compare
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## main #3490 +/- ## ========================================== + Coverage 54.76% 54.89% +0.12% ========================================== Files 181 181 Lines 20443 20472 +29 ========================================== + Hits 11196 11238 +42 + Misses 8068 8053 -15 - Partials 1179 1181 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
d0734ae to
10bfeeb
Compare
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is really useful and it all looks good! 😸 👍
I have only a few nits.
[edit]: Did you run ./hack/update-codegen.sh?
/approve
/lgtm
/hold for other reviewers
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ) | ||
|
|
||
| // Test 1: Initial state - registryInsecure should be false | ||
| t.Run("initial_state_is_false", func(t *testing.T) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit
No need for underscore in t.Run name argument. Go will add those underscores by itself when the tests are executed.
Same for all the others below.
| t.Run("initial_state_is_false", func(t *testing.T) { | |
| t.Run("initial state is false", func(t *testing.T) { |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
updated
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // [registry]/[user]. | ||
| Registry string `yaml:"registry,omitempty"` | ||
|
|
||
| // RegistryInsecure defines it the TLS verification of the registry |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit
| // RegistryInsecure defines it the TLS verification of the registry | |
| // RegistryInsecure defines if the TLS verification of the registry |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
good catch. updated
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| }, | ||
| "registryInsecure": { | ||
| "type": "boolean", | ||
| "description": "RegistryInsecure defines it the TLS verification of the registry\nshould be skipped." |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit
| "description": "RegistryInsecure defines it the TLS verification of the registry\nshould be skipped." | |
| "description": "RegistryInsecure defines if the TLS verification of the registry\nshould be skipped." |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
updated
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // WarnRegistryInsecureChange checks if the registry has changed but | ||
| // registryInsecure is still set to true, and prints a warning if so. | ||
| // This helps users avoid accidentally skipping TLS verification on a new registry. | ||
| func (c Global) WarnRegistryInsecureChange(w io.Writer, f fn.Function) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Unit tests missing.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Added one
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| // WithRegistryInsecure sets if the TLS verification of the registry should | ||
| // be skipped. | ||
| func WithRegistryInsecure(insecure bool) Option { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Should we add a comment here, that a WithRegistryInsecure(false) does not override function's existing true? Because one could think that this setting would set registryInsecure definitely to false.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I accepted the suggestion from @gauron99 in #3490 (comment)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: David Fridrich <[email protected]>
Co-authored-by: David Fridrich <[email protected]>
Co-authored-by: David Fridrich <[email protected]>
Co-authored-by: David Fridrich <[email protected]>
|
/lgtm |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
/unhold |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
* Revert "Pass --registry-insecure flag to Tekton pipeline tlsVerify parameter (knative#3484)" This reverts commit da21fa2. * Remember `--registry-insecure` setting on recurring runs * Run `make schema-generate` * Simplify parsing * Extend description of flag, that values are persited * Add warning, when registry changed but insecure-registry is still set to true * Fix typo * Rerun update-codegen * Cleanup test names * Add unit test for WarnRegistryInsecureChange * Run schema-generate * Update pkg/functions/client.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/functions/client.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/config/config.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/config/config.go Co-authored-by: David Fridrich <[email protected]> * Fix format issues (goimport and gofmt) * Refactor registry-insecure unit test to make it available for the Deploy tests too * Refactor GlobalConfig.WarnRegistryInsecureChange() method to function in cmd package --------- Co-authored-by: David Fridrich <[email protected]>
…ns (#3574) * Pass --registry-insecure flag to Tekton pipeline tlsVerify parameter (#3484) When --registry-insecure is used, set tlsVerify=false in the Tekton pipeline to allow buildah to push to registries with self-signed certs. * Remember `--registry-insecure` setting on recurring runs (#3490) * Revert "Pass --registry-insecure flag to Tekton pipeline tlsVerify parameter (#3484)" This reverts commit da21fa2. * Remember `--registry-insecure` setting on recurring runs * Run `make schema-generate` * Simplify parsing * Extend description of flag, that values are persited * Add warning, when registry changed but insecure-registry is still set to true * Fix typo * Rerun update-codegen * Cleanup test names * Add unit test for WarnRegistryInsecureChange * Run schema-generate * Update pkg/functions/client.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/functions/client.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/config/config.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/config/config.go Co-authored-by: David Fridrich <[email protected]> * Fix format issues (goimport and gofmt) * Refactor registry-insecure unit test to make it available for the Deploy tests too * Refactor GlobalConfig.WarnRegistryInsecureChange() method to function in cmd package --------- Co-authored-by: David Fridrich <[email protected]> * Ran `./hack/update-codegen.sh` --------- Co-authored-by: David Fridrich <[email protected]>
…ns (knative#3574) * Pass --registry-insecure flag to Tekton pipeline tlsVerify parameter (knative#3484) When --registry-insecure is used, set tlsVerify=false in the Tekton pipeline to allow buildah to push to registries with self-signed certs. * Remember `--registry-insecure` setting on recurring runs (knative#3490) * Revert "Pass --registry-insecure flag to Tekton pipeline tlsVerify parameter (knative#3484)" This reverts commit da21fa2. * Remember `--registry-insecure` setting on recurring runs * Run `make schema-generate` * Simplify parsing * Extend description of flag, that values are persited * Add warning, when registry changed but insecure-registry is still set to true * Fix typo * Rerun update-codegen * Cleanup test names * Add unit test for WarnRegistryInsecureChange * Run schema-generate * Update pkg/functions/client.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/functions/client.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/config/config.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/config/config.go Co-authored-by: David Fridrich <[email protected]> * Fix format issues (goimport and gofmt) * Refactor registry-insecure unit test to make it available for the Deploy tests too * Refactor GlobalConfig.WarnRegistryInsecureChange() method to function in cmd package --------- Co-authored-by: David Fridrich <[email protected]> * Ran `./hack/update-codegen.sh` --------- Co-authored-by: David Fridrich <[email protected]>
…ns + backport fixes (#3588) * [release-1.21] Remember `--registry-insecure` setting on recurring runs (#3574) * Pass --registry-insecure flag to Tekton pipeline tlsVerify parameter (#3484) When --registry-insecure is used, set tlsVerify=false in the Tekton pipeline to allow buildah to push to registries with self-signed certs. * Remember `--registry-insecure` setting on recurring runs (#3490) * Revert "Pass --registry-insecure flag to Tekton pipeline tlsVerify parameter (#3484)" This reverts commit da21fa2. * Remember `--registry-insecure` setting on recurring runs * Run `make schema-generate` * Simplify parsing * Extend description of flag, that values are persited * Add warning, when registry changed but insecure-registry is still set to true * Fix typo * Rerun update-codegen * Cleanup test names * Add unit test for WarnRegistryInsecureChange * Run schema-generate * Update pkg/functions/client.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/functions/client.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/config/config.go Co-authored-by: David Fridrich <[email protected]> * Update pkg/config/config.go Co-authored-by: David Fridrich <[email protected]> * Fix format issues (goimport and gofmt) * Refactor registry-insecure unit test to make it available for the Deploy tests too * Refactor GlobalConfig.WarnRegistryInsecureChange() method to function in cmd package --------- Co-authored-by: David Fridrich <[email protected]> * Ran `./hack/update-codegen.sh` --------- Co-authored-by: David Fridrich <[email protected]> * Run update-codegen.sh * Fix linter issues * Pin cloudevents to 1.x * Use component-versions from 1.20 * smarter component updates (#3290) * Replace tekton hub with direct bundle references * Fix TestGitlab by restoring valid Go application code The test was creating a broken Procfile instead of a working main.go, causing the pipeline build to fail and the test to timeout. * Revert "Fix TestGitlab by restoring valid Go application code" This reverts commit 3f39a10. * Replace tekton hub with direct bundle references (2) --------- Co-authored-by: David Fridrich <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
--registry-insecure not remembered on recurring runs of func deploy
There was an error while loading. Please reload this page.