determined icon indicating copy to clipboard operation
determined copied to clipboard

fix: add backwards compatibility for Pods to Jobs for k8s <v1.27 [CM-461]

Open corban-beaird opened this issue 1 year ago • 2 comments

Ticket

CM-461

Description

Older version of Kubernetes don't have the expected label (batch.kubernetes.io/job-name), instead they use job-name. https://kubernetes.io/docs/reference/labels-annotations-taints/#job-name

This PR adds a fallback to handle backwards compatibility in the event that version of k8s being used does not support the latest job label key.

Test Plan

  • CI Passes (Automated testing coming soon)

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

corban-beaird avatar Aug 28 '24 22:08 corban-beaird

Deploy Preview for determined-ui canceled.

Name Link
Latest commit 91bbaf433963d7195e6f6cb2b317f4abb6643688
Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66d79aebe0016b000898196d

netlify[bot] avatar Aug 28 '24 22:08 netlify[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 54.65%. Comparing base (e21fc6f) to head (91bbaf4). Report is 18 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9878   +/-   ##
=======================================
  Coverage   54.64%   54.65%           
=======================================
  Files        1261     1261           
  Lines      156328   156332    +4     
  Branches     3584     3583    -1     
=======================================
+ Hits        85433    85438    +5     
+ Misses      70763    70762    -1     
  Partials      132      132           
Flag Coverage Δ
backend 45.22% <100.00%> (+<0.01%) :arrow_up:
harness 72.62% <ø> (ø)
web 54.30% <ø> (ø)

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

Files with missing lines Coverage Δ
master/internal/rm/kubernetesrm/jobs.go 71.72% <100.00%> (+<0.01%) :arrow_up:

... and 5 files with indirect coverage changes

codecov[bot] avatar Aug 28 '24 22:08 codecov[bot]