Repository: argoproj/argo
Pull request #4161 (2020-09-29 18:29:59)

chore: Update Github issue templates
Checklist:

* [x] Either (a) I've created an [enhancement proposal](https://github.com/argoproj/argo/issues/new/choose) and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
* [x] The title of the PR is (a) [conventional](https://www.conventionalcommits.org/en/v1.0.0/), (b) states what changed, and (c) suffixes the related issues number. E.g. `"fix(controller): Updates such and such. Fixes #1234"`.  
* [x] I've signed the CLA.
* [ ] ~~I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.~~
* [ ] ~~My builds are green. Try syncing with master if they are not.~~
* [x] My organization is added to [USERS.md](https://github.com/argoproj/argo/blob/master/USERS.md).


alexec: Unrelated failure, maybe bug or flakey test?
```
2020-09-29T18:46:09.0493329Z --- FAIL: TestArgoServerSuite (37.70s)
2020-09-29T18:46:09.0494342Z     --- FAIL: TestArgoServerSuite/TestArchivedWorkflowService (4.12s)
2020-09-29T18:46:09.0498920Z ##[error]        argo_server_test.go:1142: workflows.argoproj.io "archie" not found
```

Patch:
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 77c654fc4..d913eb90d 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,6 +1,6 @@
 ---
-name: Bug report
-about: Create a report to help us improve
+name: Reproducible bug report 
+about: Create a reproducible bug report. Not for support requests.
 labels: 'bug'
 ---
 ## Summary 
@@ -9,10 +9,12 @@ What happened/what you expected to happen?
 
 ## Diagnostics
 
-What version of Argo Workflows are you running?
+What Kubernetes provider are you using? 
+
+What version of Argo Workflows are you running? 
 
 ```yaml
-Paste the workflow here, including status:
+Paste a workflow that reproduces the bug, including status:
 kubectl get wf -o yaml ${workflow} 
 ```
 
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 000000000..9d20c5f06
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,12 @@
+blank_issues_enabled: false
+
+contact_links:
+  - name: Have you read the docs?
+    url: https://argoproj.github.io/argo/
+    about: Much help can be found in the docs
+  - name: Ask a question
+    url: https://stackoverflow.com/questions/tagged/argo
+    about: Ask questions about workflows
+  - name: Chat on Slack
+    url: https://argoproj.github.io/community/join-slack
+    about: Maybe chatting with the community can help
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md
deleted file mode 100644
index 36713461a..000000000
--- a/.github/ISSUE_TEMPLATE/question.md
+++ /dev/null
@@ -1,16 +0,0 @@
----
-name: Question
-about: Ask a question regarding this project
-title: ''
-labels: 'question'
-assignees: ''
----
-<!-- Also consider asking your question on our Slack channel. See the README for more info! -->
-
-# Summary
-
-What do you want to know about this project?
-
-# Motivation
-
-Why do you need to know this, any examples or use cases you could include?
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index e841a36e3..321c8fc10 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -2,7 +2,7 @@ Checklist:
 
 * [ ] Either (a) I've created an [enhancement proposal](https://github.com/argoproj/argo/issues/new/choose) and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
 * [ ] The title of the PR is (a) [conventional](https://www.conventionalcommits.org/en/v1.0.0/), (b) states what changed, and (c) suffixes the related issues number. E.g. `"fix(controller): Updates such and such. Fixes #1234"`.  
+* [ ] My organization is added to [USERS.md](https://github.com/argoproj/argo/blob/master/USERS.md).
 * [ ] I've signed the CLA.
 * [ ] I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
 * [ ] My builds are green. Try syncing with master if they are not. 
-* [ ] My organization is added to [USERS.md](https://github.com/argoproj/argo/blob/master/USERS.md).
diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json
index 05ab64e8b..2c2011208 100644
--- a/api/openapi-spec/swagger.json
+++ b/api/openapi-spec/swagger.json
@@ -3896,7 +3896,7 @@
           "type": "string"
         },
         "runtimeResolution": {
-          "description": "RuntimeResolution skips validation at creation time. By enabling this option, you can create the referred workflow template before the actual runtime.",
+          "description": "RuntimeResolution skips validation at creation time. By enabling this option, you can create the referred workflow template before the actual runtime. DEPRECATED: This value is not used anymore and is ignored",
           "type": "boolean"
         },
         "template": {
diff --git a/docs/fields.md b/docs/fields.md
index a4e2ef4aa..768c4d9b8 100644
--- a/docs/fields.md
+++ b/docs/fields.md
@@ -3293,7 +3293,7 @@ TemplateRef is a reference of template resource.
 |:----------:|:----------:|---------------|
 |`clusterScope`|`boolean`|ClusterScope indicates the referred template is cluster scoped (i.e. a ClusterWorkflowTemplate).|
 |`name`|`string`|Name is the resource name of the template.|
-|`runtimeResolution`|`boolean`|RuntimeResolution skips validation at creation time. By enabling this option, you can create the referred workflow template before the actual runtime.|
+|~`runtimeResolution`~|~`boolean`~|~RuntimeResolution skips validation at creation time. By enabling this option, you can create the referred workflow template before the actual runtime.~ DEPRECATED: This value is not used anymore and is ignored|
 |`template`|`string`|Template is the name of referred template in the resource.|
 
 ## MemoizationStatus
diff --git a/docs/swagger.md b/docs/swagger.md
index a806cec0f..42131f0c1 100644
--- a/docs/swagger.md
+++ b/docs/swagger.md
@@ -1579,7 +1579,7 @@ TemplateRef is a reference of template resource.
 | ---- | ---- | ----------- | -------- |
 | clusterScope | boolean | ClusterScope indicates the referred template is cluster scoped (i.e. a ClusterWorkflowTemplate). | No |
 | name | string | Name is the resource name of the template. | No |
-| runtimeResolution | boolean | RuntimeResolution skips validation at creation time. By enabling this option, you can create the referred workflow template before the actual runtime. | No |
+| runtimeResolution | boolean | RuntimeResolution skips validation at creation time. By enabling this option, you can create the referred workflow template before the actual runtime. DEPRECATED: This value is not used anymore and is ignored | No |
 | template | string | Template is the name of referred template in the resource. | No |
 
 #### io.argoproj.workflow.v1alpha1.UpdateCronWorkflowRequest
diff --git a/pkg/apis/workflow/register.go b/pkg/apis/workflow/register.go
index 47a1b0f18..fe1832495 100644
--- a/pkg/apis/workflow/register.go
+++ b/pkg/apis/workflow/register.go
@@ -4,6 +4,7 @@ package workflow
 const (
 	Group                            string = "argoproj.io"
 	Version                          string = "v1alpha1"
+	APIVersion                       string = Group + "/" + Version
 	WorkflowKind                     string = "Workflow"
 	WorkflowSingular                 string = "workflow"
 	WorkflowPlural                   string = "workflows"
diff --git a/pkg/apis/workflow/v1alpha1/generated.proto b/pkg/apis/workflow/v1alpha1/generated.proto
index d2b1b4b8e..c528de629 100644
--- a/pkg/apis/workflow/v1alpha1/generated.proto
+++ b/pkg/apis/workflow/v1alpha1/generated.proto
@@ -1145,6 +1145,7 @@ message TemplateRef {
 
   // RuntimeResolution skips validation at creation time.
   // By enabling this option, you can create the referred workflow template before the actual runtime.
+  // DEPRECATED: This value is not used anymore and is ignored
   optional bool runtimeResolution = 3;
 
   // ClusterScope indicates the referred template is cluster scoped (i.e. a ClusterWorkflowTemplate).
diff --git a/pkg/apis/workflow/v1alpha1/openapi_generated.go b/pkg/apis/workflow/v1alpha1/openapi_generated.go
index 397802f82..ce1ebd781 100644
--- a/pkg/apis/workflow/v1alpha1/openapi_generated.go
+++ b/pkg/apis/workflow/v1alpha1/openapi_generated.go
@@ -3757,7 +3757,7 @@ func schema_pkg_apis_workflow_v1alpha1_TemplateRef(ref common.ReferenceCallback)
 					},
 					"runtimeResolution": {
 						SchemaProps: spec.SchemaProps{
-							Description: "RuntimeResolution skips validation at creation time. By enabling this option, you can create the referred workflow template before the actual runtime.",
+							Description: "RuntimeResolution skips validation at creation time. By enabling this option, you can create the referred workflow template before the actual runtime. DEPRECATED: This value is not used anymore and is ignored",
 							Type:        []string{"boolean"},
 							Format:      "",
 						},
diff --git a/pkg/apis/workflow/v1alpha1/workflow_types.go b/pkg/apis/workflow/v1alpha1/workflow_types.go
index b1ebf6840..c70d834d9 100644
--- a/pkg/apis/workflow/v1alpha1/workflow_types.go
+++ b/pkg/apis/workflow/v1alpha1/workflow_types.go
@@ -953,6 +953,7 @@ type TemplateRef struct {
 	Template string `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
 	// RuntimeResolution skips validation at creation time.
 	// By enabling this option, you can create the referred workflow template before the actual runtime.
+	// DEPRECATED: This value is not used anymore and is ignored
 	RuntimeResolution bool `json:"runtimeResolution,omitempty" protobuf:"varint,3,opt,name=runtimeResolution"`
 	// ClusterScope indicates the referred template is cluster scoped (i.e. a ClusterWorkflowTemplate).
 	ClusterScope bool `json:"clusterScope,omitempty" protobuf:"varint,4,opt,name=clusterScope"`
diff --git a/workflow/util/util.go b/workflow/util/util.go
index cd24df306..8f4e122ab 100644
--- a/workflow/util/util.go
+++ b/workflow/util/util.go
@@ -60,7 +60,10 @@ func NewWorkflowInformer(cfg *rest.Config, ns string, resyncPeriod time.Duration
 	if err != nil {
 		panic(err)
 	}
+	return NewWorkflowInformerFromDynamic(dclient, ns, resyncPeriod, tweakListOptions)
+}
 
+func NewWorkflowInformerFromDynamic(dclient dynamic.Interface, ns string, resyncPeriod time.Duration, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
 	resource := schema.GroupVersionResource{
 		Group:    workflow.Group,
 		Version:  "v1alpha1",
@@ -146,7 +149,7 @@ func ToUnstructured(wf *wfv1.Workflow) (*unstructured.Unstructured, error) {
 	un := &unstructured.Unstructured{Object: obj}
 	// we need to add these values so that the `EventRecorder` does not error
 	un.SetKind(workflow.WorkflowKind)
-	un.SetAPIVersion(workflow.Version)
+	un.SetAPIVersion(workflow.APIVersion)
 	return un, nil
 }
 
diff --git a/workflow/validate/validate.go b/workflow/validate/validate.go
index f173d8b5a..365ae61a2 100644
--- a/workflow/validate/validate.go
+++ b/workflow/validate/validate.go
@@ -327,11 +327,6 @@ Templates should be referenced from within a "steps" or a "dag" template. Here i
           template: %s`
 
 		out = fmt.Sprintf(out, tmpl.Name, tmpl.TemplateRef.Template, tmpl.TemplateRef.Name, tmpl.TemplateRef.Template)
-		if tmpl.TemplateRef.RuntimeResolution {
-			out += `
-          runtimeResolution: %t`
-			out = fmt.Sprintf(out, tmpl.TemplateRef.RuntimeResolution)
-		}
 	} else if tmpl.Template != "" {
 		out += `
         template: %s`
@@ -476,8 +471,7 @@ func (ctx *templateValidationCtx) validateTemplateHolder(tmplHolder wfv1.Templat
 			return nil, errors.New(errors.CodeBadRequest, "template name is required")
 		}
 		if tmplRef.RuntimeResolution {
-			// Let's see if the template exists at runtime.
-			return nil, nil
+			logrus.Warnf("the 'runtimeResolution' field is deprecated and ignored")
 		}
 	} else if tmplName != "" {
 		_, err := tmplCtx.GetTemplateByName(tmplName)


Test patch:
diff --git a/test/e2e/argo_server_test.go b/test/e2e/argo_server_test.go
index 7f87bbc44..c76f26711 100644
--- a/test/e2e/argo_server_test.go
+++ b/test/e2e/argo_server_test.go
@@ -1128,8 +1128,6 @@ metadata:
     argo-e2e: true
     foo: 1
 spec:
-  ttlStrategy:
-    secondsAfterCompletion: 0
   entrypoint: run-archie
   templates:
     - name: run-archie
diff --git a/workflow/util/util_test.go b/workflow/util/util_test.go
index 328024f40..b5d90c2b1 100644
--- a/workflow/util/util_test.go
+++ b/workflow/util/util_test.go
@@ -755,6 +755,7 @@ func TestToUnstructured(t *testing.T) {
 	if assert.NoError(t, err) {
 		gv := un.GetObjectKind().GroupVersionKind()
 		assert.Equal(t, workflow.WorkflowKind, gv.Kind)
+		assert.Equal(t, workflow.Group, gv.Group)
 		assert.Equal(t, workflow.Version, gv.Version)
 	}
 }