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

[BUG] Have project-get-set-iteration-field.yaml not fail after linked issue is updated #277

Open
mroeschke opened this issue Feb 7, 2025 · 2 comments
Assignees

Comments

@mroeschke
Copy link

I believe if a PR links an invalid/incorrectly formatted(?) issue, this workflow will fail with

gh: The iteration Id does not belong to the field
{"data":{"updateProjectV2ItemFieldValue":null},"errors":[{"type":"VALIDATION","path":["updateProjectV2ItemFieldValue"],"locations":[{"line":3,"column":9}],"message":"The iteration Id does not belong to the field"}]}

and even if the linked issue is corrected, this job will continue to fail

e.g.

https://github.com/rapidsai/cudf/actions/runs/13145770622/job/36683471245?pr=17760
https://github.com/rapidsai/cudf/actions/runs/13207892718/job/36875291888?pr=17954

@mroeschke mroeschke changed the title [BUG(?)] Have project-get-set-iteration-field.yaml not fail after linked issue is updated [BUG] Have project-get-set-iteration-field.yaml not fail after linked issue is updated Feb 20, 2025
@mroeschke
Copy link
Author

In particular it is because in the .github/workflows/project-get-set-iteration-field.yaml workflow steps.get_iteration_option_id.outputs.ITERATION_OPTION_ID can be set to null e.g.

  # Set the iteration based on the query above
  # This overwrites whatever was in it before, we may want to make an "OVERWRITE" option
  gh api graphql -f query='
    mutation {
      updateProjectV2ItemFieldValue(
        input: {
          projectId: "..."
          itemId: "..."
          fieldId: "..."
        value: {
          iterationId: "null"
          }
        }
      ) {
          projectV2Item {
          id
          }
      }
      }'
  shell: /usr/bin/bash -e {0}
  env:
    GH_TOKEN: ***
gh: The iteration Id does not belong to the field

@jarmak-nv
Copy link
Contributor

Hi! This error happens when there's no active Iteration option in that field. Unfortunately, GitHub has no method to auto-create iterations if they've all expired.

I've added iterations for all of 2025 for your project to remove the error in the immediate-term;

leaving this issue open to make a long-term fix:

  • Create a PR to automatically create a new iteration option if there are none active in the iteration field.

@jarmak-nv jarmak-nv self-assigned this Feb 24, 2025
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

No branches or pull requests

2 participants