Ci rename filter tests param - #7048
blackboxsw wants to merge 7 commits into
Conversation
Create oci workflow integration test coverage for Oracle on Ubuntu Jammy, Noble, Resolute and Stonking scheduled twice-weekly: - Mon & Thu, cron '2 22 * * 1,4 Extend the shared 100-dispatch-common.yml workflow: - add 'oci' to the workflow_dispatch platform choice list - add two optional secrets PYCLOUDLIB_OCI_CONFIG_B64 / PYCLOUDLIB_OCI_KEY_B64 to workflow_call.secrets - pass PYCLOUDLIB_OCI_CONFIG_FILE_PATH / PYCLOUDLIB_OCI_KEY_FILE_PATH to the Run integration Tests step env - clean up the oci dir in the Clean pycloudlib step
Replace the reusable workflow .github/workflows/100-dispatch-common.yml with a composite action .github/actions/integration-test that contains the shared integration-test steps (secret assertion, checkout, LXD/SSH/ pycloudlib setup, tox run, report publish, cleanup). OCI-specific secret validation and credential setup are pulled out of the common path and moved into steps within each 15*oci.yml scheduled workflow, which write the OCI config/key to $RUNNER_TEMP/oci before invoking the composite action. All 16 scheduled integration workflows (4 OCI, 4 EC2, 8 LXD) now call the composite action directly with job-level env secret mappings, matching the repo's existing composite-action convention (.github/actions/create-sru-bug). Behavior is preserved; the canonical/cloud-init repository guard moves from the reusable workflow job onto each calling job.
The 15*oci.yml workflows run OCI-specific steps before invoking the local composite action ./.github/actions/integration-test. GitHub requires action.yml to exist on the runner to load a local action, so actions/checkout must run first. Add a Checkout step at the top of each OCI workflow's job, ahead of the OCI secret assertion and credential setup steps.
The runner context is not available inside a composite action's runs
section at manifest-load time, so ${{ runner.temp }} expressions in
.github/actions/integration-test/action.yml caused workflow dispatch to
fail with "Unrecognized named-value: 'runner'". Add a required
runner_temp input to the composite action and replace its internal
${{ runner.temp }} references with ${{ inputs.runner_temp }}. All 16
caller workflows now pass runner_temp: ${{ runner.temp }} (the runner
context is available in workflow jobs).
The value is appended as trailing posargs to `tox -e integration-tests --` (after the hardcoded --junitxml/--color flags), not a pytest -k/-m keyword or marker filter expression. The old name implied keyword filtering, which a positional path/node-ID argument is not; callers passing a bare keyword would get a 'file or directory not found' error. Rename to test_posargs to reflect tox terminology for arguments forwarded after `--`, and update the description to document accepted forms (pytest flags and/or positional test paths/node IDs) plus the full-suite default. Updates the composite action, the dispatch-common reusable workflow, and all 20 daily integration workflows.
| Optional extra posargs appended to the `tox -e integration-tests` | ||
| invocation (after the hardcoded --junitxml/--color flags). Accepts |
There was a problem hiding this comment.
If the flags passed to tox change, this comment will be incorrect. I would try to avoid comments that create cross-code coupling like this.
There was a problem hiding this comment.
Dropped detailed representation of hard-coded params.
| pytest flags and/or positional test paths/node IDs. Defaults to the | ||
| full `tests/integration_tests` suite. |
There was a problem hiding this comment.
The Integration Tests step actually provides this value when test_posargs is empty. ${{ inputs.test_posargs || 'tests/integration_tests' }}. That's what the default comment is referencing. I've changed the description to be hopefully more clear.
|
Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close. If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging blackboxsw, and he will ensure that someone takes a look soon. (If the pull request is closed and you would like to continue working on it, please do tag blackboxsw to reopen it.) |
Followup to #6969 rename filter_tests -> test_posargs. Blocked by #6969 and now #7070
Proposed Commit Message
Additional Context
Only topmost commit applicable for review: 41db952
Await merge of #6969 before landing.
Test Steps
Merge type