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

[YUNIKORN-2082] Make autogenerated applicationIDs reproducible #707

Closed
wants to merge 1 commit into from

Conversation

craigcondit
Copy link
Contributor

What is this PR for?

Moved the admission-controller private function generateAppID() to the shim utils package and renamed to GenerateApplicationID() to allow for re-use by the shim. Updated implementation to use the pod UID instead of a random UUID so that the same identifier will always be created for the same Pod.

What type of PR is it?

  • - Bug Fix
  • - Improvement
  • - Feature
  • - Documentation
  • - Hot Fix
  • - Refactoring

Todos

  • - Task

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-2082

How should this be tested?

Updated unit tests.

Screenshots (if appropriate)

Questions:

  • - The licenses files need update.
  • - There is breaking changes for older versions.
  • - It needs documentation.

Moved the admission-controller private function generateAppID() to
the shim utils package and renamed to GenerateApplicationID() to
allow for re-use by the shim. Updated implementation to use the pod
UID instead of a random UUID so that the same identifier will always
be created for the same Pod.
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #707 (3b63a4c) into master (24bf9cf) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #707      +/-   ##
==========================================
+ Coverage   71.63%   71.64%   +0.01%     
==========================================
  Files          50       50              
  Lines        7953     7950       -3     
==========================================
- Hits         5697     5696       -1     
+ Misses       2058     2056       -2     
  Partials      198      198              
Files Coverage Δ
pkg/admission/util.go 95.45% <100.00%> (-0.91%) ⬇️
pkg/common/utils/utils.go 86.88% <100.00%> (+0.44%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@pbacsko pbacsko left a comment

Choose a reason for hiding this comment

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

+1 LGTM

@craigcondit craigcondit deleted the YUNIKORN-2082 branch October 27, 2023 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants