From 4e6244b5ca8ee20dbd684ef2fc3d536e6271c22d Mon Sep 17 00:00:00 2001 From: sulhicader Date: Thu, 14 Mar 2024 10:55:21 +0530 Subject: [PATCH 1/8] Fixed image bulding problem #2288 --- .github/workflows/release-wave.yml | 125 +++-------------------------- 1 file changed, 12 insertions(+), 113 deletions(-) diff --git a/.github/workflows/release-wave.yml b/.github/workflows/release-wave.yml index a3b37f3c44..983dc020a8 100644 --- a/.github/workflows/release-wave.yml +++ b/.github/workflows/release-wave.yml @@ -1,16 +1,12 @@ name: Release Wave on: - workflow_dispatch: - inputs: - version: - description: 'Release Version' - required: true + push: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VERSION: "${{ github.event.inputs.version }}" - TAG: "v${{ github.event.inputs.version }}" + VERSION: "1.1.1" + TAG: "v1.1.1" jobs: release: @@ -51,112 +47,7 @@ jobs: make test-ui-ci make test-py-ci - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 - with: - tag_name: ${{ env.TAG }} - release_name: ${{ env.TAG }} - draft: false - - - name: Release - uses: softprops/action-gh-release@v1 - with: - files: | - build/wave-${{ env.VERSION }}-darwin-amd64.tar.gz - build/wave-${{ env.VERSION }}-darwin-arm64.tar.gz - build/wave-${{ env.VERSION }}-linux-amd64.tar.gz - build/wave-${{ env.VERSION }}-windows-amd64.tar.gz - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-macosx_10_9_x86_64.whl - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-macosx_11_0_arm64.whl - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-macosx_12_0_arm64.whl - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-win_amd64.whl - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-any.whl - r/build/h2owave_${{ env.VERSION }}_R.tar.gz - tag_name: ${{ env.TAG }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish to Conda - uses: marek-mihok/publish_conda_package_action@v1.0.1 - with: - CondaDir: 'py/h2o_wave/conda' - Platforms: 'noarch' - CondaUsername: ${{ secrets.CONDA_USERNAME }} - CondaPassword: ${{ secrets.CONDA_PASSWORD }} - env: - # VERSION clashes with conda build. Use PKG_VERSION instead. - PKG_VERSION: ${{ env.VERSION }} - - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@master - with: - packages_dir: py/h2o_wave/dist - password: ${{ secrets.PYPI_API_TOKEN }} - - - name: Publish Docs - run: | - make publish-website - aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_DISTRIBUTION_ID --paths "/*" - env: - AWS_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: ${{ secrets.AWS_WEST_REGION }} - - - name: Publish to S3 - run: make publish-release-s3 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: ${{ secrets.AWS_EAST_REGION }} - - - name: Publish apps for Cloud - run: make build-apps publish-apps-s3-hac - env: - HAC_S3_BUCKET : ${{ secrets.HAC_S3_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: ${{ secrets.AWS_WEST_REGION }} - - - name: Publish apps for Managed Cloud - run: make publish-apps-s3-mc - env: - MC_S3_BUCKET : ${{ secrets.MC_S3_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.MC_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY : ${{ secrets.MC_AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.MC_AWS_REGION }} - - # Call some time after cloudfront cache bust - crawler needs to hit fresh cache. - - name: Reindex Algolia search - run: | - curl -X POST -H "Content-Type: application/json" --user $ALGOLIA_CRAWLER_USER_ID:$ALGOLIA_CRAWLER_API_KEY https://crawler.algolia.com/api/1/crawlers/$ALGOLIA_CRAWLER_ID/reindex - env: - ALGOLIA_CRAWLER_API_KEY: ${{ secrets.ALGOLIA_CRAWLER_API_KEY }} - ALGOLIA_CRAWLER_ID: ${{ secrets.ALGOLIA_CRAWLER_ID }} - ALGOLIA_CRAWLER_USER_ID: ${{ secrets.ALGOLIA_CRAWLER_USER_ID }} - - - name: Build university - run: make publish-university - - - name: Publish to PyPI - wave_university - uses: pypa/gh-action-pypi-publish@master - with: - packages_dir: university/dist - password: ${{ secrets.PYPI_UNIVERSITY_TOKEN }} - - - name: Publish to PyPI - lightwave - uses: pypa/gh-action-pypi-publish@master - with: - packages_dir: py/h2o_lightwave/dist - password: ${{ secrets.PYPI_LIGTHWAVE_TOKEN }} - - - name: Publish to PyPI - lightwave_web - uses: pypa/gh-action-pypi-publish@master - with: - packages_dir: py/h2o_lightwave_web/dist - password: ${{ secrets.PYPI_LIGTHWAVE_WEB_TOKEN }} + - name: Download H2O CLI working-directory: ./py/tmp/tour/ @@ -166,6 +57,14 @@ jobs: working-directory: ./py/tmp/tour/ run: chmod +x .bin/h2o + - name: Copy H2O Wave wheel + run: | + cp py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl ./py/tmp/tour/ + + - name: Edit Requirements file + working-directory: ./py/apps/tour/ + run: sed -i -r -e "s/h2o_wave==\{\{VERSION\}\}/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl/g" requirements.txt + - name: Make air-gapped bundle working-directory: ./py/tmp/tour/ run: | From 5040694a7793a00109cf14aca902165d0b513ba1 Mon Sep 17 00:00:00 2001 From: sulhicader Date: Thu, 14 Mar 2024 12:03:23 +0530 Subject: [PATCH 2/8] Removed importing urllib3 --- .github/workflows/release-wave.yml | 2 -- py/tests/__main__.py | 3 --- 2 files changed, 5 deletions(-) diff --git a/.github/workflows/release-wave.yml b/.github/workflows/release-wave.yml index 983dc020a8..37e398edd6 100644 --- a/.github/workflows/release-wave.yml +++ b/.github/workflows/release-wave.yml @@ -47,8 +47,6 @@ jobs: make test-ui-ci make test-py-ci - - - name: Download H2O CLI working-directory: ./py/tmp/tour/ run: mkdir -p .bin && curl -o .bin/h2o https://h2oai-cloud-release.s3.amazonaws.com/releases/ai/h2o/h2o-cloud/latest/cli/linux-amd64/h2o diff --git a/py/tests/__main__.py b/py/tests/__main__.py index 0337067af0..a87194df45 100644 --- a/py/tests/__main__.py +++ b/py/tests/__main__.py @@ -6,9 +6,6 @@ import os import platform -# HACK: Use urllib3 import side-effect to resolve "ResourceWarning: unclosed transport" in python>=3.9 versions. -import urllib3 - from .test_expando import * from .test_python_server import * from .test_python_server_async import * From b19ad17c6803fee8285dc400c48c50fc21498bb9 Mon Sep 17 00:00:00 2001 From: sulhicader Date: Thu, 14 Mar 2024 12:42:37 +0530 Subject: [PATCH 3/8] Added build-apps step --- .github/workflows/release-wave.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-wave.yml b/.github/workflows/release-wave.yml index 37e398edd6..64398e1c2b 100644 --- a/.github/workflows/release-wave.yml +++ b/.github/workflows/release-wave.yml @@ -6,7 +6,7 @@ on: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VERSION: "1.1.1" - TAG: "v1.1.1" + TAG: "1.1.1" jobs: release: @@ -47,6 +47,9 @@ jobs: make test-ui-ci make test-py-ci + - name: Publish apps for Cloud + run: make build-apps + - name: Download H2O CLI working-directory: ./py/tmp/tour/ run: mkdir -p .bin && curl -o .bin/h2o https://h2oai-cloud-release.s3.amazonaws.com/releases/ai/h2o/h2o-cloud/latest/cli/linux-amd64/h2o From e41be3755536c70e7048ee20112b651e6eecd317 Mon Sep 17 00:00:00 2001 From: sulhicader Date: Thu, 14 Mar 2024 14:01:35 +0530 Subject: [PATCH 4/8] Rerun the github action --- .github/workflows/release-wave.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-wave.yml b/.github/workflows/release-wave.yml index 64398e1c2b..bfa2ecdc56 100644 --- a/.github/workflows/release-wave.yml +++ b/.github/workflows/release-wave.yml @@ -66,6 +66,7 @@ jobs: working-directory: ./py/apps/tour/ run: sed -i -r -e "s/h2o_wave==\{\{VERSION\}\}/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl/g" requirements.txt + - name: Make air-gapped bundle working-directory: ./py/tmp/tour/ run: | From a745830afba48b9ee7c3de45d741dc8b981a041c Mon Sep 17 00:00:00 2001 From: sulhicader Date: Thu, 14 Mar 2024 15:20:16 +0530 Subject: [PATCH 5/8] Fixed the problem when bulding the tour image #2288 --- .github/workflows/release-wave.yml | 117 +++++++++++++++++++++++++++-- py/tests/__main__.py | 3 + 2 files changed, 115 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-wave.yml b/.github/workflows/release-wave.yml index bfa2ecdc56..3fcda7efca 100644 --- a/.github/workflows/release-wave.yml +++ b/.github/workflows/release-wave.yml @@ -1,12 +1,16 @@ name: Release Wave on: - push: + workflow_dispatch: + inputs: + version: + description: 'Release Version' + required: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VERSION: "1.1.1" - TAG: "1.1.1" + VERSION: "${{ github.event.inputs.version }}" + TAG: "v${{ github.event.inputs.version }}" jobs: release: @@ -47,8 +51,112 @@ jobs: make test-ui-ci make test-py-ci + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + with: + tag_name: ${{ env.TAG }} + release_name: ${{ env.TAG }} + draft: false + + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: | + build/wave-${{ env.VERSION }}-darwin-amd64.tar.gz + build/wave-${{ env.VERSION }}-darwin-arm64.tar.gz + build/wave-${{ env.VERSION }}-linux-amd64.tar.gz + build/wave-${{ env.VERSION }}-windows-amd64.tar.gz + py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-macosx_10_9_x86_64.whl + py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-macosx_11_0_arm64.whl + py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-macosx_12_0_arm64.whl + py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl + py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-win_amd64.whl + py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-any.whl + r/build/h2owave_${{ env.VERSION }}_R.tar.gz + tag_name: ${{ env.TAG }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish to Conda + uses: marek-mihok/publish_conda_package_action@v1.0.1 + with: + CondaDir: 'py/h2o_wave/conda' + Platforms: 'noarch' + CondaUsername: ${{ secrets.CONDA_USERNAME }} + CondaPassword: ${{ secrets.CONDA_PASSWORD }} + env: + # VERSION clashes with conda build. Use PKG_VERSION instead. + PKG_VERSION: ${{ env.VERSION }} + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + packages_dir: py/h2o_wave/dist + password: ${{ secrets.PYPI_API_TOKEN }} + + - name: Publish Docs + run: | + make publish-website + aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_DISTRIBUTION_ID --paths "/*" + env: + AWS_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_WEST_REGION }} + + - name: Publish to S3 + run: make publish-release-s3 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_EAST_REGION }} + - name: Publish apps for Cloud - run: make build-apps + run: make build-apps publish-apps-s3-hac + env: + HAC_S3_BUCKET : ${{ secrets.HAC_S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_WEST_REGION }} + + - name: Publish apps for Managed Cloud + run: make publish-apps-s3-mc + env: + MC_S3_BUCKET : ${{ secrets.MC_S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.MC_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY : ${{ secrets.MC_AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.MC_AWS_REGION }} + + # Call some time after cloudfront cache bust - crawler needs to hit fresh cache. + - name: Reindex Algolia search + run: | + curl -X POST -H "Content-Type: application/json" --user $ALGOLIA_CRAWLER_USER_ID:$ALGOLIA_CRAWLER_API_KEY https://crawler.algolia.com/api/1/crawlers/$ALGOLIA_CRAWLER_ID/reindex + env: + ALGOLIA_CRAWLER_API_KEY: ${{ secrets.ALGOLIA_CRAWLER_API_KEY }} + ALGOLIA_CRAWLER_ID: ${{ secrets.ALGOLIA_CRAWLER_ID }} + ALGOLIA_CRAWLER_USER_ID: ${{ secrets.ALGOLIA_CRAWLER_USER_ID }} + + - name: Build university + run: make publish-university + + - name: Publish to PyPI - wave_university + uses: pypa/gh-action-pypi-publish@master + with: + packages_dir: university/dist + password: ${{ secrets.PYPI_UNIVERSITY_TOKEN }} + + - name: Publish to PyPI - lightwave + uses: pypa/gh-action-pypi-publish@master + with: + packages_dir: py/h2o_lightwave/dist + password: ${{ secrets.PYPI_LIGTHWAVE_TOKEN }} + + - name: Publish to PyPI - lightwave_web + uses: pypa/gh-action-pypi-publish@master + with: + packages_dir: py/h2o_lightwave_web/dist + password: ${{ secrets.PYPI_LIGTHWAVE_WEB_TOKEN }} - name: Download H2O CLI working-directory: ./py/tmp/tour/ @@ -66,7 +174,6 @@ jobs: working-directory: ./py/apps/tour/ run: sed -i -r -e "s/h2o_wave==\{\{VERSION\}\}/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl/g" requirements.txt - - name: Make air-gapped bundle working-directory: ./py/tmp/tour/ run: | diff --git a/py/tests/__main__.py b/py/tests/__main__.py index a87194df45..0337067af0 100644 --- a/py/tests/__main__.py +++ b/py/tests/__main__.py @@ -6,6 +6,9 @@ import os import platform +# HACK: Use urllib3 import side-effect to resolve "ResourceWarning: unclosed transport" in python>=3.9 versions. +import urllib3 + from .test_expando import * from .test_python_server import * from .test_python_server_async import * From 055ca45f20fd0449fde514aef90bbbdd5e5448af Mon Sep 17 00:00:00 2001 From: sulhicader Date: Thu, 21 Mar 2024 19:59:37 +0530 Subject: [PATCH 6/8] Triggering the flow --- .github/workflows/release-wave.yml | 126 ++--------------------------- 1 file changed, 7 insertions(+), 119 deletions(-) diff --git a/.github/workflows/release-wave.yml b/.github/workflows/release-wave.yml index 3fcda7efca..7dfd9e2a54 100644 --- a/.github/workflows/release-wave.yml +++ b/.github/workflows/release-wave.yml @@ -1,16 +1,12 @@ name: Release Wave on: - workflow_dispatch: - inputs: - version: - description: 'Release Version' - required: true + push: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VERSION: "${{ github.event.inputs.version }}" - TAG: "v${{ github.event.inputs.version }}" + VERSION: "1.1.1" + TAG: "v1.1.1" jobs: release: @@ -51,112 +47,9 @@ jobs: make test-ui-ci make test-py-ci - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 - with: - tag_name: ${{ env.TAG }} - release_name: ${{ env.TAG }} - draft: false - - - name: Release - uses: softprops/action-gh-release@v1 - with: - files: | - build/wave-${{ env.VERSION }}-darwin-amd64.tar.gz - build/wave-${{ env.VERSION }}-darwin-arm64.tar.gz - build/wave-${{ env.VERSION }}-linux-amd64.tar.gz - build/wave-${{ env.VERSION }}-windows-amd64.tar.gz - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-macosx_10_9_x86_64.whl - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-macosx_11_0_arm64.whl - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-macosx_12_0_arm64.whl - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-win_amd64.whl - py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-any.whl - r/build/h2owave_${{ env.VERSION }}_R.tar.gz - tag_name: ${{ env.TAG }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish to Conda - uses: marek-mihok/publish_conda_package_action@v1.0.1 - with: - CondaDir: 'py/h2o_wave/conda' - Platforms: 'noarch' - CondaUsername: ${{ secrets.CONDA_USERNAME }} - CondaPassword: ${{ secrets.CONDA_PASSWORD }} - env: - # VERSION clashes with conda build. Use PKG_VERSION instead. - PKG_VERSION: ${{ env.VERSION }} - - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@master - with: - packages_dir: py/h2o_wave/dist - password: ${{ secrets.PYPI_API_TOKEN }} - - - name: Publish Docs - run: | - make publish-website - aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_DISTRIBUTION_ID --paths "/*" - env: - AWS_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: ${{ secrets.AWS_WEST_REGION }} - - - name: Publish to S3 - run: make publish-release-s3 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: ${{ secrets.AWS_EAST_REGION }} - name: Publish apps for Cloud - run: make build-apps publish-apps-s3-hac - env: - HAC_S3_BUCKET : ${{ secrets.HAC_S3_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: ${{ secrets.AWS_WEST_REGION }} - - - name: Publish apps for Managed Cloud - run: make publish-apps-s3-mc - env: - MC_S3_BUCKET : ${{ secrets.MC_S3_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.MC_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY : ${{ secrets.MC_AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.MC_AWS_REGION }} - - # Call some time after cloudfront cache bust - crawler needs to hit fresh cache. - - name: Reindex Algolia search - run: | - curl -X POST -H "Content-Type: application/json" --user $ALGOLIA_CRAWLER_USER_ID:$ALGOLIA_CRAWLER_API_KEY https://crawler.algolia.com/api/1/crawlers/$ALGOLIA_CRAWLER_ID/reindex - env: - ALGOLIA_CRAWLER_API_KEY: ${{ secrets.ALGOLIA_CRAWLER_API_KEY }} - ALGOLIA_CRAWLER_ID: ${{ secrets.ALGOLIA_CRAWLER_ID }} - ALGOLIA_CRAWLER_USER_ID: ${{ secrets.ALGOLIA_CRAWLER_USER_ID }} - - - name: Build university - run: make publish-university - - - name: Publish to PyPI - wave_university - uses: pypa/gh-action-pypi-publish@master - with: - packages_dir: university/dist - password: ${{ secrets.PYPI_UNIVERSITY_TOKEN }} - - - name: Publish to PyPI - lightwave - uses: pypa/gh-action-pypi-publish@master - with: - packages_dir: py/h2o_lightwave/dist - password: ${{ secrets.PYPI_LIGTHWAVE_TOKEN }} - - - name: Publish to PyPI - lightwave_web - uses: pypa/gh-action-pypi-publish@master - with: - packages_dir: py/h2o_lightwave_web/dist - password: ${{ secrets.PYPI_LIGTHWAVE_WEB_TOKEN }} + run: make build-apps - name: Download H2O CLI working-directory: ./py/tmp/tour/ @@ -166,17 +59,12 @@ jobs: working-directory: ./py/tmp/tour/ run: chmod +x .bin/h2o - - name: Copy H2O Wave wheel - run: | - cp py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl ./py/tmp/tour/ - - - name: Edit Requirements file - working-directory: ./py/apps/tour/ - run: sed -i -r -e "s/h2o_wave==\{\{VERSION\}\}/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl/g" requirements.txt - - name: Make air-gapped bundle working-directory: ./py/tmp/tour/ run: | + # Use the h2o_wave wheel file for building the runtime image + cp py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl ./py/tmp/tour/ + sed -i -r -e "s/h2o_wave==\{\{VERSION\}\}/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl/g" requirements.txt .bin/h2o bundle \ --docker-base-image 524466471676.dkr.ecr.us-east-1.amazonaws.com/q8s/launcher:v0.31.0-310 \ --docker-use-buildkit \ From 81d5de42ecc7d4233e501e36d0fe6d9ec77b0dcc Mon Sep 17 00:00:00 2001 From: sulhicader Date: Thu, 21 Mar 2024 21:50:44 +0530 Subject: [PATCH 7/8] Removed importing urllib3 --- py/Makefile | 2 +- py/tests/__main__.py | 3 --- setup.ps1 | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/py/Makefile b/py/Makefile index 9c7b036af8..4e087677cd 100644 --- a/py/Makefile +++ b/py/Makefile @@ -38,7 +38,7 @@ setup-tests: ## Install dependencies for tests only python3 -m venv venv echo "# Generated in hatch_build.py\n__platform__ = 'linux'\n__arch__ = 'amd64'" > h2o_wave/h2o_wave/metadata.py ./venv/bin/python -m pip install --editable h2o_wave - ./venv/bin/pip install httpx urllib3 typing_extensions + ./venv/bin/pip install httpx typing_extensions .PHONY: docs docs: ## Build API docs diff --git a/py/tests/__main__.py b/py/tests/__main__.py index 0337067af0..a87194df45 100644 --- a/py/tests/__main__.py +++ b/py/tests/__main__.py @@ -6,9 +6,6 @@ import os import platform -# HACK: Use urllib3 import side-effect to resolve "ResourceWarning: unclosed transport" in python>=3.9 versions. -import urllib3 - from .test_expando import * from .test_python_server import * from .test_python_server_async import * diff --git a/setup.ps1 b/setup.ps1 index 5b24e5a0c8..c68818b288 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -11,7 +11,7 @@ Set-Location py python -m venv venv .\venv\Scripts\python -m pip install --upgrade pip .\venv\Scripts\python -m pip install --editable h2o_wave -.\venv\Scripts\pip install httpx urllib3 typing_extensions +.\venv\Scripts\pip install httpx typing_extensions echo "# Generated in hatch_build.py\n__platform__ = 'linux'\n__arch__ = 'amd64'" > h2o_wave/h2o_wave/metadata.py if ($LastExitCode -ne 0) { exit $LastExitCode } From be705e1ac77616eb7345eab48f418651c365195e Mon Sep 17 00:00:00 2001 From: sulhicader Date: Fri, 22 Mar 2024 13:53:08 +0530 Subject: [PATCH 8/8] Changed the Path --- .github/workflows/release-wave.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-wave.yml b/.github/workflows/release-wave.yml index 7dfd9e2a54..cdbd707d69 100644 --- a/.github/workflows/release-wave.yml +++ b/.github/workflows/release-wave.yml @@ -63,7 +63,7 @@ jobs: working-directory: ./py/tmp/tour/ run: | # Use the h2o_wave wheel file for building the runtime image - cp py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl ./py/tmp/tour/ + cp ../../py/h2o_wave/dist/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl ./py/tmp/tour/ sed -i -r -e "s/h2o_wave==\{\{VERSION\}\}/h2o_wave-${{ env.VERSION }}-py3-none-manylinux1_x86_64.whl/g" requirements.txt .bin/h2o bundle \ --docker-base-image 524466471676.dkr.ecr.us-east-1.amazonaws.com/q8s/launcher:v0.31.0-310 \