Skip to content

Commit 91e9ab7

Browse files
authored
Fixes migration script "Adds column to use scicrunch alternative" (#2067)
* Fixes migration script Tested against master and staging dbs. * Binaries in latest test reporter fails https://github.com/codeclimate/test-reporter/releases Fixed to v0.7.0 * Enh PR template
1 parent 1f62db0 commit 91e9ab7

File tree

3 files changed

+70
-47
lines changed

3 files changed

+70
-47
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,45 @@
1-
<!-- **WIP-** prefix in title if still work in progress -->
1+
<!-- Common title prefixes/annotations:
2+
3+
WIP:
4+
bugfix:
5+
🏗️ maintenance:
6+
7+
(⚠️ devops) = changes in devops config required before deploying
8+
-->
29

310
## What do these changes do?
411

5-
<!-- Please give a short brief about these changes. -->
12+
<!-- Explain REVIEWERS what is this PR about -->
13+
14+
15+
## Related issue/s
616

17+
<!-- Enumerate REVIEWERS other issues
718
8-
## Related issue number
19+
e.g.
920
10-
<!-- Please add #issues -->
21+
- #26 : node_ports should have retry policies when upload/download fails (FIXED)
22+
- ITISFoundation/osparc-issues#304: (Part 2) Prep2Go: creating features to support complex S4L scripts (IMPLEMENTED)
23+
24+
-->
1125

1226

1327
## How to test
1428

15-
<!-- Please explain how this can be tested. Also state whether this PR needs a full rebuild, database changes, etc. -->
29+
<!-- Give REVIEWERS some hits or code snippets on how could this be tested -->
1630

1731

1832
## Checklist
1933

34+
<!-- This is YOUR section
35+
36+
Add here YOUR checklist/notes to guide and monitor the progress of the case!
37+
38+
e.g.
39+
2040
- [ ] Did you change any service's API? Then make sure to bundle document and upgrade version (``make openapi-specs``, ``git commit ...`` and then ``make version-*``)
2141
- [ ] Unit tests for the changes exist
2242
- [ ] Runs in the swarm
2343
- [ ] Documentation reflects the changes
2444
- [ ] New module? Add your github username to [.github/CODEOWNERS](.github/CODEOWNERS)
45+
-->

.github/workflows/ci-testing-deploy.yml

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ jobs:
110110
flags: unittests #optional
111111
- name: prepare codeclimate coverage file
112112
run: |
113-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
114-
chmod +x ./cc-test-reporter
113+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
114+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
115115
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_api_server_coverage.json coverage.xml
116116
- name: upload codeclimate coverage
117117
uses: actions/upload-artifact@v2
@@ -165,8 +165,8 @@ jobs:
165165
flags: unittests #optional
166166
- name: prepare codeclimate coverage file
167167
run: |
168-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
169-
chmod +x ./cc-test-reporter
168+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
169+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
170170
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_catalog_coverage.json coverage.xml
171171
- name: upload codeclimate coverage
172172
uses: actions/upload-artifact@v2
@@ -214,8 +214,8 @@ jobs:
214214
flags: unittests #optional
215215
- name: prepare codeclimate coverage file
216216
run: |
217-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
218-
chmod +x ./cc-test-reporter
217+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
218+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
219219
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_director_coverage.json coverage.xml
220220
- name: upload codeclimate coverage
221221
uses: actions/upload-artifact@v2
@@ -267,8 +267,8 @@ jobs:
267267
flags: unittests #optional
268268
- name: prepare codeclimate coverage file
269269
run: |
270-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
271-
chmod +x ./cc-test-reporter
270+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
271+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
272272
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_director_v2_coverage.json coverage.xml
273273
- name: upload codeclimate coverage
274274
uses: actions/upload-artifact@v2
@@ -316,8 +316,8 @@ jobs:
316316
flags: unittests #optional
317317
- name: prepare codeclimate coverage file
318318
run: |
319-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
320-
chmod +x ./cc-test-reporter
319+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
320+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
321321
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_sidecar_coverage.json coverage.xml
322322
- name: upload codeclimate coverage
323323
uses: actions/upload-artifact@v2
@@ -431,8 +431,9 @@ jobs:
431431
flags: unittests #optional
432432
- name: prepare codeclimate coverage file
433433
run: |
434-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
434+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
435435
chmod +x ./cc-test-reporter
436+
./cc-test-reporter --version
436437
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_postgresdb_coverage.json coverage.xml
437438
- name: upload codeclimate coverage
438439
uses: actions/upload-artifact@v2
@@ -480,8 +481,8 @@ jobs:
480481
flags: unittests #optional
481482
- name: prepare codeclimate coverage file
482483
run: |
483-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
484-
chmod +x ./cc-test-reporter
484+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
485+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
485486
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_service_integration_coverage.json coverage.xml
486487
- name: upload codeclimate coverage
487488
uses: actions/upload-artifact@v2
@@ -529,8 +530,8 @@ jobs:
529530
flags: unittests #optional
530531
- name: prepare codeclimate coverage file
531532
run: |
532-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
533-
chmod +x ./cc-test-reporter
533+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
534+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
534535
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_servicelib_coverage.json coverage.xml
535536
- name: upload codeclimate coverage
536537
uses: actions/upload-artifact@v2
@@ -578,8 +579,8 @@ jobs:
578579
flags: unittests #optional
579580
- name: prepare codeclimate coverage file
580581
run: |
581-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
582-
chmod +x ./cc-test-reporter
582+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
583+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
583584
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_modelslib_coverage.json coverage.xml
584585
- name: upload codeclimate coverage
585586
uses: actions/upload-artifact@v2
@@ -627,8 +628,8 @@ jobs:
627628
flags: unittests #optional
628629
- name: prepare codeclimate coverage file
629630
run: |
630-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
631-
chmod +x ./cc-test-reporter
631+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
632+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
632633
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_simcoresdk_coverage.json coverage.xml
633634
- name: upload codeclimate coverage
634635
uses: actions/upload-artifact@v2
@@ -676,8 +677,8 @@ jobs:
676677
flags: unittests #optional
677678
- name: prepare codeclimate coverage file
678679
run: |
679-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
680-
chmod +x ./cc-test-reporter
680+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
681+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
681682
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_storage_coverage.json coverage.xml
682683
- name: upload codeclimate coverage
683684
uses: actions/upload-artifact@v2
@@ -726,8 +727,8 @@ jobs:
726727
flags: unittests #optional
727728
- name: prepare codeclimate coverage file
728729
run: |
729-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
730-
chmod +x ./cc-test-reporter
730+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
731+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
731732
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_webserver_isolated_coverage.json coverage.xml
732733
- name: upload codeclimate coverage
733734
uses: actions/upload-artifact@v2
@@ -776,8 +777,8 @@ jobs:
776777
flags: unittests #optional
777778
- name: prepare codeclimate coverage file
778779
run: |
779-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
780-
chmod +x ./cc-test-reporter
780+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
781+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
781782
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_webserver_slow_coverage.json coverage.xml
782783
- name: upload codeclimate coverage
783784
uses: actions/upload-artifact@v2
@@ -826,8 +827,8 @@ jobs:
826827
flags: unittests #optional
827828
- name: prepare codeclimate coverage file
828829
run: |
829-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
830-
chmod +x ./cc-test-reporter
830+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
831+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
831832
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_webserver_medium_coverage.json coverage.xml
832833
- name: upload codeclimate coverage
833834
uses: actions/upload-artifact@v2
@@ -876,8 +877,8 @@ jobs:
876877
flags: unittests #optional
877878
- name: prepare codeclimate coverage file
878879
run: |
879-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
880-
chmod +x ./cc-test-reporter
880+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
881+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
881882
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.unit_webserver_fast_coverage.json coverage.xml
882883
- name: upload codeclimate coverage
883884
uses: actions/upload-artifact@v2
@@ -971,8 +972,8 @@ jobs:
971972
flags: integrationtests #optional
972973
- name: prepare codeclimate coverage file
973974
run: |
974-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
975-
chmod +x ./cc-test-reporter
975+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
976+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
976977
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.integration_webserver_coverage.json coverage.xml
977978
- name: upload codeclimate coverage
978979
uses: actions/upload-artifact@v2
@@ -1036,8 +1037,8 @@ jobs:
10361037
flags: integrationtests #optional
10371038
- name: prepare codeclimate coverage file
10381039
run: |
1039-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
1040-
chmod +x ./cc-test-reporter
1040+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
1041+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
10411042
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.integration_director-v2_coverage.json coverage.xml
10421043
- name: upload codeclimate coverage
10431044
uses: actions/upload-artifact@v2
@@ -1101,8 +1102,8 @@ jobs:
11011102
flags: integrationtests #optional
11021103
- name: prepare codeclimate coverage file
11031104
run: |
1104-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
1105-
chmod +x ./cc-test-reporter
1105+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
1106+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
11061107
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.integration_sidecar_coverage.json coverage.xml
11071108
- name: upload codeclimate coverage
11081109
uses: actions/upload-artifact@v2
@@ -1166,8 +1167,8 @@ jobs:
11661167
flags: integrationtests
11671168
- name: prepare codeclimate coverage file
11681169
run: |
1169-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
1170-
chmod +x ./cc-test-reporter
1170+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
1171+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
11711172
./cc-test-reporter format-coverage -t coverage.py -o codeclimate.integration_simcoresdk_coverage.json coverage.xml
11721173
- name: upload codeclimate coverage
11731174
uses: actions/upload-artifact@v2
@@ -1444,8 +1445,8 @@ jobs:
14441445
ls -al all_coverages
14451446
- name: install codeclimate test reporter
14461447
run: |
1447-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
1448-
chmod +x ./cc-test-reporter
1448+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ./cc-test-reporter
1449+
chmod +x ./cc-test-reporter && ./cc-test-reporter --version
14491450
./cc-test-reporter sum-coverage all_coverages/codeclimate.*.json --parts $(ls all_coverages/*.json | wc --lines)
14501451
- name: upload coverages
14511452
run: |

packages/postgres-database/src/simcore_postgres_database/migration/versions/b60363fe438f_adds_column_to_use_scicrunch_alternative.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,17 @@ def upgrade():
1919
# ### commands auto generated by Alembic - please adjust! ###
2020
op.add_column(
2121
"group_classifiers",
22-
sa.Column("uses_scicrunch", sa.Boolean(), nullable=False, default=False),
22+
sa.Column("uses_scicrunch", sa.Boolean(), nullable=True, server_default="0"),
2323
)
2424
# ### end Alembic commands ###
2525

2626
# Applies the default to all
2727
query = 'UPDATE "group_classifiers" SET uses_scicrunch=false;'
2828
op.execute(query)
29+
2930
# makes non nullable
30-
query = 'ALTER TABLE "group_classifiers" ALTER "uses_scicrunch" SET NOT NULL;'
31-
op.execute(query)
31+
# 'ALTER TABLE "group_classifiers" ALTER "uses_scicrunch" SET NOT NULL;'
32+
op.alter_column("group_classifiers", "uses_scicrunch", nullable=False)
3233

3334

3435
def downgrade():

0 commit comments

Comments
 (0)