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

feat: log podspec [DET-9861] #8899

Merged
merged 2 commits into from
Feb 28, 2024
Merged

feat: log podspec [DET-9861] #8899

merged 2 commits into from
Feb 28, 2024

Conversation

eecsliu
Copy link
Contributor

@eecsliu eecsliu commented Feb 26, 2024

Description

Simply prints out the podspec before the task is run. The message occurs at the start of the task and doesn't interfere with the task logs.

Test Plan

Manually verify: run a task in kubernetes and check that the logs include a string of the podspec.

Commentary (optional)

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

@eecsliu eecsliu requested a review from a team as a code owner February 26, 2024 19:58
@cla-bot cla-bot bot added the cla-signed label Feb 26, 2024
Copy link

netlify bot commented Feb 26, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit eaecd42
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/65dd1a981e89a00007ac34ba

Copy link
Contributor

@NicholasBlaskey NicholasBlaskey left a comment

Choose a reason for hiding this comment

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

Looks good to me, just a minor question / thought

@@ -480,6 +481,7 @@ func (p *pod) createPodSpec(scheduler string) error {

p.pod = p.configurePodSpec(
volumes, initContainer, container, sidecars, (*k8sV1.Pod)(env.PodSpec()), scheduler)
p.insertLog(time.Now().UTC(), fmt.Sprintf("Pod Spec Configured:\n%v\n", p.pod.Spec))
Copy link
Contributor

Choose a reason for hiding this comment

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

is the message obnoxiously large? Like do you think it could be annoying for some users?

Maybe we could add the log at a debug level?

Copy link
Contributor Author

@eecsliu eecsliu Feb 26, 2024

Choose a reason for hiding this comment

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

I'm afraid that if we log it at the debug level it might not be useful enough in a lot of situations. I personally don't think it's too obnoxious, but what do you think? (I'll add a screenshot)

imo it's like how in master logs we print the master spec at startup

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link

codecov bot commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.22%. Comparing base (a8ac657) to head (ae60716).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8899      +/-   ##
==========================================
- Coverage   47.53%   44.22%   -3.31%     
==========================================
  Files        1066      706     -360     
  Lines      170248   133397   -36851     
  Branches     2235     2235              
==========================================
- Hits        80919    59000   -21919     
+ Misses      89171    74239   -14932     
  Partials      158      158              
Flag Coverage Δ
backend 49.48% <ø> (+6.14%) ⬆️
harness 48.39% <ø> (-15.38%) ⬇️
web 42.50% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 494 files with indirect coverage changes

@eecsliu eecsliu merged commit 59385a0 into main Feb 28, 2024
67 of 83 checks passed
@eecsliu eecsliu deleted the eliu-log-podspec branch February 28, 2024 17:28
maxrussell pushed a commit that referenced this pull request Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants