-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(container): deprecate container Deploy
action type in apiVersion: garden.io/v2
#6840
base: main
Are you sure you want to change the base?
Conversation
The type was redundant was it was used in one place.
Just reorder some code, no other changes.
It's very similar to V1, the commons parts will be extracted in the next commit.
# Conflicts: # core/src/util/deprecations.ts
…> `reportApiV1DeprecatedFeatureUsage`
container Deploy
action typecontainer Deploy
action type in apiVersion: garden.io/v2
# Conflicts: # core/src/util/deprecations.ts
# Conflicts: # core/src/plugins/kubernetes/container/deployment.ts
* The version to be used if the project-level `apiVersion` is not defined | ||
* in the Garden config file. | ||
* | ||
* TODO(0.14): bump this to v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not defined, we always must assume v0 (as that is an indicator for v0 configs, as when using actions, specifying the field is mandatory)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We must keep the default at v0
@@ -28,7 +28,7 @@ describe("validateSchema", () => { | |||
}) | |||
|
|||
const config: BaseGardenResource = { | |||
apiVersion: GardenApiVersion.v1, | |||
apiVersion: defaultGardenApiVersion, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be more clear to hardcode the api version in tests; We might want to keep testing older api versions as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will only add a small number of deprecations; Is the additional complexity worth it in this case? I have the feeling that these deprecation warnings are easier and faster to implement in a relatively short-lived 0.14 branch, that we will eventually have once all the breaking changes have been implemented in main.
Then we can simply use the existing deprecation logic for the 0.14 deprecations.
What this PR does / why we need it:
This PR brings new class of deprecations that only will be reported as warnings when the project-level config uses
apiVersion: garden.io/v2
.Such warnings will not be printed in 0.13 (i.e. when
apiVersion: garden.io/v1
).This PR also deprecates the
container Deploy
type inapiVersion: garden.io/v2
.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: