From 459742267fd4dd51b717a11a85002a912fd28360 Mon Sep 17 00:00:00 2001 From: linglp Date: Mon, 19 Jun 2023 15:53:52 -0400 Subject: [PATCH 1/6] allow production tag to trigger publishing images --- .github/workflows/docker_build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 4232a5161..7dbc77bd7 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -7,7 +7,13 @@ name: Create and publish a Docker image on: push: tags: - - '*beta*' + - 'v[0-9]+.[0-9]+.[0-9]+' + workflow_dispatch: + inputs: + tags: + description: 'tag version number' + required: true + env: REGISTRY: ghcr.io @@ -45,5 +51,5 @@ jobs: with: file: schematic_api/Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }} || ${{ github.event.inputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From 417fccd075aa52ad4d2bc4518cd8b856ed2c7d84 Mon Sep 17 00:00:00 2001 From: linglp Date: Mon, 19 Jun 2023 17:46:13 -0400 Subject: [PATCH 2/6] implement or statement --- .github/workflows/docker_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 7dbc77bd7..1f08b8333 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -51,5 +51,5 @@ jobs: with: file: schematic_api/Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }} || ${{ github.event.inputs.tags }} + tags: ${{ steps.meta.outputs.tags || github.event.inputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From 256548fc1bc6e8cd824f8077480217453b8f13ae Mon Sep 17 00:00:00 2001 From: linglp Date: Tue, 20 Jun 2023 11:31:39 -0400 Subject: [PATCH 3/6] modify workflow to allow input value be used to trigger docker build --- .github/workflows/docker_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 1f08b8333..b7fb00c27 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -11,7 +11,7 @@ on: workflow_dispatch: inputs: tags: - description: 'tag version number' + description: 'Please only use existing tags' required: true @@ -45,11 +45,11 @@ jobs: tags: | type=ref,event=branch type=ref,event=pr - type=semver,pattern={{raw}} + type=semver,pattern={{raw}},value=${{ env.TAG || github.event.inputs.tags }} - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: file: schematic_api/Dockerfile push: true - tags: ${{ steps.meta.outputs.tags || github.event.inputs.tags }} + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From 69527bb11b7436ded5a7b716ce96d1ca0abde0b9 Mon Sep 17 00:00:00 2001 From: linglp Date: Wed, 21 Jun 2023 11:24:48 -0400 Subject: [PATCH 4/6] add hide-blanks parameter --- schematic_api/api/openapi/api.yaml | 7 +++++++ schematic_api/api/routes.py | 3 ++- tests/test_api.py | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/schematic_api/api/openapi/api.yaml b/schematic_api/api/openapi/api.yaml index f7d80d57d..66332f3b1 100644 --- a/schematic_api/api/openapi/api.yaml +++ b/schematic_api/api/openapi/api.yaml @@ -329,6 +329,13 @@ paths: default: false description: If True, validation suite will only run with in-house validation rule. If False, the Great Expectations suite will be utilized and all rules will be available. required: true + - in: query + name: hide_blanks + schema: + type: boolean + description: If true, annotations with blank values will be hidden from a dataset's annotation list in Synaspe. If false, annotations with blank values will be displayed. Default to false + required: false + example: false - in: query name: access_token schema: diff --git a/schematic_api/api/routes.py b/schematic_api/api/routes.py index 8d8f66367..1246fae21 100644 --- a/schematic_api/api/routes.py +++ b/schematic_api/api/routes.py @@ -370,7 +370,7 @@ def validate_manifest_route(schema_url, data_type, restrict_rules=None, json_str #####profile validate manifest route function #@profile(sort_by='cumulative', strip_dirs=True) -def submit_manifest_route(schema_url, asset_view=None, manifest_record_type=None, json_str=None, table_manipulation=None, data_type=None): +def submit_manifest_route(schema_url, asset_view=None, manifest_record_type=None, json_str=None, table_manipulation=None, data_type=None, hide_blanks=False): # call config_handler() config_handler(asset_view = asset_view) @@ -415,6 +415,7 @@ def submit_manifest_route(schema_url, asset_view=None, manifest_record_type=None access_token=access_token, manifest_record_type = manifest_record_type, restrict_rules = restrict_rules, + hide_blanks=hide_blanks, table_manipulation = table_manipulation, use_schema_label=use_schema_label) diff --git a/tests/test_api.py b/tests/test_api.py index d21f84987..82fb783a8 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -685,6 +685,7 @@ def test_submit_manifest_table_and_file_replace(self, client, syn_token, data_mo "schema_url": data_model_jsonld, "data_type": "Biospecimen", "restrict_rules": False, + "hide_blanks": False, "manifest_record_type": "table_and_file", "asset_view": "syn51514344", "dataset_id": "syn51514345", From 8fbef6b90a5c6fbc6328520a2725fc04c14a1594 Mon Sep 17 00:00:00 2001 From: Lingling <55448354+linglp@users.noreply.github.com> Date: Thu, 22 Jun 2023 18:03:29 -0400 Subject: [PATCH 5/6] Revert "Feat: allowed production tag, staging tag, and manual run on existing tags to trigger building docker images for AWS deployment" --- .github/workflows/docker_build.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index b7fb00c27..4232a5161 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -7,13 +7,7 @@ name: Create and publish a Docker image on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - workflow_dispatch: - inputs: - tags: - description: 'Please only use existing tags' - required: true - + - '*beta*' env: REGISTRY: ghcr.io @@ -45,7 +39,7 @@ jobs: tags: | type=ref,event=branch type=ref,event=pr - type=semver,pattern={{raw}},value=${{ env.TAG || github.event.inputs.tags }} + type=semver,pattern={{raw}} - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: From cc1726332feb1191d187f679dd8a549ed66457ba Mon Sep 17 00:00:00 2001 From: linglp Date: Thu, 22 Jun 2023 18:13:05 -0400 Subject: [PATCH 6/6] fix regex problem --- .github/workflows/docker_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index b7fb00c27..98b4b5384 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -7,7 +7,7 @@ name: Create and publish a Docker image on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + - 'v[0-9]+\.[0-9]+\.[0-9]+(?:-[a-zA-Z]+)?' workflow_dispatch: inputs: tags: @@ -45,7 +45,7 @@ jobs: tags: | type=ref,event=branch type=ref,event=pr - type=semver,pattern={{raw}},value=${{ env.TAG || github.event.inputs.tags }} + type=semver,pattern={{raw}} - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: