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

Update backfill job, and setup a cronjob in prod #1077

Merged
merged 9 commits into from
Apr 28, 2023
Merged

Conversation

severo
Copy link
Collaborator

@severo severo commented Apr 21, 2023

No description provided.

@severo severo changed the title Update backfill job Update backfill job, and setup a cronjob in prod Apr 21, 2023
@severo severo requested review from AndreaFrancis and a team April 21, 2023 14:04
@github-actions
Copy link

github-actions bot commented Apr 21, 2023

ArgoCD Diff for commit a705381

Updated at 4/26/2023, 12:09:32 PM CEST

App: datasets-server-prod
YAML generation: Success 🟢
App sync status: Synced ✅

===== batch/CronJob datasets-server/prod-datasets-server-job-backfill ======
--- /tmp/argocd-diff2569919997/prod-datasets-server-job-backfill-live.yaml	2023-04-26 10:09:31.991077823 +0000
+++ /tmp/argocd-diff2569919997/prod-datasets-server-job-backfill	2023-04-26 10:09:31.991077823 +0000
@@ -0,0 +1,77 @@
+apiVersion: batch/v1
+kind: CronJob
+metadata:
+  labels:
+    app.kubernetes.io/component: prod-datasets-server-backfill
+    app.kubernetes.io/instance: prod
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: prod-datasets-server
+    argocd.argoproj.io/instance: datasets-server-prod
+    helm.sh/chart: datasets-server
+  name: prod-datasets-server-job-backfill
+  namespace: datasets-server
+spec:
+  jobTemplate:
+    spec:
+      template:
+        spec:
+          containers:
+          - env:
+            - name: LOG_LEVEL
+              value: INFO
+            - name: CACHE_MONGO_DATABASE
+              value: datasets_server_cache
+            - name: CACHE_MONGO_URL
+              valueFrom:
+                secretKeyRef:
+                  key: MONGO_URL
+                  name: mongo-url
+                  optional: false
+            - name: QUEUE_MONGO_DATABASE
+              value: datasets_server_queue
+            - name: QUEUE_MONGO_URL
+              valueFrom:
+                secretKeyRef:
+                  key: MONGO_URL
+                  name: mongo-url
+                  optional: false
+            - name: COMMON_HF_ENDPOINT
+              value: https://huggingface.co
+            - name: HF_ENDPOINT
+              value: https://huggingface.co
+            - name: COMMON_HF_TOKEN
+              valueFrom:
+                secretKeyRef:
+                  key: HF_TOKEN
+                  name: hf-token
+                  optional: false
+            - name: METRICS_MONGO_DATABASE
+              value: datasets_server_metrics
+            - name: METRICS_MONGO_URL
+              valueFrom:
+                secretKeyRef:
+                  key: MONGO_URL
+                  name: mongo-url
+                  optional: false
+            - name: CACHE_MAINTENANCE_ACTION
+              value: backfill
+            image: huggingface/datasets-server-jobs-cache_maintenance:sha-bdda4ed
+            imagePullPolicy: IfNotPresent
+            name: prod-datasets-server-backfill
+            resources:
+              limits:
+                cpu: 1
+                memory: 512Mi
+              requests:
+                cpu: 1
+            securityContext:
+              allowPrivilegeEscalation: false
+          nodeSelector: {}
+          restartPolicy: OnFailure
+          securityContext:
+            runAsGroup: 3000
+            runAsNonRoot: true
+            runAsUser: 1000
+          tolerations: []
+      ttlSecondsAfterFinished: 3600
+  schedule: 0 * * * *

Legend Status
The app is synced in ArgoCD, and diffs you see are solely from this PR.
⚠️ The app is out-of-sync in ArgoCD, and the diffs you see include those changes plus any from this PR.
🛑 There was an error generating the ArgoCD diffs due to changes in this PR.

@HuggingFaceDocBuilder
Copy link
Collaborator

HuggingFaceDocBuilder commented Apr 21, 2023

The documentation is not available anymore as the PR was closed or merged.

@severo severo force-pushed the update-backfill-job branch from 7d01713 to 1ce4735 Compare April 21, 2023 14:12
Copy link
Contributor

@AndreaFrancis AndreaFrancis left a comment

Choose a reason for hiding this comment

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

backfill/upgrade look better now, thanks!

jobs/cache_maintenance/README.md Outdated Show resolved Hide resolved
jobs/cache_maintenance/src/cache_maintenance/backfill.py Outdated Show resolved Hide resolved
@severo severo changed the base branch from main to create-children-jobs-if-error April 21, 2023 15:13
@severo severo force-pushed the update-backfill-job branch from 1ce4735 to 768513d Compare April 21, 2023 15:14
severo added 4 commits April 26, 2023 10:03
Because a job has not the sufficient information to know which cache
entries whould be deleted or not. Let's use backfill for that (in a next
PR. It's not an issue to have dangling cache entries meanwhile)
@severo severo force-pushed the create-children-jobs-if-error branch from 1b49260 to af2c3fd Compare April 26, 2023 10:03
severo and others added 5 commits April 26, 2023 10:08
Also: remove the "upgrade" action, since it's handled by backfill. Also:
remove test for backfill action, because it's not clear how it would
work (maybe -> e2e test)
Co-authored-by: Andrea Francis Soria Jimenez <andrea@huggingface.co>
@severo severo force-pushed the update-backfill-job branch from bcb4240 to a705381 Compare April 26, 2023 10:08
@severo severo requested review from AndreaFrancis and a team April 26, 2023 10:24
Base automatically changed from create-children-jobs-if-error to main April 28, 2023 08:58
@severo severo merged commit d380761 into main Apr 28, 2023
@severo severo deleted the update-backfill-job branch April 28, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants