Skip to content

Conversation

@intojhanurag
Copy link
Contributor

Changes

  • Introduced typed error ErrEnvNotExist to clearly indicate missing environment variables.
  • Added error check in tests using errors.As to assert that the correct typed error is returned.
  • Validates that the Name field in ErrEnvNotExist matches the expected missing environment variable.
  • Improves test reliability and clarity for environment variable management.

@knative-prow
Copy link

knative-prow bot commented Oct 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: intojhanurag
Once this PR has been reviewed and has the lgtm label, please assign lkingland for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 requested review from dsimansk and nainaz October 22, 2025 08:46
@knative-prow
Copy link

knative-prow bot commented Oct 22, 2025

Hi @intojhanurag. Thanks for your PR.

I'm waiting for a github.com 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.

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 knative-prow bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 22, 2025
@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.21%. Comparing base (d3a783c) to head (167f5c7).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3126      +/-   ##
==========================================
+ Coverage   58.32%   60.21%   +1.88%     
==========================================
  Files         134      134              
  Lines       17369    13501    -3868     
==========================================
- Hits        10131     8130    -2001     
+ Misses       6300     4404    -1896     
- Partials      938      967      +29     
Flag Coverage Δ
e2e-tests 41.68% <0.00%> (+2.76%) ⬆️
integration-tests 54.74% <100.00%> (+2.47%) ⬆️
unit-tests 46.78% <100.00%> (+0.56%) ⬆️

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.

@intojhanurag
Copy link
Contributor Author

Hey @gauron99 , It is ready for review.

t.Fatalf("Expected no envs to remain, got '%v'", f.Run.Envs)
}

// TODO: create and test typed errors for ErrEnvNotExist etc.
Copy link
Contributor

Choose a reason for hiding this comment

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

there is a "etc" so I assume we need to do this for more errors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can add , but how will I know which ones are missing? Otherwise, I can keep this comment so that we can add more in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah lets add that comment back just in case, thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants