v1.122.0: namespaced config file naming with legacy fallback#87
Merged
Conversation
The base config is now rackstack.config.json and company overrides are <company>.rackstack.config.json, so the files stay unambiguous when the EXE or monolithic script runs from a shared folder. Fully backward compatible: legacy defaults.json and <company>.defaults.json are still read whenever the new-named file is absent (per file), and the tool keeps saving to whichever file it loaded. - Get-RackStackConfigPath resolves the base config once at init (prefer new name, fall back to legacy, create new name when neither exists); the first-run wizard and defaults editor write through the resolved path - Get-CompanyDefaultsFiles discovers company files under both naming schemes, deduped per company key with the new name winning; also fixes a latent bug where the returned array nested inside callers' @() wrappers and collapsed multiple companies into one entry - Save picker, menus, and prompts show the actually-loaded filename - Exit cleanup removes config files under both schemes plus company files and crash-leftover .tmp siblings; the company-file wildcard sweeps are gated to directories identifiable as the tool's own home so shared folders are never glob-swept - Example template renamed to rackstack.config.example.json and the release asset list updated to match - .gitignore covers both schemes; the tracked example stays tracked - Docs, wiki-facing guides, issue templates, and the config guide updated; company config files now documented with the fallback rules - New test section covers resolution order, dual-name company discovery, cleanup gating, .gitignore, and release-asset pins
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Adopts the namespaced config-file naming convention: the base config becomes
rackstack.config.jsonand company overrides become<company>.rackstack.config.json, with full backward compatibility.What changes
rackstack.config.jsonis used when it exists; otherwise a legacydefaults.jsonis still read. The same rule applies to each company file (<company>.rackstack.config.jsonpreferred over<company>.defaults.json), with the new name winning when both exist._companyDefaultsselection and multi-company support are unchanged.Get-CompanyDefaultsFiles) enumerates both schemes, deduped per company key. Also fixes a latent array-nesting bug that collapsed multiple company files into one picker entry..tmpsiblings; the wildcard sweeps are gated to directories identifiable as the tool's own home so a shared folder is never glob-swept.rackstack.config.example.json(release asset list updated in the same change)..gitignore, and release-asset pins. Suite: 5402 structural + 312 Pester, all passing; PSSA 0 errors.Compatibility
No action needed for existing deployments: a machine with only
defaults.json(or<company>.defaults.json) continues to load and save that file. Renaming the file to the new scheme opts in at any time.