-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat!: add the ability to deprecate a prebuilt provider #370
Merged
Conversation
This file contains 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
xiehan
force-pushed
the
deprecation-workflow
branch
from
December 13, 2023 10:50
12463af
to
ad3dcc2
Compare
xiehan
force-pushed
the
deprecation-workflow
branch
2 times, most recently
from
December 13, 2023 14:42
c2ba14b
to
f4ffe43
Compare
Signed-off-by: team-tf-cdk <[email protected]>
Signed-off-by: team-tf-cdk <[email protected]>
xiehan
force-pushed
the
deprecation-workflow
branch
from
December 14, 2023 11:52
71dfad0
to
8d6bd59
Compare
xiehan
changed the title
feat: add the ability to deprecate a prebuilt provider
feat!: add the ability to deprecate a prebuilt provider
Dec 14, 2023
xiehan
requested review from
mutahhir and
ansgarm
and removed request for
a team
December 14, 2023 12:18
DanielMSchmidt
approved these changes
Dec 15, 2023
xiehan
added a commit
to cdktf/cdktf-repository-manager
that referenced
this pull request
Dec 15, 2023
cdktf/cdktf-provider-project#370 must be merged and published before this has any effect.
I'm going to lock this pull request because it has been closed for at least 7 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue so we can investigate further. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
While this is not technically a breaking change, I want to force this to be released as v0.5.0 so that it's easier to roll back to v0.4.x in case there are any issues with this in testing.
At its core, this change is relatively simple: it introduces an
isDeprecated
flag on the config for providers built using this project that defaults to falsy. All the new behavior is controlled by that flag, so it should mean that this is safe to merge, as no new functionality will be triggered for any providers unless/until they are marked as deprecated.(There technically is also a new option called
deprecationDate
-- in practice I don't intend to use that and will just rely on the build date; however, in order to not have the test snapshots be regenerated every day with a new date, I needed a way to force-override thenew Date()
behavior.)If the
isDeprecated
flag is set totrue
, then the following happens:PyPi and Maven unfortunately don't support deprecating an entire package. NuGet does, but there's no API/CLI for it; it has to be done via the web UI.
While it's huge, looking at the test snapshot file might be the best way to visualize the changes. The first example in that file is of a provider that's been marked as deprecated -- in particular, scrolling down to the README will demonstrate what that looks like for a deprecated provider. The other snapshots demonstrate that there shouldn't be any unintentional outcomes for providers that have not been explicitly marked as deprecated.
Side note: while I was working on this I realized that hashicorp/terraform-cdk#2575 is very important now because we link to https://cdk.tf/imports a lot to explain how to manually generate bindings, but some of the examples there incorrectly use the prebuilt providers, so I have added that issue to our next release.