Skip to content

feat!: migrate packagecloud to custom resources#91

Merged
damacus merged 1 commit into
mainfrom
feat/migrate-packagecloud-custom-resources
May 12, 2026
Merged

feat!: migrate packagecloud to custom resources#91
damacus merged 1 commit into
mainfrom
feat/migrate-packagecloud-custom-resources

Conversation

@damacus
Copy link
Copy Markdown
Member

@damacus damacus commented May 12, 2026

What changed

Selected cookbook: packagecloud

This is a Full Migration of the remaining legacy attribute API to the existing packagecloud_repo custom resource:

  • removed attributes/ and moved the node['packagecloud'] defaults to explicit resource properties
  • added provides :packagecloud_repo, frozen string headers, default_action :add, and :remove actions
  • moved the Kitchen test cookbook from test/fixtures/cookbooks/test to test/cookbooks/test
  • added ChefSpec step-into coverage for APT, RPM, RubyGems, and remove behavior
  • converted the InSpec profile to inspec.yml + controls/ without supports
  • added LIMITATIONS.md, migration.md, and updated resource documentation
  • refreshed Kitchen and CI platform matrices to supported non-EOL platforms
  • updated CI to use sous-chefs/.github/.github/actions/install-workstation@6.0.0

Full Migration structural result:

  • root recipes/ is absent
  • root attributes/ is absent
  • final structural audit was run locally and confirmed the expected migrated cookbook layout

Platform and support evidence

packagecloud.io documents support for RPM, DEB, Debian source, RubyGems, Python, Node.js, Alpine, Maven, Helm, and generic files. The packagecloud_repo resource continues to manage APT/DEB, YUM/DNF/RPM, and RubyGems repository sources.

Platform matrix changes preserve non-EOL support that the resource can actually exercise:

  • kept/added: AlmaLinux 8/9, Amazon Linux 2023, CentOS Stream 9, Debian 12, Fedora latest, Oracle Linux 8/9, Rocky Linux 8/9, Ubuntu 22.04/24.04
  • removed: CentOS Linux 7, CentOS Stream 8, Debian 10/11, Ubuntu 18.04/20.04, Oracle Linux 7, Scientific Linux, openSUSE Leap
  • openSUSE Leap was removed because the resource has no Zypper implementation and defaults only map Debian, RHEL, Fedora, and Amazon platform families

The public packagecloud test repository has Ubuntu jammy metadata but not noble or any/any; the Ubuntu 24.04 Kitchen test therefore verifies repository configuration using the available jammy test repo metadata. The sample package itself was not installed because no candidate package is available for this arm64 Dokken host.

Workflow permission sources checked

Checked exact upstream refs before workflow edits:

  • sous-chefs/.github/.github/workflows/lint-unit.yml@6.0.0
    • reusable check-metadata job requires checks: write, pull-requests: write, and statuses: write; caller grants only those permissions for lint-unit
  • sous-chefs/.github/.github/workflows/release-cookbook.yml@6.0.0
    • requires token, supermarket_user, supermarket_key, slack_bot_token, and slack_channel_id
    • release caller permissions cover release-please, artifact attestation, package publishing, and pull request/issue writes
  • sous-chefs/.github/.github/actions/install-workstation/action.yml@6.0.0
    • no extra caller permissions required
  • sous-chefs/.github/.github/workflows/prevent-file-change.yml@6.0.0
    • nested jobs require pull-requests: write; caller grants that permission
    • nested action checked: xalvarez/prevent-file-change-action@v3

Verification

cookstyle
Inspecting 10 files
..........

10 files inspected, no offenses detected
chef exec rspec --format documentation
16 examples, 0 failures
KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen test default-ubuntu-2404 --destroy=always
Infra Phase complete, 0/12 resources updated in 05 seconds
Profile Summary: 2 successful controls, 0 control failures, 0 controls skipped
Test Summary: 3 successful, 0 failures, 0 skipped
Test Kitchen is finished.

Additional checks:

berks install
Using packagecloud (2.0.10) from source at .
Using test (0.1.0) from source at test/cookbooks/test
Using yum (8.0.0)
markdownlint-cli2 '**/*.md'
Summary: 0 error(s)
yamllint .
exit 0
git diff --check
exit 0

GitHub Actions passed on the PR across lint/unit, prevent-file-change, metadata validation, and the full integration matrix.

@damacus damacus requested a review from a team as a code owner May 12, 2026 08:53
@damacus damacus added the Release: Major Release to Chef Supermarket as a major change when merged label May 12, 2026
@damacus damacus force-pushed the feat/migrate-packagecloud-custom-resources branch 2 times, most recently from ce1260e to d182ab4 Compare May 12, 2026 09:09
@damacus damacus force-pushed the feat/migrate-packagecloud-custom-resources branch from d182ab4 to b77886a Compare May 12, 2026 09:28
@github-actions
Copy link
Copy Markdown

Slowest examples

Top 10 slowest examples (0.61 seconds, 72.13% of total time)
Example Description Time in seconds
spec/unit/resources/repo_spec.rb:43 packagecloud_repo on ubuntu with default properties is expected not to run execute "apt-get-update-test_repo" 0.17209
spec/unit/resources/repo_spec.rb:39 packagecloud_repo on ubuntu with default properties is expected to install package "apt-transport-https" 0.06038
spec/unit/resources/repo_spec.rb:38 packagecloud_repo on ubuntu with default properties is expected to install package "wget" 0.05969
spec/unit/resources/repo_spec.rb:84 packagecloud_repo on almalinux with action :remove is expected to delete file "/etc/yum.repos.d/test_repo.repo" 0.05128
spec/unit/resources/repo_spec.rb:41 packagecloud_repo on ubuntu with default properties is expected to create template "/etc/apt/sources.list.d/test_repo.list" 0.05025
spec/unit/resources/repo_spec.rb:40 packagecloud_repo on ubuntu with default properties is expected to install package "lsb-release" 0.05023
spec/unit/resources/repo_spec.rb:42 packagecloud_repo on ubuntu with default properties is expected not to run execute "apt-key-add-test_repo" 0.04705
spec/unit/resources/repo_spec.rb:54 packagecloud_repo on ubuntu with action :remove is expected to delete file "/etc/apt/sources.list.d/test_repo.list" 0.04368
spec/unit/resources/repo_spec.rb:105 packagecloud_repo with gem source with action :add is expected to run execute "install packagecloud test/repo repo as gem source" 0.04136
spec/unit/resources/repo_spec.rb:55 packagecloud_repo on ubuntu with action :remove is expected not to update apt_update "apt-get-update-test_repo" 0.04111

@damacus damacus merged commit 9aff449 into main May 12, 2026
22 checks passed
@damacus damacus deleted the feat/migrate-packagecloud-custom-resources branch May 12, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release: Major Release to Chef Supermarket as a major change when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant