Skip to content

Release Provenance DB 2.0#269

Merged
CodeGat merged 8 commits intov5from
263-release-provenance-2.0
May 7, 2025
Merged

Release Provenance DB 2.0#269
CodeGat merged 8 commits intov5from
263-release-provenance-2.0

Conversation

@CodeGat
Copy link
Copy Markdown
Member

@CodeGat CodeGat commented Apr 28, 2025

Closes #263

Important

Due to the addition of the GitHub Repository secret TRACKING_SERVICES_POST_TOKEN and GitHub Repository variable TRACKING_SERVICES_POST_URL, and removal of GitHub Repository secret BUILD_DB_CONNECTION_STR, this is considered a major upgrade. Once this is merged, all MDRs will need to upgrade to v5 in order to use this new Release Provenance DB.

Background

We are moving away from the initial release database to a database serviced by tracking_services.

This PR removes the old release database workflow, adds a new one, and gets release data into a format defined in https://github.com/ACCESS-NRI/schema/blob/main/au.org.access-nri/tracking_services/release_provenance/telemetry/1-0-0.json

The PR

  • Delete old build database infrastructure, in 4d0bd2d
  • Create new scripts/release_provenance/tracking_services_data.py module
  • Update deploy-* workflows to get data required for above module, in 4f81cc2 and 916f0fe
  • Finally, updated all workflow_calls to v5, in 969c360

Testing

Unit Testing

Added testing infrastructure for the tracking_services_data.py module, under tests/scripts/release_provenance/test_tracking_services_data.py. To run:

python3 -m venv venv
./venv/bin/activate
pip install -r requirements-dev.txt
pytest tests/scripts/release_provenance/test_tracking_services_data.py

Workflow Testing

Workflow testing is ongoing via ACCESS-NRI/ACCESS-TEST#36, details will be added to this PR upon testing completion.

Prerelease - Manual Output Testing ✔️

Before testing the Release Workflow, I tested that the outputs given by the prerelease https://github.com/ACCESS-NRI/ACCESS-TEST/actions/runs/14746333987 are in a valid format.

Tested via:

gh run download 14746333987 --repo access-nri/access-test
python3 -m venv venv
. venv/bin/activate
pip install -r build-cd/scripts/release_provenance/requirements.txt
python -m scripts.release_provenance.tracking_services_data \
  --repository access-test \
  --root-spec access-test \
  --deployment-outputs ./deploy-outputs.Gadi \
  --metadata-outputs ./deploy-metadata.Gadi \
  --output ./output.json

I then uploaded the output.json to the staging area manually and verified its validity. The ACCESS-TEST model in the staging database can be found at https://reporting-dev.access-nri-store.cloud.edu.au/release-provenance/releases/20/.

Release - Outputs Posted Via Workflow ✔️

Using a test Gadi Release GitHub Environment, I merged (after fixes, multiple) PRs that ran through the entire workflow to success. Successfully posted provenance, see https://github.com/ACCESS-NRI/ACCESS-TEST/actions/runs/14767933751/job/41463262076#step:7:15, and the model in the staging database can be found at https://reporting-dev.access-nri-store.cloud.edu.au/release-provenance/releases/21/.

@CodeGat CodeGat added type:enhancement Improvements to existing features priority:medium version:MAJOR Requires an update to Model Deployment Repositories CI for:v5 Applies to `v5` labels Apr 28, 2025
@CodeGat CodeGat self-assigned this Apr 28, 2025
@CodeGat CodeGat linked an issue Apr 28, 2025 that may be closed by this pull request
@CodeGat CodeGat force-pushed the 263-release-provenance-2.0 branch from 82f0685 to 0883f68 Compare April 29, 2025 05:45
@CodeGat CodeGat changed the base branch from v4 to v5 April 29, 2025 06:19
@CodeGat CodeGat force-pushed the 263-release-provenance-2.0 branch from e8bdc20 to 450dd80 Compare May 1, 2025 01:39
@CodeGat CodeGat marked this pull request as ready for review May 1, 2025 02:13
@CodeGat CodeGat requested a review from tmcadam May 1, 2025 02:15
@CodeGat CodeGat force-pushed the 263-release-provenance-2.0 branch from 615e9e5 to 969c360 Compare May 1, 2025 03:30
Copy link
Copy Markdown

@tmcadam tmcadam left a comment

Choose a reason for hiding this comment

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

Had a detailed run of this PR with Tommy and happy with all that is in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

for:v5 Applies to `v5` priority:medium type:enhancement Improvements to existing features version:MAJOR Requires an update to Model Deployment Repositories CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release Provenance DB Upgrade (Client Side)

2 participants