feat!: migrate nodejs to custom resources#306
Merged
Conversation
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Convert the cookbook from recipes and attributes to custom resources with resource documentation and migration guidance. Verification: berks install; cookstyle; ruby -c on changed Ruby files; chef exec rspec --format documentation; KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen test default-ubuntu-2404 --destroy=always.
18178c4 to
6482253
Compare
Slowest examplesTop 10 slowest examples (1.88 seconds, 43.67% of total time)
|
This was referenced May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Selected cookbook:
nodejsThis is a Full Migration from the legacy recipe/attribute API to a custom-resource-only public API.
nodejs_install,nodejs_repository,nodejs_npm_install, andnodejs_npm_packagesresources.npm_packageresource and helper coverage.recipes/and rootattributes/.migration.md,LIMITATIONS.md, ChefSpec coverage, and full InSpec profiles.Verification
berks installnodejs, localtest,ark,chocolatey,git,seven_zip, andyum.chef exec ruby -conresources/*.rb, resource partials, andlibraries/nodejs_helper.rbSyntax OK.cookstylechef exec rspec --format documentationKITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen test default-ubuntu-2404 --destroy=alwaysKITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen test package-ubuntu-2404 --destroy=alwaysKITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen test source-oraclelinux-8 --destroy=always-mbranch-protection=standard. The GitHub Actions suite validates this same platform on the x86_64 runner where the original CI failure occurred.actionlint,yamllint .github/workflows, andgit diff --checkpassed.ls -Rwas run locally.recipes/is absent.attributes/is absent.test/cookbooks/test/recipesand fulltest/integration/*/inspec.ymlprofiles are present.Platform and Support Evidence
Node.js is still actively supported and useful as a managed runtime. The migrated resource defaults target NodeSource package repositories for package installs, preserve binary/source install modes through
ark, and keep Windows Chocolatey coverage in the resource API and tests.Active Kitchen/CI coverage is focused on current non-EOL Linux platforms supported by the cookbook's package/binary workflows, including AlmaLinux 8-10, Amazon Linux 2023, CentOS Stream 9-10, Debian 12-13, Fedora latest, Oracle Linux 8-9, Rocky Linux 8-10, and Ubuntu 22.04/24.04. EOL platforms were removed from active testing.
Workflow Permission Sources Checked
Checked exact upstream files before changing caller permissions:
sous-chefs/.github/.github/workflows/lint-unit.yml@6.0.0dot-githubtag6.0.0.check-metadatarequireschecks: write,pull-requests: write, andstatuses: write; caller grants those pluscontents: readfor checkout paths.actions: writeandissues: write.sous-chefs/.github/.github/workflows/prevent-file-change.yml@6.0.0dot-githubtag6.0.0.pull-requests: write; caller grantspull-requests: write.sous-chefs/.github/.github/workflows/conventional-commits.yml@6.0.0dot-githubtag6.0.0.pull-requests: read; caller grantspull-requests: read.sous-chefs/.github/.github/workflows/release-cookbook.yml@6.0.0dot-githubtag6.0.0.token,supermarket_user,supermarket_key,slack_bot_token, andslack_channel_id.sous-chefs/.github/.github/actions/install-workstation/action.yml@6.0.0dot-githubtag6.0.0; CI and Copilot setup use the pinned Cinc Workstation installer action.googleapis/release-please-action@v4README: release workflow keepscontents: write,issues: write, andpull-requests: write.actions/upload-artifact@v7/action.yml: no extra caller permission identified beyond release job needs.actions/attest-build-provenance@v4/action.yml: wrapsactions/attest@59d89421af93a897026c735860bf21b6eb4f7b26.actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26README: release workflow keepsid-token: write,attestations: write, andartifact-metadata: write.slackapi/slack-github-action@v3.0.1/action.yml: Slack token is passed as an input; no extra caller permission identified.BREAKING CHANGE: root
nodejs::recipes andnode['nodejs']attributes have been removed. Consumers should declare thenodejs_*resources directly.