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

fix: make registry validation work again #690

Merged
merged 2 commits into from
Dec 2, 2021

Conversation

lance
Copy link
Member

@lance lance commented Nov 30, 2021

Changes

In ccf0015
the behavior of NewFunction() changed slightly, such that it no longer actually
works without a provided and valid path. This was not caught in any of the
tests, because it's the CLI code that was making this call, and the end to end
tests that exercise the build command, use the --registry flag, causing
the repository validation code path to be slightly different.

🧹 This commit just adds the path so that func build without a --registry flag will work again.

EDIT: Converting to a draft, because really, any registry should be validated even if it's provided as a CLI flag. I will add that validation and a test.

/kind fix

In knative@ccf0015
the behavior of `NewFunction()` changed slightly, such that it no longer actually
works without a provided and valid path. This was not caught in any of the
tests, because it's the CLI code that was making this call, and the end to end
tests that exercise the build command, use the `--repository` flag, causing
the repository validation code path to be slightly different.

This commit just adds the path so that `func build` without a `--repository` flag will work again.

Signed-off-by: Lance Ball <lball@redhat.com>
@knative-prow-robot
Copy link

@lance: The label(s) kind/fix cannot be applied, because the repository doesn't have them.

In response to this:

Changes

In ccf0015
the behavior of NewFunction() changed slightly, such that it no longer actually
works without a provided and valid path. This was not caught in any of the
tests, because it's the CLI code that was making this call, and the end to end
tests that exercise the build command, use the --repository flag, causing
the repository validation code path to be slightly different.

🧹 This commit just adds the path so that func build without a --repository flag will work again.

/kind fix

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/test-infra repository.

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 30, 2021
@knative-prow-robot knative-prow-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 30, 2021
@codecov
Copy link

codecov bot commented Nov 30, 2021

Codecov Report

Merging #690 (2bba8c8) into main (4b3a5c3) will increase coverage by 0.80%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #690      +/-   ##
==========================================
+ Coverage   38.15%   38.95%   +0.80%     
==========================================
  Files          42       42              
  Lines        3916     3920       +4     
==========================================
+ Hits         1494     1527      +33     
+ Misses       2219     2181      -38     
- Partials      203      212       +9     
Impacted Files Coverage Δ
cmd/build.go 45.13% <85.71%> (+17.60%) ⬆️
cmd/root.go 58.49% <0.00%> (+11.32%) ⬆️

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 4b3a5c3...2bba8c8. Read the comment docs.

@lance lance marked this pull request as draft November 30, 2021 22:55
@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 30, 2021
Signed-off-by: Lance Ball <lball@redhat.com>
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 1, 2021
@lance lance added the kind/bug Categorizes issue or PR as related to a bug. label Dec 1, 2021
@lance lance marked this pull request as ready for review December 1, 2021 14:34
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 1, 2021
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.

Thanks for the fix!

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2021
@knative-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance, 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-robot knative-prow-robot merged commit 10f2cf4 into knative:main Dec 2, 2021
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. cla: yes Indicates the PR's author has signed the CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants