Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

Rose-Northey
Copy link
Contributor

@Rose-Northey Rose-Northey commented Oct 6, 2025

Description of change

The retention_policy block will be removed and replaced with retention_with_strategy, a retention block which uses the new "strategy" attribute. Due to deprecation requirements, both blocks must be available for use for 12 months before the old retention block can be officially deleted. This PR enables either block to be used to set retention for a single lifecycle. This is step 2 of the diagram below.

image

sc-123512

PR 2

Results

Resource Use

Only one type of retention block can be used in a single lifecycle.

  • release_retention_policy and tentacle_retention_policy
  • OR release_retention_with_strategy and tentacle_retention_with_strategy
    When one retention block is used the other will appear in the state as an empty block shown in the image below:
image
  • retention_policy block use will display deprecation warnings

Datasource Use

The datasource displays both types of data with a warning to disregard the retention_policy as it may display inaccurate data due to not being able to display a "Default" retention setting.
image
image

@Rose-Northey Rose-Northey force-pushed the fnm/add-retention-block-without-strategy branch from 234a19d to 88833b4 Compare October 8, 2025 22:28
@Rose-Northey Rose-Northey marked this pull request as ready for review October 10, 2025 01:01
# Conflicts:
#	octopusdeploy_framework/datasource_lifecycle.go
#	octopusdeploy_framework/datasource_lifecycle_test.go
#	octopusdeploy_framework/resource_lifecycle.go
#	octopusdeploy_framework/resource_lifecycle_retention_test.go
#	octopusdeploy_framework/resource_lifecycle_test.go
#	octopusdeploy_framework/schemas/lifecycle.go
octopusdeploy_framework/schemas/lifecycle.go Show resolved Hide resolved
Copy link
Contributor

@susanpann susanpann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! Just 2 comments to consider, may need to review the names for the tests in resource_lifecycle_test.go

@Rose-Northey Rose-Northey merged commit 0cedc69 into main Oct 17, 2025
19 checks passed
@Rose-Northey Rose-Northey deleted the fnm/add-retention-block-without-strategy branch October 17, 2025 03:18
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.