Skip to content

Conversation

@DanielMSchmidt
Copy link
Contributor

@DanielMSchmidt DanielMSchmidt commented Dec 11, 2025

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

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

@DanielMSchmidt DanielMSchmidt requested a review from a team as a code owner December 11, 2025 12:47
@DanielMSchmidt DanielMSchmidt added the no-changelog-needed Add this to your PR if the change does not require a changelog entry label Dec 11, 2025
@DanielMSchmidt DanielMSchmidt force-pushed the add-deprecation-surpression-tracking branch from 5402a27 to 008e320 Compare December 11, 2025 12:49

func (d *Deprecations) IsModuleCallDeprecationSuppressed(addr addrs.Module) bool {
for _, mod := range d.suppressedModules {
if addr.Equal(mod) || mod.TargetContains(addr) {
Copy link
Member

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?

Copy link
Contributor Author

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
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 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

Copy link
Contributor Author

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!

@DanielMSchmidt DanielMSchmidt force-pushed the add-deprecation-surpression-tracking branch from 008e320 to 8b295d5 Compare December 12, 2025 13:31
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.
@DanielMSchmidt DanielMSchmidt force-pushed the add-deprecation-surpression-tracking branch from 8b295d5 to 2746850 Compare December 12, 2025 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-needed Add this to your PR if the change does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants