Skip to content

Commit be949de

Browse files
committed
Merge branch 'main' into rosen/add-DeletePackagesAssociatedWithReleases-property
2 parents c4e1314 + 4108360 commit be949de

File tree

5 files changed

+47
-9
lines changed

5 files changed

+47
-9
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
workflow_dispatch:
77
jobs:
88
build:
9+
name: Validate Docs
910
runs-on: ubuntu-latest
1011
steps:
1112
- uses: actions/checkout@v3

.github/workflows/integration-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103

104104
tests-combine-summaries:
105105
if: always()
106-
name: Combine Test Reports
106+
name: Ensure Tests Pass
107107
needs: [ tests ]
108108
runs-on: ubuntu-latest
109109
steps:

.github/workflows/prevent-new-sdk-additions.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
jobs:
1212
detect-new-sdk-files:
13+
name: Prevent New SDK Files
1314
runs-on: ubuntu-latest
1415

1516
steps:

docs/guides/design-decisions.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,34 @@ This document is to explain our stance on certain implementation decisions for t
99

1010
## Version-Controlled Projects and Terraform
1111

12-
When managing Deployment Processes and Runbooks you can do two things
12+
When managing Deployment Processes and Runbooks, you can choose one of two options. Either:
1313

1414
1. Define a Database-backed Project and its Process(es) in Terraform
15+
16+
*or*
17+
1518
2. Define a Version-Controlled Project and its settings in Terraform, but define the Process as OCL in Git
1619

1720
~> We won’t allow you to try to manage the Process of a Version-Controlled Project in Terraform, and will give an informative error message if you try.
1821

1922
### Why
20-
There should be one source-of-truth for your as-code interactions with Octopus.
23+
We believe if you're going to version control your config, then you should have one clear source-of-truth for each resource you're defining. Allowing you to define the process of a Version-Controlled Project through Terraform breaks that principle: which is the source of truth, the Terraform or the Project's OCL?
24+
25+
Terraform can’t nicely support all the richness that Version Control and Git provide (managing multiple branches, diverging processes etc), so attempting to allow you to define a Process in Terraform, and expect to have that write Git commits to the underlying OCL of a Version-Controlled project is a recipe for a bad time.
26+
27+
We want to let both Terraform, and Version Controlled Projects do what they do best, and not blur the lines between the two.
28+
29+
## Processes: Property Bags vs Strongly Typed Steps
30+
31+
For v1.0, we've moved away from strongly-typed steps, and leaned in to the key-value-pair Property bag.
32+
33+
### Why
34+
In versions of the provider before v1.0, we experimented with both leaning on the Properties bag when defining a Step, and with providing strongly-typed Resources specific to each step. The result was a compromise between the two approaches: some properties were set via strongly typed attributes, and some needed to be set in the properties bag.
35+
36+
It was hard to know which should be set where, and you could easily run into conflicts and state-drift when using a strongly-typed attribute when available (such as the `run_on_server` attribute), where Octopus Server would respond with elements in the property bag.
37+
38+
From a maintenance perspective, we currently don't have an easy way to generate these strongly-typed step representations, so each needs to be manually crafted and kept in sync with Octopus Server. This creates a maintenance burden that resulted in a bad experience for our Terraform Provider users.
2139

22-
Terraform can’t nicely support all the richness that Version Control and Git provide (managing multiple branches, diverging processes etc).
40+
For the immediate future, the new Process resource will not have strongly-typed steps, and you'll need to use the properties bag instead. We've provided guidance on how to easily find the right properties for your step.
2341

24-
We want to let Version Control do what it does best, and not blur the lines between the two.
42+
In the medium-longer term, we would like to rearchitect the way our steps are defined in Octopus, which would enable us to lean on code generation to provide strongly typed step resources that are easily kept in sync with Octopus Server. The architectural improvements we've made in the Provider with the new Process resource set us up to be able to adopt strongly-typed steps without the previous state-drift issues, once we're able to do it in a maintainable way.

templates/guides/design-decisions.md.tmpl

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,34 @@ This document is to explain our stance on certain implementation decisions for t
99

1010
## Version-Controlled Projects and Terraform
1111

12-
When managing Deployment Processes and Runbooks you can do two things
12+
When managing Deployment Processes and Runbooks, you can choose one of two options. Either:
1313

1414
1. Define a Database-backed Project and its Process(es) in Terraform
15+
16+
*or*
17+
1518
2. Define a Version-Controlled Project and its settings in Terraform, but define the Process as OCL in Git
1619

1720
~> We won’t allow you to try to manage the Process of a Version-Controlled Project in Terraform, and will give an informative error message if you try.
1821

1922
### Why
20-
There should be one source-of-truth for your as-code interactions with Octopus.
23+
We believe if you're going to version control your config, then you should have one clear source-of-truth for each resource you're defining. Allowing you to define the process of a Version-Controlled Project through Terraform breaks that principle: which is the source of truth, the Terraform or the Project's OCL?
24+
25+
Terraform can’t nicely support all the richness that Version Control and Git provide (managing multiple branches, diverging processes etc), so attempting to allow you to define a Process in Terraform, and expect to have that write Git commits to the underlying OCL of a Version-Controlled project is a recipe for a bad time.
26+
27+
We want to let both Terraform, and Version Controlled Projects do what they do best, and not blur the lines between the two.
28+
29+
## Processes: Property Bags vs Strongly Typed Steps
30+
31+
For v1.0, we've moved away from strongly-typed steps, and leaned in to the key-value-pair Property bag.
32+
33+
### Why
34+
In versions of the provider before v1.0, we experimented with both leaning on the Properties bag when defining a Step, and with providing strongly-typed Resources specific to each step. The result was a compromise between the two approaches: some properties were set via strongly typed attributes, and some needed to be set in the properties bag.
35+
36+
It was hard to know which should be set where, and you could easily run into conflicts and state-drift when using a strongly-typed attribute when available (such as the `run_on_server` attribute), where Octopus Server would respond with elements in the property bag.
37+
38+
From a maintenance perspective, we currently don't have an easy way to generate these strongly-typed step representations, so each needs to be manually crafted and kept in sync with Octopus Server. This creates a maintenance burden that resulted in a bad experience for our Terraform Provider users.
2139

22-
Terraform can’t nicely support all the richness that Version Control and Git provide (managing multiple branches, diverging processes etc).
40+
For the immediate future, the new Process resource will not have strongly-typed steps, and you'll need to use the properties bag instead. We've provided guidance on how to easily find the right properties for your step.
2341

24-
We want to let Version Control do what it does best, and not blur the lines between the two.
42+
In the medium-longer term, we would like to rearchitect the way our steps are defined in Octopus, which would enable us to lean on code generation to provide strongly typed step resources that are easily kept in sync with Octopus Server. The architectural improvements we've made in the Provider with the new Process resource set us up to be able to adopt strongly-typed steps without the previous state-drift issues, once we're able to do it in a maintainable way.

0 commit comments

Comments
 (0)