yunikorn-k8shim icon indicating copy to clipboard operation
yunikorn-k8shim copied to clipboard

[YUNIKORN-966] Retrieve the username from the SparkApp CRD

Open steinsgateted opened this issue 2 years ago • 2 comments

What is this PR for?

get the user label on the SparkApp CRD objects

What type of PR is it?

  • [ ] - Bug Fix
  • [x] - Improvement
  • [ ] - Feature
  • [ ] - Documentation
  • [ ] - Hot Fix
  • [ ] - Refactoring

Todos

  • [ ] - Task

What is the Jira issue?

https://issues.apache.org/jira/projects/YUNIKORN/issues/YUNIKORN-966

How should this be tested?

Screenshots (if appropriate)

Questions:

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

steinsgateted avatar Apr 23 '22 09:04 steinsgateted

Codecov Report

Merging #412 (def76cc) into master (ce79225) will increase coverage by 0.09%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #412      +/-   ##
==========================================
+ Coverage   67.49%   67.59%   +0.09%     
==========================================
  Files          41       41              
  Lines        6683     6697      +14     
==========================================
+ Hits         4511     4527      +16     
+ Misses       2007     2005       -2     
  Partials      165      165              
Impacted Files Coverage Δ
pkg/appmgmt/general/metadata.go 86.74% <100.00%> (+2.68%) :arrow_up:
pkg/dispatcher/dispatcher.go 76.22% <0.00%> (+1.39%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ce79225...def76cc. Read the comment docs.

codecov[bot] avatar Apr 23 '22 10:04 codecov[bot]

@craigcondit Thanks for your review. I would like some clarifications. I have no idea how to test GetProxyUser().

steinsgateted avatar May 27 '22 09:05 steinsgateted

I have no idea how to test GetProxyUser().

You will probably need to mock out the API provider and pass it to a private instance of Manager.

craigcondit avatar Nov 03 '22 18:11 craigcondit

With the changes that we have made for user retrieval via YUNIKORN-1306 I think we need to rethink what we do here. Can the change to retrieve the user from the CRD be rolled into the admission controller?

wilfred-s avatar Dec 01 '22 04:12 wilfred-s

We need to rethink this approach inline with the changes that we have made for user retrieval via YUNIKORN-1306 Closing

wilfred-s avatar May 15 '23 04:05 wilfred-s