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

Fix rand source in name #3070

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Fix rand source in name #3070

merged 1 commit into from
Jun 26, 2024

Conversation

skonto
Copy link
Contributor

@skonto skonto commented Jun 26, 2024

Changes

@skonto skonto requested a review from dprotaso June 26, 2024 11:48
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. area/test-and-release labels Jun 26, 2024
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.45%. Comparing base (26bc7b4) to head (affc81c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3070   +/-   ##
=======================================
  Coverage   78.44%   78.45%           
=======================================
  Files         191      191           
  Lines        8941     8938    -3     
=======================================
- Hits         7014     7012    -2     
+ Misses       1664     1663    -1     
  Partials      263      263           

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

Comment on lines +82 to +86
nameMu.Lock()
for i := range suffix {
suffix[i] = letterBytes[nameRand.Intn(len(letterBytes))]
}
nameMu.Unlock()
Copy link
Member

Choose a reason for hiding this comment

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

minor tweak - let's just do a defer unlock

Suggested change
nameMu.Lock()
for i := range suffix {
suffix[i] = letterBytes[nameRand.Intn(len(letterBytes))]
}
nameMu.Unlock()
nameMu.Lock()
defer nameMu.Unlock()
for i := range suffix {
suffix[i] = letterBytes[nameRand.Intn(len(letterBytes))]
}

@dprotaso
Copy link
Member

actually let's get this merged - the change can be done in a follow up

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2024
Copy link

knative-prow bot commented Jun 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, 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 merged commit 3f6a546 into knative:main Jun 26, 2024
40 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. area/test-and-release lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants