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 for GA publish and CI builds for Python 3.8, 3.9, 3.10, and 3.11 #398

Merged
merged 29 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
83a8d2a
Trying to fix publish in GA
dmichaels-harvard Oct 5, 2023
911f9df
Still trying to fix publish in GA
dmichaels-harvard Oct 5, 2023
a8fe94c
Still trying to fix publish in GA
dmichaels-harvard Oct 5, 2023
33fba41
Still trying to fix publish in GA
dmichaels-harvard Oct 5, 2023
dc6f0ce
Still trying to fix publish in GA
dmichaels-harvard Oct 5, 2023
d2025cd
Added back 3.8, 3.9, 3.0 Python in addition to 3.11 in GA.
dmichaels-harvard Oct 5, 2023
4526e07
Added back 3.8, 3.9, 3.0 Python in addition to 3.11 in GA.
dmichaels-harvard Oct 5, 2023
2790847
GA for just 3.8 and 3.11 - adding all 4 broke them - some concurrency…
dmichaels-harvard Oct 5, 2023
e0987ff
removed 3.11 - just 3.8 - still failing with just those 2
dmichaels-harvard Oct 5, 2023
e5490d7
trying to sync the jobs
dmichaels-harvard Oct 5, 2023
753d182
trying to sync the jobs
dmichaels-harvard Oct 5, 2023
550e148
trying to sync the jobs
dmichaels-harvard Oct 5, 2023
600e9fc
ne longer trying to sync the jobs
dmichaels-harvard Oct 5, 2023
d2c748e
trying with separate files
dmichaels-harvard Oct 5, 2023
4512705
trying to fix up tests to not bump into each other
dmichaels-harvard Oct 5, 2023
00f7e36
put 3.8 and 3.11 in ga
dmichaels-harvard Oct 5, 2023
0fd3631
added back all four pythons
dmichaels-harvard Oct 5, 2023
1fde53e
trying to make ga sequential not concurrent for multiple python versions
dmichaels-harvard Oct 6, 2023
2ec955c
trying to make ga sequential not concurrent for multiple python versions
dmichaels-harvard Oct 6, 2023
48b9ba9
trying to get publish to work
dmichaels-harvard Oct 6, 2023
a33311b
trying to get publish to work
dmichaels-harvard Oct 6, 2023
3816d39
trying to get publish to work
dmichaels-harvard Oct 6, 2023
2a5f490
Backed out previous test change to try to work around test run concur…
dmichaels-harvard Oct 6, 2023
8c5102a
Update CHANGELOG
dmichaels-harvard Oct 6, 2023
0f6f830
update version to 5.0.0.1b3 for publish test
dmichaels-harvard Oct 6, 2023
7bb0034
update version to 5.0.0.1b3 for publish test
dmichaels-harvard Oct 6, 2023
45fc45e
update version to 5.0.0.1b4 for publish test
dmichaels-harvard Oct 6, 2023
6228f2d
Update to 5.1.0
dmichaels-harvard Oct 6, 2023
400c74c
Updated CHANGELOG -> 5.1.0
dmichaels-harvard Oct 6, 2023
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
1 change: 0 additions & 1 deletion .github/workflows/main-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ jobs:
PYPI_USER: ${{ secrets.PYPI_USER }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
make configure
make publish-for-ga
107 changes: 101 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,117 @@ on:
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# In this case, since this repo (tibanna) has tests which cannot reliablly run concurrently,
# because (at least) they write/read to/from fixed locations in S3, we need to run the tests
# for each of the Python versions serially; so the build_<version> sections below are just
# clones of each other, with the proper version and "needs" clause on the previous build.
# Using the strategy/matrix mechanism as is done in other repos causes the tests to run
# concurrently. TODO: Find a way to do this without having to clone these sections.
jobs:
# This workflow contains a single job called "build"
build:
build_3_8:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
strategy:
matrix:
python_version: ['3.11']

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
python-version: '3.8'

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Deps
run: |
make install

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: QA (unit)
run: |
poetry run invoke test --no-flake

build_3_9:
needs: build_3_8
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Deps
run: |
make install

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: QA (unit)
run: |
poetry run invoke test --no-flake

build_3_10:
needs: build_3_9
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Deps
run: |
make install

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: QA (unit)
run: |
poetry run invoke test --no-flake

build_3_11:
needs: build_3_10
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install Poetry
uses: snok/install-poetry@v1
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ Change Log
==========


5.0.1
=====
* Fixed GA publish which was not working because it could not find dcicutils because
it is not a dependency in pyproject.toml; workaround is to call it manually via straight
python and not via pyproject.toml script. N.B. HOWEVER: It still does not work because
pypi project credentials are not yet defined for this repo.
* Added Python 3.8, 3.9, 3.10, as well as 3.11 for GA CI build. This causes failures
because of the way the tests were written - writing/reading to/from fixed location in S3,
which means that concurrent runs do not reliably succeed, i.e. because they are stomping
on each other. Workaround was to define separate build steps (cloned for now) in main.yml
with appropriate "needs" clauses which forces them to execute serially.


5.0.0
=====

Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ publish:
poetry run publish-to-pypi

publish-for-ga:
# Need this poetry install first for some reason in GitHub Actions, otherwise getting this:
# Warning: 'publish-to-pypi' is an entry point defined in pyproject.toml, but it's not installed as a script. You may get improper `sys.argv[0]`.
# Only a warning, but then it does not find dcicutils for some reason.
poetry install
poetry run publish-to-pypi --noconfirm
# Normally this is done like this:
# -> poetry run publish-to-pypi --noconfirm
# But this will not work in GA because this repo (tibanna) does not have dcicutils as a
# dependency in pyproject.toml and the publish-to-pypi is defined within pyproject.toml
# so it will not find dcicutils, even we install it explicitly here (or in the GA yml file),
# so we just call the script manually here, just like it is defined in pyproject.toml.
pip install dcicutils
python -m dcicutils.scripts.publish_to_pypi --noconfirm

publish-pypi:
scripts/publish-pypi
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tibanna"
version = "5.0.0"
version = "5.0.0.1b2"
description = "Tibanna runs portable pipelines (in CWL/WDL) on the AWS Cloud."
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand Down
Loading