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

Add integration tests for galaxy packages against tpv #17747

Draft
wants to merge 17 commits into
base: dev
Choose a base branch
from
Draft
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
74 changes: 74 additions & 0 deletions .github/workflows/test_galaxy_package_integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Test Galaxy package integration with TPV
on:
push:
paths-ignore:
- 'client/**'
- 'doc/**'
pull_request:
paths-ignore:
- 'client/**'
- 'doc/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
steps:
- name: Checkout galaxy code
uses: actions/checkout@v3
- name: Checkout tpv code
uses: actions/checkout@v3
with:
repository: galaxyproject/total-perspective-vortex
path: 'tpv'
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
# - name: Cache pip dir
# uses: actions/cache@v3
# with:
# path: ~/.cache/pip
# key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
# - name: Cache galaxy venv
# uses: actions/cache@v3
# with:
# path: '.venv'
# key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('requirements.txt') }}-integration
- name: Replace tpv galaxy dependencies with package paths from local galaxy build
run: |
GALAXY_SKIP_NODE=1 GALAXY_SKIP_CLIENT_BUILD=1 make setup-venv
# create local release
echo "c" | UPSTREAM_REMOTE_URL="https://github.com/nuwang/galaxy.git" ./scripts/release.sh -l
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is temporarily pointing to my upstream to simulate some additional missing files.

# make requirements point to local wheels where possible
cd tpv
while IFS= read -r line; do
# Handle galaxy- packages specifically
package_path=`echo $line | sed -e '/^galaxy-/ s/-/_/g' -e 's|^galaxy_\(.*\)$|../packages/\1|'`
if [ -d "$package_path" ]; then
# This is a local package. Replace it with the path to the local wheel
row=`find $package_path/dist -type f -name '*.whl'`
else
# pass original requirement line unchanged
row="$line"
fi
echo "$row" >> requirements_local.txt
done < "requirements_test.txt"
cat requirements_local.txt
mv requirements_local.txt requirements_test.txt
- name: Install required packages
run: pip install tox
- name: Run tox
run: tox -e py${{ matrix.python-version }} -- --runslow
env:
PYTHONUNBUFFERED: "True"
working-directory: 'tpv'
1 change: 0 additions & 1 deletion packages/app/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include *.rst *.txt LICENSE */py.typed
include galaxy/carbon_emissions/carbon_intensity.csv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad merge?

Copy link
Member Author

@nuwang nuwang Apr 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were removed on purpose to cause test failures, but the weird thing is, the tests are passing. carbon_intensity.csv was removed to simulate this issue: #17748
but the relevant test is not failing as I mentioned in: #17747 (comment)
(it's finally failing now, but for other, unrelated reasons). If you have any insights into why local built wheels might succeed, but the corresponding PyPI packages fail, it'd be very helpful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, I've missed that. The test_galaxy_packages tests fail for the right reason now that #17991 has been merged.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rebased just in case, but I don't think that change affects this? This builds the wheels locally, and forces tpv to use those wheels: https://github.com/galaxyproject/galaxy/actions/runs/8879844569/job/24378560228?pr=17747#step:6:971

I would therefore have expected the missing file to cause the expected failure, but it is not. So something else must be going on?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was due to using the wrong pytest.ini in package tests, see #18301 for a fix.

include galaxy/dependencies/*.txt
include galaxy/dependencies/*.sh
include galaxy/jobs/runners/util/job_script/*.sh
Expand Down
Loading