-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: workflowMetadata needs to be loaded into globalParams in both Ar…
…goServer and Controller (#8907) * fix: workflowMetadata needs to be loaded into globalParams in both ArgoServer and Controller Signed-off-by: Julie Vogelman <[email protected]> * fix: use the right condition for determining if template is set Signed-off-by: Julie Vogelman <[email protected]> * fix: need to make maps if nil Signed-off-by: Julie Vogelman <[email protected]> * docs: result of 'make codegen' Signed-off-by: Julie Vogelman <[email protected]> * Revert "docs: result of 'make codegen'" This reverts commit 68682d8. Signed-off-by: Julie Vogelman <[email protected]> * docs: result of 'make codegen' Signed-off-by: Julie Vogelman <[email protected]> * feat: unit test for operator.go for issue 8837 Signed-off-by: Julie Vogelman <[email protected]> * feat: unit test for validation of Labels and Annotations when Workflows reference WorkflowTemplates Signed-off-by: Julie Vogelman <[email protected]> * feat: fixing lint issues Signed-off-by: Julie Vogelman <[email protected]> * fix: empty commit Signed-off-by: Julie Vogelman <[email protected]> * fix: add an e2e test which verifies that a submitted WorkflowTemplate referencing a workflowMetadata label works Signed-off-by: Julie Vogelman <[email protected]> * fix: assert.Equal() terms were backward Signed-off-by: Julie Vogelman <[email protected]> * feat: add a unit test for LabelsFrom Signed-off-by: Julie Vogelman <[email protected]> * feat: unit testing for LabelsFrom Signed-off-by: Julie Vogelman <[email protected]>
- Loading branch information
Showing
30 changed files
with
522 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: WorkflowTemplate | ||
metadata: | ||
name: workflow-template-submittable | ||
spec: | ||
entrypoint: whalesay-template | ||
templates: | ||
- name: whalesay-template | ||
container: | ||
image: 'argoproj/argosay:v2' | ||
command: | ||
- /argosay | ||
args: | ||
- echo | ||
- '{{workflow.labels.arg-name}}' | ||
workflowMetadata: | ||
labels: | ||
arg-name: myLabelArg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: workflow-template-hello-world- | ||
namespace: test | ||
spec: | ||
workflowTemplateRef: | ||
name: workflow-template-submittable | ||
synchronization: | ||
mutex: | ||
name: "{{workflow.labels.mutex-name}}" | ||
schedulerName: "{{workflow.annotations.scheduler-name}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: workflow-template-hello-world- | ||
namespace: test | ||
labels: | ||
mutex-name: myMutex | ||
annotations: | ||
scheduler-name: myScheduler | ||
spec: | ||
workflowTemplateRef: | ||
name: workflow-template-submittable | ||
synchronization: | ||
mutex: | ||
name: "{{workflow.labels.mutex-name}}" | ||
schedulerName: "{{workflow.annotations.scheduler-name}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: workflow-template-hello-world- | ||
namespace: test | ||
labels: | ||
mutex-name: myMutex | ||
annotations: | ||
scheduler-name: myScheduler | ||
spec: | ||
workflowTemplateRef: | ||
name: workflow-template-submittable | ||
synchronization: | ||
mutex: | ||
name: "{{workflow.labels.mutex-name}}" | ||
schedulerName: "{{workflow.annotations.scheduler-name}}" | ||
workflowMetadata: | ||
labels: | ||
mutex-name: wfMetadataMutex | ||
annotations: | ||
scheduler-name: wfMetadataScheduler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: workflow-template-hello-world- | ||
namespace: test | ||
labels: | ||
mutex-name: myMutex | ||
annotations: | ||
scheduler-name: myScheduler | ||
spec: | ||
workflowTemplateRef: | ||
name: workflow-template-submittable | ||
synchronization: | ||
mutex: | ||
name: "{{workflow.labels.mutex-name}}" | ||
schedulerName: "{{workflow.annotations.scheduler-name}}" | ||
workflowMetadata: | ||
annotations: | ||
scheduler-name: wfMetadataScheduler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: workflow-template-hello-world- | ||
namespace: test | ||
labels: | ||
mutex-name: myMutex | ||
annotations: | ||
scheduler-name: myScheduler | ||
spec: | ||
entrypoint: myTemplate | ||
templates: | ||
- name: myTemplate | ||
steps: | ||
- - name: whalesay | ||
templateRef: | ||
name: workflow-template-submittable | ||
template: whalesay-template | ||
synchronization: | ||
mutex: | ||
name: "{{workflow.labels.mutex-name}}" | ||
schedulerName: "{{workflow.annotations.scheduler-name}}" |
17 changes: 17 additions & 0 deletions
17
workflow/controller/testdata/workflow-template-sub-test-1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: WorkflowTemplate | ||
metadata: | ||
name: workflow-template-submittable | ||
namespace: test | ||
labels: | ||
mutex-name: myMutex | ||
annotations: | ||
scheduler-name: myScheduler | ||
spec: | ||
entrypoint: whalesay-template | ||
templates: | ||
- name: whalesay-template | ||
container: | ||
image: docker/whalesay | ||
command: [cowsay] | ||
args: ['hello'] |
22 changes: 22 additions & 0 deletions
22
workflow/controller/testdata/workflow-template-sub-test-2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: WorkflowTemplate | ||
metadata: | ||
name: workflow-template-submittable | ||
namespace: test | ||
labels: | ||
mutex-name: myMutex | ||
annotations: | ||
scheduler-name: myScheduler | ||
spec: | ||
entrypoint: whalesay-template | ||
templates: | ||
- name: whalesay-template | ||
container: | ||
image: docker/whalesay | ||
command: [cowsay] | ||
args: ['hello'] | ||
workflowMetadata: | ||
labels: | ||
mutex-name: wfMetadataTemplateMutex | ||
annotations: | ||
scheduler-name: wfMetadataTemplateScheduler |
Oops, something went wrong.