8000 Removes redundant default labels and annotations by KapilSareen · Pull Request #2746 · knative/func · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Removes redundant default labels and annotations #2746

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

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

KapilSareen
Copy link
Contributor

Changes

  • Removes function.knative.dev and boson.dev annotations.
  • Adds conditional check for dapr.io annotations to only add them if dapr-system namespace exists.

/kind enhancement

Fixes #2565

Testing

(with dapr installed in cluster)

$ kubectl describe --all-namespaces kservice 
Name:         func-test
Namespace:    default
Labels:       <none>
Annotations:  dapr.io/app-id: func-test
              dapr.io/app-port: 8080
              dapr.io/enable-api-logging: true
              dapr.io/enabled: true
              dapr.io/metrics-port: 9092
              serving.knative.dev/creator: kubernetes-admin
              serving.knative.dev/lastModifier: kubernetes-admin

(without dapr installed)

$ kubectl describe --all-namespaces kservice
Name:         func-test
Namespace:    default
Labels:       <none>
Annotations:  serving.knative.dev/creator: kubernetes-admin
              serving.knative.dev/lastModifier: kubernetes-admin

Copy link
knative-prow bot commented Mar 16, 2025

Hi @KapilSareen. 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.

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/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 16, 2025
@knative-prow knative-prow bot requested review from nainaz and vyasgun March 16, 2025 07:43
Copy link
codecov bot commented Mar 16, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 63.47%. Comparing base (a351afd) to head (6a070b7).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
pkg/knative/deployer.go 86.95% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2746      +/-   ##
==========================================
+ Coverage   62.33%   63.47%   +1.13%     
==========================================
  Files         129      131       +2     
  Lines       15589    15588       -1     
==========================================
+ Hits         9718     9895     +177     
+ Misses       4941     4738     -203     
- Partials      930      955      +25     
Flag Coverage Δ
e2e-test 35.86% <87.50%> (-0.05%) ⬇️
e2e-test-oncluster 34.19% <70.83%> (+1.33%) ⬆️
e2e-test-oncluster-runtime 28.53% <0.00%> (?)
e2e-test-runtime-go 26.54% <70.83%> (?)
e2e-test-runtime-node 25.94% <70.83%> (?)
e2e-test-runtime-python 25.94% <70.83%> (?)
e2e-test-runtime-quarkus 26.09% <70.83%> (?)
e2e-test-runtime-rust 25.04% <70.83%> (?)
e2e-test-runtime-springboot 25.08% <70.83%> (?)
e2e-test-runtime-typescript 26.05% <70.83%> (?)
integration-tests 49.54% <87.50%> (+1.77%) ⬆️
unit-tests 49.51% <0.00%> (?)

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.

@KapilSareen
Copy link
Contributor Author

@matejvasek can you help me figure out why the tests are failing? It seems to work fine locally.

@lkingland
Copy link
Member
lkingland commented Mar 17, 2025

Thanks for the contribution @KapilSareen.

It looks like the "Code Style" test is failing due to some formatting problems (you'll want to run gofmt automatically on save in your editor), the "Unit Test" checks are failing on the TestCheckAuth in pkg/docker/creds, but that might be a flake so I am re-running the test. The E2E test failures can be ignored for now. I'd start by fixing the code style problems.

@KapilSareen
Copy link
Contributor Author
KapilSareen commented Mar 17, 2025

@lkingland I fixed the code style failing tests, not sure if the E2E tests failing have something to do with my PR. What do you think?

@matejvasek matejvasek requested review from lkingland and matzew and removed request for nainaz and vyasgun March 18, 2025 14:56
@KapilSareen KapilSareen force-pushed the labels-fix branch 2 times, most recently from 94979c2 to e8921da Compare March 19, 2025 20:47
@KapilSareen KapilSareen requested a review from matejvasek March 19, 2025 20:52
@matejvasek
Copy link
Contributor

/approve
/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 Mar 20, 2025
@matejvasek
Copy link
Contributor

@KapilSareen some tests repeatedly failed, please check if some parts of the code do not check the deleted label/annotation.

@KapilSareen
Copy link
Contributor Author

@matejvasek The E2E test TestFunctionExtendedFlow seems to be failing:

....
    readycheck.go:14: Waiting function to get ready (revision [extended-test-00001])
    cmd.go:83: /home/runner/work/func/func/func describe --output plain
    cmd.go:83: /home/runner/work/func/func/func list
    scenario_extended_flow_test.go:156: assertion failed: expression is false: strings.Contains(result.Out, funcName): deployed function is not listed
    cmd.go:83: /home/runner/work/func/func/func delete extended-test
    cmd.go:83: /home/runner/work/func/func/func list
--- FAIL: TestFunctionExtendedFlow (94.40s)

I don't think this has something to do with my PR. What do you think?

@matejvasek
Copy link
Contributor

func (l *Lister) List(ctx context.Context, namespace string) (items []fn.ListItem, err error) {
client, err := NewServingClient(namespace)
if err != nil {
return
}
lst, err := client.ListServices(ctx, clientservingv1.WithLabel(labels.FunctionKey, labels.FunctionValue))

@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 21, 2025
@KapilSareen KapilSareen force-pushed the labels-fix branch 2 times, most recently from 8d10bb1 to 1fde218 Compare March 21, 2025 17:17
@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 21, 2025
Signed-off-by: KapilSareen <kapilsareen584@gmail.com>
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 21, 2025
@KapilSareen
Copy link
Contributor Author

Hi @matejvasek I think we're GTG now!

@lkingland
Copy link
Member

Looks good to me. Thanks for the contribution.
/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 24, 2025
Copy link
knative-prow bot commented Mar 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: KapilSareen, lkingland, matejvasek

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:
  • OWNERS [lkingland,matejvasek]

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 335b6c2 into knative:main Mar 24, 2025
39 checks passed
@KapilSareen KapilSareen deleted the labels-fix branch March 24, 2025 21:06
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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. 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.

Redundant and confusing labels added by default
3 participants
0