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: nil deref in usage of incomplete experiment config policies #10068

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

stoksc
Copy link
Contributor

@stoksc stoksc commented Oct 16, 2024

Ticket

CM-572

Description

Fix a call to cfg.Resources().Priority() on an experiment config without schemas.WithDefaults. I didn't call with defaults because the config is intentionally incomplete (we need to know what the user set, without any defaulting).

Test Plan

Manually tested.

Checklist

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

@stoksc stoksc requested a review from a team as a code owner October 16, 2024 19:14
@cla-bot cla-bot bot added the cla-signed label Oct 16, 2024
Copy link

netlify bot commented Oct 16, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit 87de272
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/671010b47841da000887c146

Copy link
Contributor

@amandavialva01 amandavialva01 left a comment

Choose a reason for hiding this comment

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

LGTM, great work!

@stoksc stoksc enabled auto-merge (squash) October 16, 2024 19:19
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.44%. Comparing base (6c46a46) to head (87de272).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10068      +/-   ##
==========================================
+ Coverage   54.42%   54.44%   +0.02%     
==========================================
  Files        1262     1262              
  Lines      158901   158901              
  Branches     3631     3631              
==========================================
+ Hits        86476    86509      +33     
+ Misses      72291    72258      -33     
  Partials      134      134              
Flag Coverage Δ
backend 45.56% <100.00%> (+0.06%) ⬆️
harness 72.74% <ø> (ø)
web 53.95% <ø> (ø)

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

Files with missing lines Coverage Δ
master/internal/configpolicy/task_config_policy.go 87.16% <100.00%> (ø)

... and 9 files with indirect coverage changes

@stoksc stoksc merged commit a14525f into main Oct 16, 2024
89 of 101 checks passed
@stoksc stoksc deleted the cfg-pol-nil-deref branch October 16, 2024 20:19
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.

3 participants