feat!: migrate mingw to custom resources#63
Open
damacus wants to merge 3 commits into
Open
Conversation
Migrates the cookbook to a custom-resource-only API. Removes the `mingw::default` recipe and `node['msys2']` attributes; their behavior moves to `source_url` / `checksum` properties on `msys2_package` and `mingw_get`. Replaces `seven_zip_archive` with built-in `remote_file` + `archive_file` (drops `seven_zip` dependency). Adds `:remove` action to `mingw_tdm_gcc` and aligns all three resources on `unified_mode true`, `provides`, `frozen_string_literal`, and modern `Mingw::Helpers` via `action_class`. CI pinned to sous-chefs reusable workflows @6.0.0; uses install-workstation@6.0.0; release.yml passes Slack secrets. Kitchen files consolidated to Windows-only (kitchen.yml for Vagrant, kitchen.exec.yml for `windows-latest` CI). Old serverspec dirs and fixture cookbooks removed in favor of InSpec profiles (`test/integration/<suite>/inspec.yml` + `controls/`) and the new `test::*` test cookbook recipes. Bumps `chef_version` floor to `>= 16.0`. BREAKING CHANGE: `mingw::default` recipe and `node['msys2']` attributes are gone. See `migration.md` for the upgrade path.
63ebeb9 to
be5df4c
Compare
Slowest examplesTop 10 slowest examples (0.25 seconds, 51.86% of total time)
|
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
mingw::defaultrecipe andnode['msys2']attributes; the cookbook now ships custom resources only.source_url/checksumproperties tomsys2_packageandmingw_getto replace the dropped node attributes.mingw_get,msys2_package,mingw_tdm_gcc) withprovides,frozen_string_literal,unified_mode true, missing:removeaction onmingw_tdm_gcc, andMingw::Helpersincluded viaaction_class.seven_zip_archivewith built-inremote_file+archive_file(drops theseven_zipcookbook dependency).chef_versionfloor to>= 16.0.kitchen.dokken.ymlandkitchen.global.yml; rewriteskitchen.ymlfor Vagrant on Windows Server 2019/2022 andkitchen.exec.ymlfor CI onwindows-latest(Server 2022).test/integration/<suite>/{inspec.yml,controls/}and replaces fixture cookbooks withtest/cookbooks/test/recipes/<suite>.rb.@6.0.0, swapsactionshub/chef-installforsous-chefs/.github/.github/actions/install-workstation@6.0.0, and addsslack_bot_token/slack_channel_idsecrets torelease.yml.msys2-tools64).Breaking changes
mingw::defaultrecipe removed.node['msys2']['url']andnode['msys2']['checksum']removed; usemsys2_package'ssource_urlandchecksumproperties.seven_zipcookbook is no longer a dependency.chef_versionminimum is now>= 16.0.See
migration.mdfor upgrade examples.Verification done in-session
cookstyle— 21 files inspected, 0 offenses.chef exec rspec --format documentation— 24 examples, 0 failures. Every resource hasstep_intocoverage; helpers have unit tests.KITCHEN_LOCAL_YAML=kitchen.exec.yml kitchen list— all 4 instances visible (default-windows-2022,tools32-windows-2022,tools64-windows-2022,msys2-tools64-windows-2022).ls -R) confirmsrecipes/,attributes/,files/,libraries/_helper.rb,test/fixtures/, andtest/integration/*/serverspec/are all gone.Verification deferred to CI
This is a Windows-only cookbook and the local dev host is macOS, so
kitchen testcannot run from the dev session. CI onwindows-latest(usingKITCHEN_LOCAL_YAML=kitchen.exec.yml) is the integration verifier — that's the gate this PR needs to clear before merge.Test plan
lint-unitworkflow passes (cookstyle + ChefSpec on the org runner)integrationmatrix passes for all 4 suites onwindows-latest:default(smoke MSYS2 base +base-devel)tools32(legacy 32-bit TDM-GCC +mingw_getpackages)tools64(legacy 64-bit TDM-GCC +mingw_getpackages)msys2-tools64(MSYS2 64-bit MinGW toolchain)prevent-file-changepassesrelease-pleaseopens a release PR bumpingmingwto 5.0.0 (driven byfeat!:/ BREAKING CHANGE)