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

Fixing errors related to Go 1.20 #1779

Merged
merged 9 commits into from
Feb 17, 2023
Merged

Conversation

scottmason88
Copy link
Contributor

@scottmason88 scottmason88 commented Feb 15, 2023

Description

This pull request will fix errors that came about with Go 1.20 deprecating rand.Seed.

Changes

  • Changed loop in tablegenerator.go to use the variadic function
  • Removed the random number generator seed from main.go, and added a package local variable doing this to service.go, since this is the only place the seed from main.go was used.

Reference

Issue #1775

Release Note

 Fix deprecated functions related to Go 1.20 

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 15, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 15, 2023
@knative-prow
Copy link

knative-prow bot commented Feb 15, 2023

Welcome @scottmason88! It looks like this is your first PR to knative/client 🎉

@knative-prow knative-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 15, 2023
@knative-prow knative-prow bot requested review from rhuss and vyasgun February 15, 2023 19:21
@knative-prow
Copy link

knative-prow bot commented Feb 15, 2023

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

@knative-prow knative-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 15, 2023
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 15, 2023
@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 15, 2023
Copy link
Contributor

@rhuss rhuss left a comment

Choose a reason for hiding this comment

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

Thanks, and congrats on your first client PR ! Looks great. If you could fix the Changlog entry, that would be great.

CHANGELOG.adoc Outdated
| https://github.com/knative/client/pull/[#]
| 🐛
| Updated to work with Go 1.20
| https://github.com/knative/client/pull/1775[#1775]
Copy link
Contributor

Choose a reason for hiding this comment

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

Oops, I just saw that the Changelog is quite outdated 😬 (@dsimansk would it make sense to bring it up to date, covering the releases in the second half of 2022 ?)

However, @scottmason88 can you please keep the template text and move your part out of the comment (//// .... ////) ? Also you should add a new table for the 1.10 release (the next release), without a date yet. Then add your entry as the first row. That would be great !

Copy link
Contributor

@dsimansk dsimansk Feb 16, 2023

Choose a reason for hiding this comment

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

Well, we don't use it anymore. I should have added a deprecation notice to that file probably. We're using GH action generated release notes.

Copy link
Contributor

@dsimansk dsimansk Feb 16, 2023

Choose a reason for hiding this comment

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

I'd skip the update in this PR.

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 removed my changes to the changelog so that the comment is still there.

@codecov
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

Base: 79.88% // Head: 79.87% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (1d24121) compared to base (badd909).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 1d24121 differs from pull request most recent head 55125f9. Consider uploading reports for the commit 55125f9 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1779      +/-   ##
==========================================
- Coverage   79.88%   79.87%   -0.01%     
==========================================
  Files         174      174              
  Lines       13594    13593       -1     
==========================================
- Hits        10859    10858       -1     
  Misses       1992     1992              
  Partials      743      743              
Impacted Files Coverage Δ
cmd/kn/main.go 87.82% <ø> (-0.21%) ⬇️
pkg/printers/tablegenerator.go 100.00% <100.00%> (ø)
pkg/serving/service.go 90.32% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dsimansk
Copy link
Contributor

/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 Feb 16, 2023
Copy link
Contributor

@rhuss rhuss left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 17, 2023
@knative-prow
Copy link

knative-prow bot commented Feb 17, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhuss, scottmason88

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 Feb 17, 2023
@knative-prow knative-prow bot merged commit 8a2ed4c into knative:main Feb 17, 2023
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. 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/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.

None yet

4 participants