feat!: remove ValidateSelectorsInEnvironment method#61
Conversation
[BREAKING CHANGE] Remove `ValidateSelectorsInEnvironment` method from `pkg/cldfutil/selectors.go`. This method is supposedly only used internally and in legacy changesets. This removes the method from the public API, and is replaced by local validation functions in the changesets.
|
👋 jkongie, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
There was a problem hiding this comment.
Pull request overview
Removes the exported ValidateSelectorsInEnvironment helper from pkg/cldfutil (public API) and replaces its usage with private, file-local validation functions within the changesets that need it.
Changes:
- Deleted
pkg/cldfutil/validators-style exported selector validation (ValidateSelectorsInEnvironment) frompkg/cldfutil. - Updated LINK token changesets to call a local
validateSelectorsInEnvironmenthelper instead of the removed exported function. - Updated legacy MCMS config changeset validation to use a local
validateSelectorsInEnvironmenthelper and removed the now-unneededcldfutilimport there.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/cldfutil/selectors.go | Removes the exported selector validation helper from the cldfutil public API. |
| link/changesets/deploy_link_token.go | Replaces cldfutil.ValidateSelectorsInEnvironment usage with a local validation function. |
| legacy/mcms/changesets/set_config_mcms.go | Replaces cldfutil.ValidateSelectorsInEnvironment usage with a local validation function and cleans up imports. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|




BREAKING CHANGE: Remove
ValidateSelectorsInEnvironmentmethod frompkg/cldfutil/selectors.go.This method is only used in internal legacy changesets. This removes the method from the public API, and is replaced by local validation functions in the relevant changesets packages.