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

Fix/single table job fixes #2657

Merged
merged 26 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
835a1ca
(Chore): Improve Single Table Migration Job Script
BinamB Oct 14, 2024
9671171
add param for creds
BinamB Oct 14, 2024
92f3dd1
Add priority class
BinamB Oct 15, 2024
eda0c17
Add comments
BinamB Oct 22, 2024
73ab91a
Merge branch 'master' into fix/single-table-job-fixes
BinamB Oct 22, 2024
edf5925
Making ES7 domain default (#2655)
EliseCastle23 Oct 23, 2024
a4e9a63
Update README.md (#2662)
smvgarcia Nov 5, 2024
b3b2f0b
adding changes for new al image changes (#2661)
EliseCastle23 Nov 7, 2024
66adf83
updating alembic logic to work with the new al images that manage ale…
EliseCastle23 Nov 7, 2024
e217e67
fix to include special characters in db name (#2664)
ajoaugustine Nov 7, 2024
b099d24
updating userdb job to work with new al images (#2665)
EliseCastle23 Nov 8, 2024
308f04b
Update web_whitelist
emalinowski Nov 11, 2024
7fe48a5
Feat/team project cost tracking (#2658)
AidanHilt Nov 11, 2024
de9cb3e
modifying gdcdb create job (#2668)
EliseCastle23 Nov 12, 2024
3130a30
Update squid.conf (#2641)
EliseCastle23 Nov 13, 2024
972a69d
Adding "poetry run" (#2673)
EliseCastle23 Nov 18, 2024
134803e
removing old squid file from cloud auto as it now lives in "base_imag…
EliseCastle23 Nov 20, 2024
960444f
Add GH action workflow for integration tests (#2670)
krishnaa05 Nov 21, 2024
f4b0287
fix: use /auth/request instead of /auth/mapping Arborist endpoint (#2…
pieterlukasse Dec 2, 2024
49a2d53
Merge branch 'master' into fix/single-table-job-fixes
BinamB Dec 4, 2024
48a14fc
Merge branch 'master' into fix/single-table-job-fixes
BinamB Dec 5, 2024
442a921
Merge branch 'master' into fix/single-table-job-fixes
BinamB Dec 18, 2024
a2ba4fc
Update Dockerfile env key=value format
MaribelleHGomez Dec 18, 2024
4c445dd
Update Dockerfile
MaribelleHGomez Dec 18, 2024
a9db2d7
Revert "Update Dockerfile"
BinamB Jan 7, 2025
e1bd5f0
Revert "Update Dockerfile env key=value format"
BinamB Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions kube/services/jobs/indexd-single-table-migration-job.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Setup for running this migration https://github.com/uc-cdis/indexd/blob/master/docs/migration_to_single_table_indexd.md
# Need to apply PriorityClass before running this job. Run kubectl apply -f indexd-single-table-migration-priority-class.yaml
apiVersion: batch/v1
kind: Job
metadata:
Expand All @@ -9,6 +10,7 @@ spec:
labels:
app: gen3job
spec:
priorityClassName: indexd-single-table-migration-priority # Assigning the priority class
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand Down Expand Up @@ -46,6 +48,12 @@ spec:
env:
- name: START_DID
GEN3_START_DID|-value: ""-|
- name: BATCH_SIZE
GEN3_BATCH_SIZE|-value: ""-|
- name: OFFSET_VALUE
GEN3_OFFSET_VALUE|-value: ""-|
- name: USE_DEFAULT_CREDS
GEN3_USE_DEFAULT_CREDS|-value: "false"-|
volumeMounts:
- name: "config-volume"
readOnly: true
Expand All @@ -72,11 +80,28 @@ spec:
args:
- "-c"
- |
flags="--creds-path /var/www/indexd/creds_new.json"
$flags=""

if [[ "$USE_DEFAULT_CREDS" == "false" ]]; then
echo "Using new creds"
flags="$flags --creds-file /var/www/indexd/creds_new.json"
else
echo "using default creds"
flags="$flags --creds-file /var/www/indexd/creds.json"
fi

if [[ -n "$START_DID" ]]; then
flags="$flags --start-did $START_DID"
fi
time poetry run python /indexd/bin/migrate_to_single_table.py $flags
if [[ -n "$BATCH_SIZE" ]]; then
flags="$flags --batch-size $BATCH_SIZE"
fi

if [[ -n "$OFFSET_VALUE" ]]; then
flags="$flags --start-offset $OFFSET_VALUE"
fi

time python /indexd/bin/migrate_to_single_table.py $flags
echo "Exit code: $?"
restartPolicy: Never

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: indexd-single-table-migration-priority
value: 100000 # High value for high priority
globalDefault: false
description: "Priority class for Indexd migration job"
Loading