Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apiVersion field in Workflow Event violates API conventions #2994

Closed
4 tasks done
yoichiwo7 opened this issue May 11, 2020 · 2 comments · Fixed by #2999
Closed
4 tasks done

apiVersion field in Workflow Event violates API conventions #2994

yoichiwo7 opened this issue May 11, 2020 · 2 comments · Fixed by #2999
Assignees
Labels
Milestone

Comments

@yoichiwo7
Copy link

Checklist:

  • I've included the version.
  • I've included reproduction steps.
  • I've included the workflow YAML.
  • I've included the logs.

What happened:

involvedObject.apiVersion field in both Workflow Event and Workflow Node Event violates Kubernetes API conventions.

https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md

API Group a set of resources that are exposed together. Along with the version is exposed in the "apiVersion" field as "GROUP/VERSION", e.g. "policy.k8s.io/v1".

Current involvedObject.apiVersion field in Workflow Event contains only version value v1alpha but the group value must also be added: argoproj.io/v1alpha1.

What you expected to happen:

involvedObject.apiVersion field in both Workflow Event and Workflow Node Event must conform Kubernetes API conventions as mentioned above.

How to reproduce it (as minimally and precisely as possible):

Run workflow and let the workflow-controller emit Workflow Event or Workflow Node Event.

Anything else we need to know?:

This issue leads to ambiguous apiVersion/Kind if the same kind name with different group exists in the Kubernetes cluster.

Environment:

  • Argo version: 2.8.0-rc4
$ argo version
  • Kubernetes version : 1.15.3
$ kubectl version -o yaml

Other debugging information (if applicable):

Workflow Event resource log.

apiVersion: v1
kind: Event
metadata:
  creationTimestamp: "2020-05-05T11:50:00Z"
  name: dag-sample-6r244.160c1f7f62cb9ce6
  namespace: sample
  resourceVersion: "147231006"
  selfLink: /api/v1/namespaces/sample/events/dag-sample-6r244.160c1f7f62cb9ce6
  uid: 38026c89-bea5-46dc-bce2-1887ac93b163
involvedObject:
  # apiVersion is not following API convention: "GROUP/VERSION"
  apiVersion: v1alpha1
  kind: Workflow
  name: dag-sample-6r244
  namespace: sample
  resourceVersion: "147231005"
  uid: 39aa113f-b48a-4e3d-ad13-0e9d639e06c6
count: 1
eventTime: null
firstTimestamp: "2020-05-05T11:50:00Z"
lastTimestamp: "2020-05-05T11:50:00Z"
message: Workflow Running
reason: WorkflowRunning
reportingComponent: ""
reportingInstance: ""
source:
  component: dag-sample-6r244
type: Normal

Message from the maintainers:

If you are impacted by this bug please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@alexec alexec self-assigned this May 11, 2020
@alexec alexec added this to the v2.8 milestone May 11, 2020
alexec added a commit to alexec/argo-workflows that referenced this issue May 11, 2020
@alexec alexec reopened this May 12, 2020
@alexec
Copy link
Contributor

alexec commented May 12, 2020

  • Back-port to v2.8

@alexec
Copy link
Contributor

alexec commented May 15, 2020

v2.8.1

@alexec alexec closed this as completed May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants