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

fix: improper selfLinks for cluster-scoped resources. Fixes #9320 #9375

Merged
merged 2 commits into from
Aug 18, 2022

Conversation

Kyle-Wong
Copy link
Contributor

Fixes #9320

Tested by running a workflow with successCondition and a cluster-scoped resource.
Workflow:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: kubeflow
spec:
  activeDeadlineSeconds: 600
  entrypoint: entry
  serviceAccountName: default
  templates:
  - name: entry
    retryStrategy:
      limit: 2
      retryPolicy: "Always"
    steps:
    - - name: prereq-resources
        template: prereq-resources-install
  - name: prereq-resources-install
    resource:
      action: apply
      successCondition: status.phase == Active
      manifest: |
        apiVersion: v1
        kind: Namespace
        metadata:
          name: kubeflow

output:

time="2022-08-16T18:03:25.695Z" level=info msg="Starting Workflow Executor" version=latest+9680ec0.dirty
time="2022-08-16T18:03:25.699Z" level=info msg="Using executor retry strategy" Duration=1s Factor=1.6 Jitter=0.5 Steps=5
time="2022-08-16T18:03:25.699Z" level=info msg="Executor initialized" deadline="2022-08-16 18:13:22 +0000 UTC" includeScriptOutput=false namespace=argo podName=kubeflow-prereq-resources-install-3024519692 template="{\"name\":\"prereq-resources-install\",\"inputs\":{},\"outputs\":{},\"metadata\":{},\"resource\":{\"action\":\"apply\",\"manifest\":\"apiVersion: v1\\nkind: Namespace\\nmetadata:\\n  name: kubeflow\\n\",\"successCondition\":\"status.phase == Active\"},\"archiveLocation\":{\"archiveLogs\":true,\"s3\":{\"endpoint\":\"minio:9000\",\"bucket\":\"my-bucket\",\"insecure\":true,\"accessKeySecret\":{\"name\":\"my-minio-cred\",\"key\":\"accesskey\"},\"secretKeySecret\":{\"name\":\"my-minio-cred\",\"key\":\"secretkey\"},\"key\":\"kubeflow/kubeflow-prereq-resources-install-3024519692\"}}}" version="&Version{Version:latest+9680ec0.dirty,BuildDate:2022-08-15T21:01:43Z,GitCommit:9680ec01384cc7289b13dd95e57541a95f5a71cb,GitTag:untagged,GitTreeState:dirty,GoVersion:go1.18.5,Compiler:gc,Platform:linux/amd64,}"
time="2022-08-16T18:03:25.699Z" level=info msg="Loading manifest to /tmp/manifest.yaml"
time="2022-08-16T18:03:25.699Z" level=info msg="kubectl apply -f /tmp/manifest.yaml -o json"
time="2022-08-16T18:03:25.950Z" level=info msg="Resource: /namespace./kubeflow. SelfLink: api/v1/namespaces/kubeflow"
time="2022-08-16T18:03:25.950Z" level=info msg="Waiting for conditions: status.phase==Active"
time="2022-08-16T18:03:25.960Z" level=info msg="Get namespaces 200"
time="2022-08-16T18:03:25.960Z" level=info msg="success condition '{status.phase == [Active]}' evaluated true"
time="2022-08-16T18:03:25.960Z" level=info msg="1/1 success conditions matched"
time="2022-08-16T18:03:25.960Z" level=info msg="Returning from successful wait for resource namespace./kubeflow in namespace "

Note the selfLink api/v1/namespaces/kubeflow, which is now correct.

@terrytangyuan terrytangyuan enabled auto-merge (squash) August 16, 2022 20:54
auto-merge was automatically disabled August 18, 2022 15:50

Head branch was pushed to by a user without write access

@Kyle-Wong
Copy link
Contributor Author

@terrytangyuan I reran CI checks and they are all passing, can you merge this?

@terrytangyuan terrytangyuan merged commit 74cdf5d into argoproj:master Aug 18, 2022
@Kyle-Wong Kyle-Wong deleted the fix-selflink branch August 18, 2022 17:24
juchaosong pushed a commit to juchaosong/argo-workflows that referenced this pull request Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workflows fail when cluster-scoped resources have successCondition
2 participants