-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Add deprecation surpression tracking #38000
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
base: add-deprecation-marks
Are you sure you want to change the base?
Add deprecation surpression tracking #38000
Conversation
5402a27 to
008e320
Compare
internal/deprecation/deprecation.go
Outdated
|
|
||
| func (d *Deprecations) IsModuleCallDeprecationSuppressed(addr addrs.Module) bool { | ||
| for _, mod := range d.suppressedModules { | ||
| if addr.Equal(mod) || mod.TargetContains(addr) { |
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.
Shouldn't TargetContains already be true if Equal is true?
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.
Good point, this is double it seems :D
| Forget bool | ||
| Actions *actions.Actions | ||
| // only allowed in the context of a destroy plan. | ||
| Forget bool |
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 the comment only applies to Forget? Probably add a line break in here to make it clear. I see Actions was grouped in here already, but I don't think that applies
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.
Oh yeah the comment is only for forget, I'll add a line break!
008e320 to
8b295d5
Compare
This struct tracks and validates deprecations in the context of a graph walk. We need a struct to keep track of the module calls that opt-out of deprecation warnings.
8b295d5 to
2746850
Compare
This PR adds a mechanism to track and supress deprecations on a module basis. For the full end-to-end implementation see #37795, this PR splits up that work into more reviewable chunks. This PR is based on #37999
Fixes #
Target Release
1.15.x
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
CHANGELOG entry