Skip to content

ci: require secrets.PYCLOUDLIB_TOML, add lxd_vm and ec2 scheduled jobs#6715

Open
blackboxsw wants to merge 9 commits intocanonical:mainfrom
blackboxsw:ci-lxd-vm
Open

ci: require secrets.PYCLOUDLIB_TOML, add lxd_vm and ec2 scheduled jobs#6715
blackboxsw wants to merge 9 commits intocanonical:mainfrom
blackboxsw:ci-lxd-vm

Conversation

@blackboxsw
Copy link
Copy Markdown
Collaborator

Improve our public scheduled integration test coverage to cover lxd_vm and ec2 platforms.

Add assertion on a non-empty Github repo-level secret named PYCLOUDLIB_TOML which will
be written to .config/pycloudlib.toml and used as runtime integration test configuration for pycloudlib.

Add an assertion step in _integration_common.yml to error when
secrets.PYCLOUDLIB_TOML is absent and conditional logic which skips
each integration test step to avoid wasting runner cycles on integration tests.

Proposed Commit Message

See individual commits

Additional Context

Test Steps

Failed run example empty or absent secret PYCLOUDLIB_TOML https://github.com/blackboxsw/cloud-init/actions/runs/21699149948/job/62575866822

Success RUN with PYCLOUDLIB_TOML secret set to "[lxd]"

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

@blackboxsw blackboxsw force-pushed the ci-lxd-vm branch 2 times, most recently from 4f73b0f to ed8690d Compare February 5, 2026 05:20
@blackboxsw blackboxsw marked this pull request as draft February 5, 2026 05:21
Copy link
Copy Markdown
Member

@holmanb holmanb left a comment

Choose a reason for hiding this comment

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

first pass

Comment on lines +94 to +96
awk '/cloud-init version: /{printf DEB_VERSION=$NF; exit}' pytest-${{ inputs.platform }}-${{ inputs.release }}-${{ inputs.image_type }}.log
awk '/image-serial: /{printf IMAGE_SERIAL=$NF; exit}' pytest-${{ inputs.platform }}-${{ inputs.release }}-${{ inputs.image_type }}.log
shell: bash
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is are the awk commands doing here?

And why bash?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ahh I was going to use these to help create a top-level report output that would announce what version of cloud-init was installed during the test. I'll drop this from this PR until I have a working approach. I didn't like how opaque our GH workflow runs are when compared to jenkins jobs which announce the version of cloud-init being tested.

Copy link
Copy Markdown
Collaborator Author

@blackboxsw blackboxsw Feb 11, 2026

Choose a reason for hiding this comment

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

I was originally stuffing env vars them into GITHUB_ENV per these docs and the ctrf.io step can extract and use the environment variables for report headers or summary.

@holmanb holmanb self-assigned this Feb 5, 2026
@holmanb holmanb added the incomplete Action required by submitter label Feb 10, 2026
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup LXD
if: ${{ env.REQUIRED_SECRET != '' and contains(fromJSON('["lxd_vm", "lxd_container"]'), env.CLOUD_INIT_PLATFORM ) }}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Avoid the setup-lxd step if we are not on CLOUD_INIT_OS_PLATFORM lxd_container of lxd_vm.

@blackboxsw blackboxsw requested a review from holmanb February 11, 2026 23:27
@blackboxsw blackboxsw removed the incomplete Action required by submitter label Feb 11, 2026
@blackboxsw blackboxsw marked this pull request as ready for review February 13, 2026 04:32
Comment on lines +67 to +68
test '${{ secrets.PYCLOUDLIB_TOML }}' != '' || echo "ERROR: Missing required repo secrets.PYCLOUDLIB_TOML non-empty value."
test '${{ secrets.PYCLOUDLIB_TOML }}' == '' && exit 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This checks for the same thing twice, I think an if / else would be cleaner

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done. We only really care to exit 1 in the face of no secrets.PYCLOUDLIB_TOML or empty string. So, I just put the operation in a single if clause.

- name: Checkout
if: ${{ env.REQUIRED_SECRET != '' }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since env.REQUIRED_SECRET is assigned from secrets.PYCLOUDLIB_TOML, and the first step has an exit 1 when secrets.PYCLOUDLIB_TOML is empty, is this not redundant?

Same comment elsewhere.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Dropped all unneessary conditionals checks. An exit 1 above will prevent running these steps anyway.

@holmanb holmanb added the incomplete Action required by submitter label Feb 26, 2026
@blackboxsw blackboxsw force-pushed the ci-lxd-vm branch 5 times, most recently from 80d80a4 to 0c75a04 Compare March 10, 2026 21:02
@holmanb
Copy link
Copy Markdown
Member

holmanb commented Mar 16, 2026

@blackboxsw let me know when this is ready for re-review

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

Labels

incomplete Action required by submitter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants