Skip to content

Commit 4f36f56

Browse files
authored
Do not add 'development' in generated pipeline configuration (#3824)
## Changes Do not add 'development' in the generated pipeline configuration ## Why This field is specific to the mode in which the pipeline is running and can be irrelevant for the generated config. Otherwise it is possible to run into the issues like ``` Error: target with 'mode: production' cannot include a pipeline with 'development: true' ``` ## Tests Exisiting acceptance test pass <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
1 parent 39f97a5 commit 4f36f56

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

acceptance/bundle/generate/pipeline/test.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Response.Body = '''
55
"pipeline_id": 1234,
66
"spec": {
77
"name": "generate-pipeline",
8+
"development": true,
89
"clusters": [
910
{
1011
"custom_tags": {

bundle/generate/pipeline.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ func ConvertPipelineToValue(pipeline *pipelines.PipelineSpec, rootPath, remoteRo
2929
// - id: this is a read-only field
3030
// - storage: changes to this field are rare because changing the storage recreates pipeline-related resources
3131
// - edition: this field is rarely changed
32-
return yamlsaver.ConvertToMapValue(pipeline, pipelineOrder, []string{"id", "storage", "edition"}, value)
32+
// - development: this field is specific to the mode where it's used and does not need to be saved to the bundle configuration.
33+
return yamlsaver.ConvertToMapValue(pipeline, pipelineOrder, []string{"id", "storage", "edition", "development"}, value)
3334
}

0 commit comments

Comments
 (0)