Makes the janitor use the correct id so it doesn't delete literally e… #778
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…very working directory...
Issue Number
N/A Came up during staging test
Purpose/Implementation Notes
Our job models have two id fields. One of them is
id
, which is an auto-incrementing primary key. The other is nomad_job_id which is a very long alphanumeric string identifying a nomad job. We make working directories for each of our jobs using their PK fields:id
. We have to query the nomad API using the id field that Nomad knows about:nomad_job_id
.We were using the wrong PK to query nomad jobs, so we thought no jobs were running so we indiscriminately deleted every single working directory while jobs were using them.
Types of changes
Functional tests
This is still a WIP so I haven't done any testing yet.
Checklist