feat: add method for migrating proxies without environment validation #2056
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.
This method is necessary to add because we're migrating the proxy keys in unleash cloud and we have instances with proxies enabled for environments that might be disabled. The current method will throw a bad data error in this instance, because we do not allow you to create API token for disabled environments. Caused by this line: https://github.com/Unleash/unleash/pull/2056/files#diff-c7747d86059ec3422885e79411b8ef7323c0804df081c110268dd3250ace3696R167
This is a useful validation to have, but in this instance it's blocking a migration that needs to happen regardless of whether or not the environment is disabled, because we might have users that have added configuration and are actively using that configuration in environments that have later been disabled.