Skip to content

new method for ingesting tarballs via a single staging PR #232

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

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9ceaf6e
add CI for pytests and code style checks
truib Jun 29, 2025
e974676
exclude existing *.py files from flake8 tests
truib Jun 29, 2025
c213d70
change permission for pytest.sh script
truib Jun 29, 2025
cfce28d
logging functions in separate module
truib Jun 29, 2025
1d2c17f
add relative path to requirements.txt
truib Jun 29, 2025
8d0bb35
fix test issues and limit coverage to new python code
truib Jun 29, 2025
0ede3a8
add basic tests to avoid coverage errors
truib Jun 29, 2025
712c48c
skip flake8 for existing files and unit tests
truib Jun 29, 2025
7c7d673
skip coverage for unit tests
truib Jun 29, 2025
eea35ae
include unit tests in flake8 run
truib Jun 29, 2025
34180df
move LOG_LEVELS and error func to logging module
truib Jun 29, 2025
397eca8
use shared pid lock file to ensure at most one ingest is active
truib Jun 29, 2025
a508c9e
add main script and modules to list task files
truib Jun 29, 2025
9847d86
add class to model a (remote) file and its signature
truib Jun 29, 2025
79ef267
add class to model the description of a task
truib Jun 29, 2025
519b94f
add class to model different types of actions on CVMFS repo
truib Jun 29, 2025
f3fce42
add class to model payload of a deployment task
truib Jun 29, 2025
b379012
add class modelling a deployment task
truib Jun 29, 2025
530ac6d
add TASK_OPS_DETAILS log scope and reduce log noise
truib Jun 29, 2025
a945ece
remove unused functions
truib Jun 29, 2025
ea89ee0
enable task handling
truib Jun 29, 2025
0bb3fc1
fix determining next sequence number when last PR was closed
truib Jul 4, 2025
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
20 changes: 20 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file is part of the EESSI filesystem layer,
# see https://github.com/EESSI/filesystem-layer
#
# author: Thomas Roeblitz (@trz42)
#
# license: GPLv2
#

[flake8]
exclude =
scripts/check-stratum-servers.py,
scripts/automated_ingestion/automated_ingestion.py,
scripts/automated_ingestion/eessitarball.py,
scripts/automated_ingestion/utils.py

# ignore "Black would make changes" produced by flake8-black
# see also https://github.com/houndci/hound/issues/1769
extend-ignore = BLK100

max-line-length = 120
49 changes: 49 additions & 0 deletions .github/workflows/test-ingest-python-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This file is part of the EESSI filesystem layer,
# see https://github.com/EESSI/filesystem-layer
#
# author: Thomas Roeblitz (@trz42)
#
# license: GPLv2
#

name: Run tests
on: [push, pull_request]
# Declare default permissions as read only.
permissions: read-all
jobs:
test:
runs-on: ubuntu-24.04
strategy:
matrix:
# for now, only test with Python 3.9+ (since we're testing in Ubuntu 24.04)
#python: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
python: ['3.9', '3.10', '3.11']
fail-fast: false
steps:
- name: checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

- name: set up Python
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # v4.3.0
with:
python-version: ${{matrix.python}}

- name: Install required Python packages + pytest + flake8
run: |
python -m pip install --upgrade pip
python -m pip install -r scripts/automated_ingestion/requirements.txt
python -m pip install pytest
python -m pip install --upgrade flake8

- name: Run test suite (without coverage)
run: |
./scripts/automated_ingestion/pytest.sh scripts/automated_ingestion --verbose

- name: Run test suite (with coverage)
run: |
python -m pip install pytest-cov
./scripts/automated_ingestion/pytest.sh scripts/automated_ingestion -q --cov=scripts/automated_ingestion/eessi_logging.py

- name: Run flake8 to verify PEP8-compliance of Python code
run: |
flake8 scripts/automated_ingestion --exclude=scripts/automated_ingestion/automated_ingestion.py,scripts/automated_ingestion/eessitarball.py
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
build
hosts
.coverage
**/__pycache__
6 changes: 6 additions & 0 deletions scripts/automated_ingestion/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[run]
omit =
scripts/automated_ingestion/automated_ingestion.py
scripts/automated_ingestion/eessitarball.py
scripts/automated_ingestion/utils.py
scripts/automated_ingestion/unit_tests/*.py
2 changes: 1 addition & 1 deletion scripts/automated_ingestion/automated_ingestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def parse_args():
return args


@pid.decorator.pidfile('automated_ingestion.pid')
@pidfile('shared_lock.pid') # noqa: F401
def main():
"""Main function."""
args = parse_args()
Expand Down
Loading
Loading