hashicorp / hashicorp/nomad-pack

Add warning to plan when duplicate job names are detected

Open
#874 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
445
Forks
65
PR merge metrics
No merged PRs in 30d

Description

### Problem Description:
Running `nomad-pack run` for a single service with a single variables file, the command stopped all other jobs that were previously deployed under the same pack deployment name, without any warning during `nomad-pack plan`.

### Expected behavior:
`nomad-pack plan` should detect that there are existing jobs with the same name and issue a warning that the jobs will be stopped as part of plan execution.

### Actual behavior:
`nomad-pack plan` does not indicate that any existing jobs will be stopped.
All jobs previously deployed under the same pack deployment name are stopped during run with the warning:
`warning: Job '' is no longer defined in pack deployment '' - stopping`

### Environment:
nomad-pack version: v0.4.2 (cd4d2a4)
Nomad version: 1.9.6+ent

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the `nomad-pack plan` and `nomad-pack run` command paths, then find where the existing warning about jobs no longer defined in a pack deployment is generated. Make plan report a warning when existing jobs with duplicate names will be stopped, and verify the behavior against the described single-service, single-variables-file scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.