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

Bump cert-manager and use their clientset #15703

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

skonto
Copy link
Contributor

@skonto skonto commented Jan 17, 2025

@skonto skonto requested a review from dprotaso January 17, 2025 11:25
@knative-prow knative-prow bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jan 17, 2025
Copy link

knative-prow bot commented Jan 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: skonto

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 knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 17, 2025
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.82%. Comparing base (fe0e53f) to head (82b465c).

Files with missing lines Patch % Lines
pkg/queue/sharedmain/handlers.go 0.00% 1 Missing ⚠️
pkg/reconciler/route/route.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15703      +/-   ##
==========================================
- Coverage   80.85%   80.82%   -0.04%     
==========================================
  Files         222      222              
  Lines       18035    18037       +2     
==========================================
- Hits        14583    14578       -5     
- Misses       3082     3088       +6     
- Partials      370      371       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)

replace k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7 => k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without this I am hitting kubernetes/code-generator#177 cc @dprotaso

Copy link
Member

Choose a reason for hiding this comment

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

you don't need the version in the first part of the replace directive

@skonto
Copy link
Contributor Author

skonto commented Jan 17, 2025

  only new issues on pull_request: 
  Running [/home/runner/golangci-lint-1.62.2-linux-amd64/golangci-lint run  --go=1.23] in [/home/runner/work/serving/serving] ...
  Error: pkg/activator/handler/handler.go:160:36: response body must be closed (bodyclose)
  			rc := http.NewResponseController(w)
  			                                ^
  Error: pkg/queue/protobuf_stats_reporter_test.go:141:20: response body must be closed (bodyclose)
  	result := w.Result()
  	                  ^
  Error: pkg/queue/sharedmain/handlers.go:135:35: response body must be closed (bodyclose)
  		rc := http.NewResponseController(w)
  		                                ^
  Error: pkg/reconciler/route/route.go:372:3: error is not nil (line 370) but it returns nil (nilerr)
  		return nil, nil
  		^
  4 issues:
  * bodyclose: 3
  * nilerr: 1
  * ```

@skonto
Copy link
Contributor Author

skonto commented Jan 17, 2025

I will fix the lint thing although it is irrelevant to the PR it seems 🤔

@skonto
Copy link
Contributor Author

skonto commented Jan 17, 2025

Looking at the lint errors:

$/golangci-lint-1.62.2-linux-amd64/golangci-lint run
pkg/activator/handler/handler.go:160:36: response body must be closed (bodyclose)
			rc := http.NewResponseController(w)
			                                ^
pkg/queue/sharedmain/handlers.go:135:35: response body must be closed (bodyclose)
		rc := http.NewResponseController(w)
		                                ^
2 issues:
* bodyclose: 2
$/golangci-lint-1.63.4-linux-amd64/golangci-lint run
0 issues. (edited) 

Probably we need to update the action to the latest because this seems like a false positive.

Btw when we bump the linter version we will face issues like:

$golangci-lint-1.63.4-linux-amd64/golangci-lint run 
pkg/activator/handler/handler.go:160:4: directive `//nolint:bodyclose` is unused for linter "bodyclose" (nolintlint)
			//nolint:bodyclose
			^
1 issues:
* nolintlint: 1

Unlike 1.62.2 1.63.4 does not like the directives there.

cc @dprotaso

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 17, 2025
@skonto skonto force-pushed the bump_cert_user_their_clientsets branch from 463573f to 82b465c Compare January 17, 2025 15:15
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 17, 2025
@skonto
Copy link
Contributor Author

skonto commented Jan 17, 2025

@dprotaso ready

@dprotaso
Copy link
Member

dprotaso commented Jan 17, 2025

1.63.4 does not like the directives there.

those seem like false positives (are they?) - my guess is they fixed a false positive in a newer version. I'd rather pick up the updated linter

Can we bump the linter version in knative/actions?

https://github.com/knative/actions/blob/4ffb84b92b706397651e63fbad1e628b67705507/.github/workflows/reusable-helper-go-style.yaml#L87

@dprotaso
Copy link
Member

I bumped the linter here - knative/actions#243

@@ -369,7 +369,7 @@ func (c *Reconciler) clusterLocalDomainTLS(ctx context.Context, r *v1.Route, tc

orphanCerts, err := c.getOrphanRouteCerts(r, usedDomains, netcfg.CertificateClusterLocalDomain)
if err != nil {
return nil, nil
return nil, nil //nolint:nilerr
Copy link
Member

Choose a reason for hiding this comment

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

Can you undo this nolint directive. I left this unfixed in an earlier PR so I could double check why we're not handling this scenario

Copy link
Member

Choose a reason for hiding this comment

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

We can do an override to get passed this lint failure for this PR and deal with it in a follow up

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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants