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: RM-130 add determined info as pod labels #9140

Merged
merged 30 commits into from
Apr 16, 2024
Merged

Conversation

kkunapuli
Copy link
Contributor

@kkunapuli kkunapuli commented Apr 10, 2024

Ticket

RM-130

Description

Add Determined system information such as username, workspace name, and resource pool as pod labels for kubernetes environments.

Test Plan

Inspect pods created by Determined: kubectl describe pod <POD NAME> | grep grep determined.ai

For a notebook (or anything that's not an experiment), the labels should look something like this:

determined.ai/container_id=167b8380-9776-494d-acf6-5f8c29f52d52
determined.ai/resource_pool=default
determined.ai/task_id=3278502b-3d76-4a52-a902-9833166ef5e6
determined.ai/task_type=NOTEBOOK
determined.ai/user=determined
determined.ai/workspace=my-workspace

If the pod is running a trail, there will be two additional labels:

determined.ai/experiment_id=16
determined.ai/task_type=TRIAL
determined.ai/trial_id=23

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.

@kkunapuli kkunapuli requested a review from a team as a code owner April 10, 2024 13:20
@cla-bot cla-bot bot added the cla-signed label Apr 10, 2024
@kkunapuli kkunapuli marked this pull request as draft April 10, 2024 13:20
Copy link

netlify bot commented Apr 10, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit e8bee81
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/661ea23e22f4c6000818201f

Copy link

codecov bot commented Apr 10, 2024

Codecov Report

Attention: Patch coverage is 82.35294% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 38.34%. Comparing base (3f70a46) to head (e8bee81).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9140      +/-   ##
==========================================
- Coverage   45.71%   38.34%   -7.38%     
==========================================
  Files        1179      989     -190     
  Lines      146795   130092   -16703     
  Branches     2419     2420       +1     
==========================================
- Hits        67110    49886   -17224     
- Misses      79471    79992     +521     
  Partials      214      214              
Flag Coverage Δ
harness 35.24% <ø> (-28.79%) ⬇️
web 35.82% <ø> (ø)

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

Files Coverage Δ
master/internal/api_command.go 47.84% <100.00%> (+0.75%) ⬆️
master/internal/core_experiment.go 61.50% <100.00%> (ø)
master/internal/rm/kubernetesrm/spec.go 72.60% <100.00%> (+0.97%) ⬆️
master/pkg/tasks/task.go 48.67% <ø> (ø)
master/pkg/tasks/task_trial.go 0.00% <0.00%> (ø)

... and 270 files with indirect coverage changes

master/internal/rm/kubernetesrm/resource_pool.go Outdated Show resolved Hide resolved
master/internal/rm/kubernetesrm/spec.go Outdated Show resolved Hide resolved
master/internal/rm/kubernetesrm/spec.go Outdated Show resolved Hide resolved
master/internal/core.go Outdated Show resolved Hide resolved
@kkunapuli kkunapuli changed the title first draft RM-130 add determined info as pod labels Apr 11, 2024
@kkunapuli kkunapuli changed the title RM-130 add determined info as pod labels feat: RM-130 add determined info as pod labels Apr 11, 2024
Copy link

cla-bot bot commented Apr 12, 2024

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @kkunapuli on file. In order for us to review and merge your code, please start the CLA process at https://determined.ai/cla.

After we approve your CLA, we will update the contributors list (private) and comment @cla-bot[bot] check to rerun the check.

@cla-bot cla-bot bot removed the cla-signed label Apr 12, 2024
@kkunapuli kkunapuli marked this pull request as ready for review April 12, 2024 14:05
@kkunapuli kkunapuli requested a review from a team as a code owner April 12, 2024 14:05
master/internal/api_command.go Outdated Show resolved Hide resolved
master/internal/core_experiment.go Outdated Show resolved Hide resolved
master/internal/core_experiment.go Outdated Show resolved Hide resolved
@@ -388,6 +389,11 @@ func (m *Master) parseCreateExperiment(ctx context.Context, req *apiv1.CreateExp

taskSpec.Project = config.Project()
taskSpec.Workspace = config.Workspace()
if p.Id > 1 {
Copy link
Contributor

Choose a reason for hiding this comment

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

We are changing Project/Workspace which is used in Slurm. Is this change of this going to affect any behavior in Slurm? Is this field not being set always causing any bugs in Slurm?

I know I said it was a bug but it is probably worth checking that this does not affect slurm.

master/internal/rm/kubernetesrm/spec.go Outdated Show resolved Hide resolved
master/internal/rm/kubernetesrm/spec.go Outdated Show resolved Hide resolved
master/internal/rm/kubernetesrm/spec.go Outdated Show resolved Hide resolved
master/internal/rm/kubernetesrm/spec.go Show resolved Hide resolved
@kkunapuli kkunapuli requested a review from a team as a code owner April 15, 2024 15:09
@cla-bot cla-bot bot added the cla-signed label Apr 15, 2024
master/internal/api_command.go Outdated Show resolved Hide resolved
master/pkg/tasks/task_trial.go Outdated Show resolved Hide resolved
master/internal/rm/kubernetesrm/spec_test.go Outdated Show resolved Hide resolved
master/internal/rm/kubernetesrm/spec_test.go Show resolved Hide resolved
master/internal/rm/kubernetesrm/spec.go Outdated Show resolved Hide resolved
master/internal/rm/kubernetesrm/spec.go Outdated Show resolved Hide resolved
@kkunapuli kkunapuli marked this pull request as draft April 16, 2024 14:26
@kkunapuli kkunapuli marked this pull request as ready for review April 16, 2024 14:29
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.

LGTM

master/internal/api_command.go Outdated Show resolved Hide resolved
@kkunapuli kkunapuli merged commit 5541e54 into main Apr 16, 2024
69 of 84 checks passed
@kkunapuli kkunapuli deleted the kunapuli/add-pod-labels branch April 16, 2024 17:58
JComins000 pushed a commit that referenced this pull request Apr 22, 2024
Co-authored-by: Keita Nonaka <keita.nonaka@hpe.com>
Co-authored-by: Thiago Dallacqua <104855841+thiagodallacqua-hpe@users.noreply.github.com>
Co-authored-by: Michael Kardash <mikhail.kardash@hpe.com>
Co-authored-by: Amanda Vialva <144278621+amandavialva01@users.noreply.github.com>
Co-authored-by: Nick Blaskey <nick.blaskey@hpe.com>
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.

6 participants