From a11a1ce5998e388b50fdad2907127c0f1c97517e Mon Sep 17 00:00:00 2001 From: zhiren Date: Tue, 2 May 2023 16:33:55 -0400 Subject: [PATCH 1/8] update the lineage to use core zone file instead of greenroom --- app/services/file_manager/file_upload/upload_validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/file_manager/file_upload/upload_validator.py b/app/services/file_manager/file_upload/upload_validator.py index 33210e12..c7b754ad 100644 --- a/app/services/file_manager/file_upload/upload_validator.py +++ b/app/services/file_manager/file_upload/upload_validator.py @@ -29,7 +29,7 @@ def validate_zone(self): ECustomizedError.INVALID_UPLOAD_REQUEST, True, value='upload-message is required' ) if self.source: - source_file_info = search_item(self.project_code, AppConfig.Env.green_zone.lower(), self.source, 'file') + source_file_info = search_item(self.project_code, AppConfig.Env.core_zone.lower(), self.source, 'file') source_file_info = source_file_info['result'] if not source_file_info: SrvErrorHandler.customized_handle(ECustomizedError.INVALID_SOURCE_FILE, True, value=self.source) From d801e8d11affd8e090e4ad142b4afbf6168441f8 Mon Sep 17 00:00:00 2001 From: zhiren Date: Mon, 15 May 2023 10:25:25 -0400 Subject: [PATCH 2/8] bumpup version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9f1aaf98..59763c07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "app" -version = "2.4.0" +version = "2.5.0a0" description = "This service is designed to support pilot platform" authors = ["Indoc Research"] From 132ec41b06f1736b840cec3d8820d76d8731d269 Mon Sep 17 00:00:00 2001 From: zhiren Date: Mon, 15 May 2023 13:06:22 -0400 Subject: [PATCH 3/8] bumpup version to 2.5.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 59763c07..2901987d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "app" -version = "2.5.0a0" +version = "2.5.0" description = "This service is designed to support pilot platform" authors = ["Indoc Research"] From 0d9d769421de246a725908538721f9ccda1e4ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Andri=C4=87?= Date: Tue, 16 May 2023 10:24:50 -0400 Subject: [PATCH 4/8] fixes versioning --- app/resources/custom_help.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/resources/custom_help.py b/app/resources/custom_help.py index f3dd9f2c..80cd4c4f 100644 --- a/app/resources/custom_help.py +++ b/app/resources/custom_help.py @@ -6,7 +6,7 @@ class HelpPage: page = { 'update': { - 'version': '2.3.0', + 'version': '2.4.0', '1': 'The logic of normal upload and resumble are splited. ' 'add new command for resumable upload as `pilotcli file resume -r manifest.json`', '2': 'The manifest file will be output for both file/folder upload', diff --git a/pyproject.toml b/pyproject.toml index 2901987d..9f1aaf98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "app" -version = "2.5.0" +version = "2.4.0" description = "This service is designed to support pilot platform" authors = ["Indoc Research"] From 77414e78d71a454c3f1e003910fbf93bdea7ab77 Mon Sep 17 00:00:00 2001 From: zhiren Date: Tue, 16 May 2023 15:07:48 -0400 Subject: [PATCH 5/8] bumpup version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 773ed5a9..da1a2b85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "app" -version = "2.4.0a0" +version = "2.4.1" description = "This service is designed to support pilot platform" authors = ["Indoc Research"] From 94b803ab18dde0e6f75fd338e50dc0a01ae2d452 Mon Sep 17 00:00:00 2001 From: Color Zhan Date: Thu, 18 May 2023 09:03:02 -0400 Subject: [PATCH 6/8] Pilot 2936: add an action to create the cli with mac version (#59) * add new action for create mac binary * add the tag name * add the python and poetry * output the release url in the linux step not in a dedicate step * output the release url in the linux step not in a dedicate step * output the release url in the linux step not in a dedicate step * bumpup version * bumpup version * bumpup version * fixup the upload_url * fixup the upload_url * fixup the upload_url * use correct naming * add back build step * remove the test branch * bumpup version --------- Co-authored-by: zhiren --- .github/workflows/build-and-publish.yml | 61 +++++++++++++++++++++++-- app/resources/custom_help.py | 2 +- pyproject.toml | 2 +- 3 files changed, 60 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 7af02d06..f3afece7 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -10,6 +10,7 @@ on: push: branches: - main + - PILOT-2936 jobs: extract-branch-name: @@ -21,10 +22,13 @@ jobs: id: extract_branch shell: bash run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT - push-binary: + + push-binary-linux: needs: [ extract-branch-name ] - if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' }} + if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop'}} runs-on: ubuntu-20.04 + outputs: + upload_url: ${{steps.create_release.outputs.upload_url}} steps: - name: Checkout repository uses: actions/checkout@v3 @@ -84,5 +88,56 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./app/bundled_app/linux/${{ github.sha }} - asset_name: pilotcli + asset_name: pilotcli_linux + asset_content_type: application/octet-stream + + push-binary-macos: + needs: [ push-binary-linux ] + if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop'}} + runs-on: macos-12 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + ref: ${{ needs.extract-branch-name.outputs.branch }} + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9.16 + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: 1.3.2 + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + - name: Set up cache + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: venv-${{ hashFiles('**/poetry.lock') }} + + - name: Ensure cache is healthy + if: steps.cached-poetry-dependencies.outputs.cache-hit == 'true' + run: timeout 10s poetry run pip --version || rm -rf .venv + + - name: Install dependencies + run: poetry install --no-interaction --no-root + + - name: Build binary + run: poetry run pyinstaller -F --distpath ./app/bundled_app/macos --specpath ./app/build/macos --workpath ./app/build/macos --paths=./.venv/lib/python3.9/site-packages ./app/pilotcli.py -n ${{ github.sha }} + + - name: Upload Release Binary + id: upload-release-binary + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.push-binary-linux.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./app/bundled_app/macos/${{ github.sha }} + asset_name: pilotcli_macos asset_content_type: application/octet-stream diff --git a/app/resources/custom_help.py b/app/resources/custom_help.py index 80cd4c4f..3dd4ec59 100644 --- a/app/resources/custom_help.py +++ b/app/resources/custom_help.py @@ -6,7 +6,7 @@ class HelpPage: page = { 'update': { - 'version': '2.4.0', + 'version': '2.4.3', '1': 'The logic of normal upload and resumble are splited. ' 'add new command for resumable upload as `pilotcli file resume -r manifest.json`', '2': 'The manifest file will be output for both file/folder upload', diff --git a/pyproject.toml b/pyproject.toml index da1a2b85..9dd01c78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "app" -version = "2.4.1" +version = "2.4.3" description = "This service is designed to support pilot platform" authors = ["Indoc Research"] From 5cf781b7d6b32fec40c203b3be4f98c9da53fc9e Mon Sep 17 00:00:00 2001 From: zhiren Date: Thu, 1 Jun 2023 09:09:32 -0400 Subject: [PATCH 7/8] bumpup to next minor --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9dd01c78..59763c07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "app" -version = "2.4.3" +version = "2.5.0a0" description = "This service is designed to support pilot platform" authors = ["Indoc Research"] From c3efb398ebcd916fed4aac0b955d9daecf1b2a7d Mon Sep 17 00:00:00 2001 From: zhiren Date: Thu, 1 Jun 2023 09:13:33 -0400 Subject: [PATCH 8/8] cleanup the code --- .github/workflows/build-and-publish.yml | 1 - app/resources/custom_help.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index f3afece7..6554e157 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -10,7 +10,6 @@ on: push: branches: - main - - PILOT-2936 jobs: extract-branch-name: diff --git a/app/resources/custom_help.py b/app/resources/custom_help.py index 3dd4ec59..08f8e69d 100644 --- a/app/resources/custom_help.py +++ b/app/resources/custom_help.py @@ -6,7 +6,7 @@ class HelpPage: page = { 'update': { - 'version': '2.4.3', + 'version': '2.5.0', '1': 'The logic of normal upload and resumble are splited. ' 'add new command for resumable upload as `pilotcli file resume -r manifest.json`', '2': 'The manifest file will be output for both file/folder upload',