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: custom columns not supporting annotations #12421

Merged
merged 3 commits into from
Dec 30, 2023

Conversation

jmeridth
Copy link
Member

@jmeridth jmeridth commented Dec 29, 2023

Fixes #12422

Motivation

We'd like to add a PR column that lists the user's PR URL and using annotations since labels have character limits and don't support special characters.

Builds off #10808

Modifications

  • search annotations for matching key from user's custom column type
    • docs state we can use labels and annotations here and here

Screenshot 2023-12-28 at 9 14 42 PM

Verification

I changed this file's columns section from:

  columns: |
    - name: Workflow Completed
      type: label
      key: workflows.argoproj.io/completed

to

  columns: |
    - name: PR
      type: annotation
      key: workflows.argoproj.io/pullrequest

and added the follow to a workflow's annotations:

metadata:
  annotations:
    workflows.argoproj.io/pullrequest: https://github.com/argoproj/argo-workflows/pull/12421

Reference screenshot above for result

@jmeridth jmeridth self-assigned this Dec 29, 2023
@jmeridth jmeridth added area/ui area/docs Incorrect, missing, or mistakes in docs labels Dec 29, 2023
- [x] search annotations for matching key from user's custom column type
  - docs state we can use labels and annotations [here](https://github.com/argoproj/argo-workflows/blob/954884d64c7b2d24a2e5fa0641a66692d182fefd/pkg/apis/workflow/v1alpha1/info.go#L21) and [here](https://github.com/argoproj/argo-workflows/blob/954884d64c7b2d24a2e5fa0641a66692d182fefd/docs/workflow-controller-configmap.yaml#L90)

Signed-off-by: jmeridth <jmeridth@gmail.com>
Co-authored-by: Steven Johnson <52087249+stevenbjohnson@users.noreply.github.com>
@jmeridth jmeridth marked this pull request as ready for review December 29, 2023 03:45
@agilgur5 agilgur5 self-assigned this Dec 29, 2023
Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
Signed-off-by: Jason Meridth <jmeridth@gmail.com>
Signed-off-by: jmeridth <jmeridth@gmail.com>
Copy link
Member

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice catch on the code missing an annotation check despite the docs saying it!

Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@terrytangyuan terrytangyuan merged commit 4768919 into argoproj:main Dec 30, 2023
15 checks passed
hittingray pushed a commit to atlassian-forks/argo-workflows that referenced this pull request Jan 3, 2024
Signed-off-by: jmeridth <jmeridth@gmail.com>
Signed-off-by: Jason Meridth <jmeridth@gmail.com>
Co-authored-by: Steven Johnson <52087249+stevenbjohnson@users.noreply.github.com>
Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
sarabala1979 pushed a commit that referenced this pull request Jan 9, 2024
Signed-off-by: jmeridth <jmeridth@gmail.com>
Signed-off-by: Jason Meridth <jmeridth@gmail.com>
Co-authored-by: Steven Johnson <52087249+stevenbjohnson@users.noreply.github.com>
Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Incorrect, missing, or mistakes in docs area/ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom columns do not read from annotations like documentation states
3 participants