Skip to content

Conversation

@RayyanSeliya
Copy link
Contributor

Changes

  • 🐛 Fix confusing UX in func build/deploy commands
  • 🧹 Implement 2-layer error system for better user guidance
  • 🧹 Validate registry requirement before prompting users

/kind enhancement

Fixes #3057

Solution:
Validate the missing registry error first before asking for a registry prompt! Use a 2-layer approach as discussed!

Implementation Details:

  • Refactored func build and func deploy commands to validate registry requirement before prompting
  • Implemented 2-layer error system for both "no function found" and "registry required" scenarios
  • Enhanced error messages with actionable guidance and examples
  • Improved UX by preventing unnecessary interactive prompts

Release Note

func build and func deploy commands now provide clearer error messages when registry is missing, with actionable guidance instead of confusing prompts.

@knative-prow knative-prow bot requested review from dsimansk and nainaz October 1, 2025 18:03
@knative-prow knative-prow bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 1, 2025
@knative-prow
Copy link

knative-prow bot commented Oct 1, 2025

Hi @RayyanSeliya. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@codecov
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

❌ Patch coverage is 2.72727% with 107 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.12%. Comparing base (bfed447) to head (70b88b7).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
cmd/errors.go 0.00% 81 Missing ⚠️
cmd/build.go 16.66% 14 Missing and 1 partial ⚠️
cmd/deploy.go 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3058      +/-   ##
==========================================
+ Coverage   57.68%   59.12%   +1.44%     
==========================================
  Files         133      134       +1     
  Lines       17120    17218      +98     
==========================================
+ Hits         9875    10180     +305     
+ Misses       6343     6078     -265     
- Partials      902      960      +58     
Flag Coverage Δ
e2e-tests 40.44% <2.72%> (+7.35%) ⬆️
integration-tests 53.85% <2.72%> (+1.39%) ⬆️
unit-tests 46.17% <2.72%> (-0.21%) ⬇️

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.

@RayyanSeliya
Copy link
Contributor Author

RayyanSeliya commented Oct 2, 2025

PTAL @gauron99 when you have some moments !

@gauron99 gauron99 requested review from gauron99 and lkingland and removed request for dsimansk and nainaz October 3, 2025 06:15
Copy link
Contributor

@gauron99 gauron99 left a comment

Choose a reason for hiding this comment

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

just a few suggestions

@gauron99 gauron99 self-assigned this Oct 3, 2025
@RayyanSeliya RayyanSeliya requested a review from gauron99 October 4, 2025 08:27
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 5, 2025
Copy link
Contributor

@gauron99 gauron99 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 PR! i left some comments

@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 7, 2025
…eploy and also refactor the logic when ran outside the function directory using 2 layer approach

Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
…irst

Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
… different file for better code readability and also add the platformrestriction error i lost while rebasing

Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
@RayyanSeliya RayyanSeliya force-pushed the improve-func-build-deploy branch from 807a4aa to 395a661 Compare October 7, 2025 19:34
@RayyanSeliya RayyanSeliya requested a review from gauron99 October 7, 2025 20:17
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.

/lgtm

@knative-prow knative-prow bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 8, 2025
@gauron99
Copy link
Contributor

gauron99 commented Oct 8, 2025

/ok-to-test

@knative-prow knative-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 8, 2025
@gauron99
Copy link
Contributor

gauron99 commented Oct 9, 2025

/retest

@gauron99
Copy link
Contributor

gauron99 commented Oct 9, 2025

/test unit-tests

@gauron99
Copy link
Contributor

gauron99 commented Oct 9, 2025

/override ?

@knative-prow
Copy link

knative-prow bot commented Oct 9, 2025

@gauron99: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • ?

Only the following failed contexts/checkruns were expected:

  • EasyCLA
  • style / suggester / github_actions
  • style / suggester / shell
  • style / suggester / yaml
  • tide
  • unit-tests_func_main

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

Details

In response to this:

/override ?

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.

@gauron99
Copy link
Contributor

gauron99 commented Oct 9, 2025

There is a very strange IPV6 error which happens across PRs, completely unrelated to this. Overriding the unit test to not block PR
/override unit-tests_func_main
/lgtm
/approve

@knative-prow
Copy link

knative-prow bot commented Oct 9, 2025

@gauron99: Overrode contexts on behalf of gauron99: unit-tests_func_main

Details

In response to this:

There is a very strange IPV6 error which happens across PRs, completely unrelated to this. Overriding the unit test to not block PR
/override unit-tests_func_main
/lgtm
/approve

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.

@knative-prow
Copy link

knative-prow bot commented Oct 9, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gauron99, lkingland, RayyanSeliya

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 merged commit c23e8cf into knative:main Oct 9, 2025
48 of 56 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

func build/deploy prompts for registry before validation - confusing UX

4 participants