Skip to content
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

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

vvagaytsev
Copy link
Collaborator

@vvagaytsev vvagaytsev commented Feb 11, 2025

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 in apiVersion: garden.io/v2.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

  • If a migration guide is necessary, it can be written in a follow-up PR. We have a project task to compose a migration guide, so the guide will not be missed.
  • The reference docs generation has not been disabled yet. It can be done in a follow-up PR.

@vvagaytsev vvagaytsev marked this pull request as draft February 11, 2025 13:46
@vvagaytsev vvagaytsev changed the title chore(container): deprecate container Deploy action type chore(container): deprecate container Deploy action type in apiVersion: garden.io/v2 Feb 11, 2025
@vvagaytsev vvagaytsev marked this pull request as ready for review February 12, 2025 18:46
@vvagaytsev vvagaytsev enabled auto-merge February 12, 2025 18:46
* 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
Copy link
Member

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)

Copy link
Member

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,
Copy link
Member

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

Copy link
Member

@stefreak stefreak left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants