Skip to content

Add Datadog::DeprecatedPin for phasing out Datadog::Pin usage#692

Merged
delner merged 1 commit into
0.20-devfrom
refactor/add_deprecated_pin
Feb 19, 2019
Merged

Add Datadog::DeprecatedPin for phasing out Datadog::Pin usage#692
delner merged 1 commit into
0.20-devfrom
refactor/add_deprecated_pin

Conversation

@delner

@delner delner commented Feb 19, 2019

Copy link
Copy Markdown
Contributor

In order to refactor some older integrations from Pin-based configuration to configuration objects, we need to deprecate the use of Pins in specific integrations as they migrate away.

This pull request introduces a Datadog::DeprecatedPin which can be mixed into an existing Datadog::Pin, to append warnings when it's accessed. Typically, integrations that use pins will mix in this module to add deprecation warnings, then override any behavior on their copy of the Pin to update their configuration where appropriate.

By implementing this, we can ease the transition to new configuration by notifying users of the change in behavior, while providing backwards compatibility for older configurations.

@delner delner added core Involves Datadog core libraries dev/refactor Involves refactoring existing components labels Feb 19, 2019
@delner delner added this to the 0.20.0 milestone Feb 19, 2019
@delner delner self-assigned this Feb 19, 2019
@delner
delner requested a review from brettlangdon February 19, 2019 17:35
@delner
delner changed the base branch from master to 0.20-dev February 19, 2019 17:50
@delner
delner merged commit fe4ed1a into 0.20-dev Feb 19, 2019
@delner
delner deleted the refactor/add_deprecated_pin branch February 19, 2019 22:33
@delner delner mentioned this pull request Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Involves Datadog core libraries dev/refactor Involves refactoring existing components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants