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: Failing h2o_wave installation when building the tour image #2289

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
118 changes: 7 additions & 111 deletions .github/workflows/release-wave.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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/[email protected]
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/
Expand All @@ -169,6 +62,9 @@ jobs:
- 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 \
Expand Down
2 changes: 1 addition & 1 deletion py/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions py/tests/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
2 changes: 1 addition & 1 deletion setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down
Loading