Skip to content

Commit

Permalink
fix(job-runner): move job manifest path (#6517)
Browse files Browse the repository at this point in the history
We found that we cannot rely on configmaps that mount as a specific file
in k8s: they don't update without a restart
(https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath)

![Documentation about
subpath](https://github.com/user-attachments/assets/1f18b7f8-6b77-454b-b70a-d7efd5b797a3)

But, we cannot overwrite the contents of snuba/manual_jobs/ by mounting
configuration there because we rely on source code in that directory. So
we are moving this config to a new directory that doesn't pollute
anything else (`snuba/env`).

Next step:
- updating the mount in ops to point to snuba/env
  • Loading branch information
onewland authored Nov 6, 2024
1 parent 030c149 commit 640beb4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
File renamed without changes.
2 changes: 1 addition & 1 deletion snuba/manual_jobs/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, job_id: str, status: JobStatus):


def _read_manifest_from_path(filename: str) -> Mapping[str, JobSpec]:
local_root = os.path.dirname(__file__)
local_root = os.path.join(os.path.dirname(__file__), "..", "env")

with open(os.path.join(local_root, filename)) as stream:
contents = simplejson.loads(stream.read())
Expand Down

0 comments on commit 640beb4

Please sign in to comment.