Staging instance, all changes can be removed at any time

Skip to content

graph: Make job name dependent on graph image version

Antoine R. Dumont requested to merge mr/fix-graph-job-name into production

So we reduce the friction when new deployment occurs. As in jobs are immutable and if you change the image, then you are trying to mutate something that cannot. Hence having argocd complains about it and refusing to sync. Then you have to clean up the jobs and sync again (so manual intervention).

Tested in local-cluster with success (apply in staging the graph installation without this fix, this creates the job with a simple name, checkout this branch, apply again, the old job is removed and the new one with the suffixed hash of the version is created).

helm diff
[swh] Comparing changes between branches production and mr/fix-graph-job-name (per environment)...
Your branch is up to date with 'origin/production'.
[swh] Generate config in production branch for environment staging, namespace swh...
[swh] Generate config in production branch for environment staging, namespace swh-cassandra...
[swh] Generate config in production branch for environment staging, namespace swh-cassandra-next-version...
[swh] Generate config in mr/fix-graph-job-name branch for environment staging...
[swh] Generate config in mr/fix-graph-job-name branch for environment staging...
[swh] Generate config in mr/fix-graph-job-name branch for environment staging...
Your branch is up to date with 'origin/production'.
[swh] Generate config in production branch for environment production, namespace swh...
[swh] Generate config in production branch for environment production, namespace swh-cassandra...
[swh] Generate config in production branch for environment production, namespace swh-cassandra-next-version...
[swh] Generate config in mr/fix-graph-job-name branch for environment production...
[swh] Generate config in mr/fix-graph-job-name branch for environment production...
[swh] Generate config in mr/fix-graph-job-name branch for environment production...


------------- diff for environment staging namespace swh -------------

No differences


------------- diff for environment staging namespace swh-cassandra -------------

--- /tmp/swh-chart.swh.lxsjnzC5/staging-swh-cassandra.before	2024-10-21 17:48:40.421441785 +0200
+++ /tmp/swh-chart.swh.lxsjnzC5/staging-swh-cassandra.after	2024-10-21 17:48:41.121441788 +0200
@@ -23036,21 +23036,21 @@
       name: cpu
       target:
         type: Utilization
         averageUtilization: 75
 ---
 # Source: swh/templates/graph/job-fetch-dataset.yaml
 apiVersion: batch/v1
 kind: Job
 metadata:
   namespace: swh-cassandra
-  name: graph-grpc-python3k-job-fetch-dataset
+  name: graph-grpc-python3k-job-fetch-dataset-cc371c
   labels:
     app: graph-grpc-python3k
 spec:
   backoffLimit: 0
   template:
     metadata:
       labels:
         app: graph-grpc-python3k
     spec:
       restartPolicy: Never


------------- diff for environment staging namespace swh-cassandra-next-version -------------

--- /tmp/swh-chart.swh.lxsjnzC5/staging-swh-cassandra-next-version.before	2024-10-21 17:48:40.697441786 +0200
+++ /tmp/swh-chart.swh.lxsjnzC5/staging-swh-cassandra-next-version.after	2024-10-21 17:48:41.401441789 +0200
@@ -20638,21 +20638,21 @@
       name: cpu
       target:
         type: Utilization
         averageUtilization: 75
 ---
 # Source: swh/templates/graph/job-fetch-dataset.yaml
 apiVersion: batch/v1
 kind: Job
 metadata:
   namespace: swh-cassandra-next-version
-  name: graph-grpc-example-job-fetch-dataset
+  name: graph-grpc-example-job-fetch-dataset-cc371c
   labels:
     app: graph-grpc-example
 spec:
   backoffLimit: 0
   template:
     metadata:
       labels:
         app: graph-grpc-example
     spec:
       restartPolicy: Never


------------- diff for environment production namespace swh -------------

No differences


------------- diff for environment production namespace swh-cassandra -------------

No differences
Edited by Antoine R. Dumont

Merge request reports

Loading