Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-6487

body.pull request dynamic variable is not populated when re-running checks

XMLWordPrintable

    • False
    • None
    • False

      Description of problem:

      When a pipeline that uses the {{ {{body.pull_request }}}} dynamic variable is re-run, the variable value is empty.

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      1. Create an example task that uses {{ {{body.pull_request }}}}

      spec:
        pipelineSpec:
          tasks:
            - name: debug
              taskSpec:
                steps:
                  - name: debug
                    image: registry.access.redhat.com/ubi9:latest
                    script: |
                      #!/usr/bin/bash
                      echo -e 'Pull request body:\n\n{{ body.pull_request }}'
      

      2. Push the branch and create a pull request
      3. After the pipeline run completes, re-run the pipeline by clicking Re-ran all checks in the checks tab on the PR, or adding a comment with /retest.
       

      Actual results:

      The value for body.pull_request is not interpolated.

      STEP-DEBUG
      Pull request body:
      
      {{ body.pull_request }}
      
      

      Expected results:

      The value for body.pull_request should be interpolated when pull request checks are re-run.

      STEP-DEBUG
      Pull request body:
      
      {"_links":{"comments":{"href":"https://api.github.com/repos/samdoran/ubi-trino/issues/4/comments"}, "commits":{"href":"https://api.github.com/repos/samdoran/ubi-trino/pulls/4/commits"}, "html":{"href":"https://github.com/samdoran/ubi-trino/pull/4"}, "issue":{"href":"https://api.github.com/repos/samdoran/ubi-trino/issues/4"}, "review_comment":{"href":"https://api.github.com/repos/samdoran/ubi-trino/pulls/comments{/number}"}, "review_comments":{"href":"https://api.github.com/repos/samdoran/ubi-trino/pulls/4/comments"}, "self":{"href":"https://api.github.com/repos/samdoran/ubi-trino/pulls/4"}, "statuses":{"href":"https://api.github.com/repos/samdoran/ubi-trino/statuses/0c72304d7466fc38b559d453419addbadd530e02"}}, "additions":10, "author_association":"OWNER", "base":{"label":"samdoran:test", "ref":"test", "repo":{"allow_auto_merge":false, "allow_forking":true, "allow_merge_commit":true, "allow_rebase_merge":true, "allow_squash_merge":true, "allow_update_branch":true, "archive_url":"https://api.github.com/repos/samdoran/ubi-trino/{archive_format}{/ref}", "archived":false, "assignees_url":"https://api.github.com/repos/samdoran/ubi-trino/assignees{/user}", "blobs_url":"https://api.github.com/repos/samdoran/ubi-trino/git/blobs{/sha}", "branches_url":"https://api.github.com/repos/samdoran/ubi-trino/branches{/branch}", "clone_url":"https://github.com/samdoran/ubi-trino.git", "collaborators_url":"https://api.github.com/repos/samdoran/ubi-trino/collaborators{/collaborator}", "comments_url":"https://api.github.com/repos/samdoran/ubi-trino/comments{/number}", "commits_url":"https://api.github.com/repos/samdoran/ubi-trino/commits{/sha}", "compare_url":"https://api.github.com/repos/samdoran/ubi-trino/compare/{base}...{head}", "contents_url":"https://api.github.com/repos/samdoran/ubi-trino/contents/{+path}", "contributors_url":"https://api.github.com/repos/samdoran/ubi-trino/contributors", "created_at":"2023-03-23T20:14:01Z", "default_branch":"main", "delete_branch_on_merge":true, "deployments_url":"https://api.github.com/repos/samdoran/ubi-trino/deployments", "disabled":false, "downloads_url":"https://api.github.com/repos/samdoran/ubi-trino/downloads", "events_url":"https://api.github.com/repos/samdoran/ubi-trino/events", "fork":true, "forks_count":0, "forks_url":"https://api.github.com/repos/samdoran/ubi-trino/forks", "full_name":"samdoran/ubi-trino", "git_commits_url":"https://api.github.com/repos/samdoran/ubi-trino/git/commits{/sha}", "git_refs_url":"https://api.github.com/repos/samdoran/ubi-trino/git/refs{/sha}", "git_tags_url":"https://api.github.com/repos/samdoran/ubi-trino/git/tags{/sha}", "git_url":"git://github.com/samdoran/ubi-trino.git", "has_discussions":false, "has_downloads":true, "has_issues":false, "has_pages":false, "has_projects":true, "has_wiki":true, "hooks_url":"https://api.github.com/repos/samdoran/ubi-trino/hooks", "html_url":"https://github.com/samdoran/ubi-trino", "id":618129135, "is_template":false, "issue_comment_url":"https://api.github.com/repos/samdoran/ubi-trino/issues/comments{/number}", "issue_events_url":"https://api.github.com/repos/samdoran/ubi-trino/issues/events{/number}", "issues_url":"https://api.github.com/repos/samdoran/ubi-trino/issues{/number}", "keys_url":"https://api.github.com/repos/samdoran/ubi-trino/keys{/key_id}", "labels_url":"https://api.github.com/repos/samdoran/ubi-trino/labels{/name}", "language":"Shell", "languages_url":"https://api.github.com/repos/samdoran/ubi-trino/languages", "license":{"key":"agpl-3.0", "name":"GNU Affero General Public License v3.0", "spdx_id":"AGPL-3.0", "url":"https://api.github.com/licenses/agpl-3.0"}, "merge_commit_message":"PR_TITLE", "merge_commit_title":"MERGE_MESSAGE", "merges_url":"https://api.github.com/repos/samdoran/ubi-trino/merges", "milestones_url":"https://api.github.com/repos/samdoran/ubi-trino/milestones{/number}", "name":"ubi-trino", "node_id":"R_kgDOJNfm7w", "notifications_url":"https://api.github.com/repos/samdoran/ubi-trino/notifications{?since,all,participating}", "open_issues":2, "open_issues_count":2, "owner":{"avatar_url":"https://avatars.githubusercontent.com/u/4047861?v=4", "events_url":"https://api.github.com/users/samdoran/events{/privacy}", "followers_url":"https://api.github.com/users/samdoran/followers", "following_url":"https://api.github.com/users/samdoran/following{/other_user}", "gists_url":"https://api.github.com/users/samdoran/gists{/gist_id}", "gravatar_id":"", "html_url":"https://github.com/samdoran", "id":4047861, "login":"samdoran", "node_id":"MDQ6VXNlcjQwNDc4NjE=", "organizations_url":"https://api.github.com/users/samdoran/orgs", "received_events_url":"https://api.github.com/users/samdoran/received_events", "repos_url":"https://api.github.com/users/samdoran/repos", "site_admin":false, "starred_url":"https://api.github.com/users/samdoran/starred{/owner}{/repo}", "subscriptions_url":"https://api.github.com/users/samdoran/subscriptions", "type":"User", "url":"https://api.github.com/users/samdoran"}, "private":false, "pulls_url":"https://api.github.com/repos/samdoran/ubi-trino/pulls{/number}", "pushed_at":"2024-09-26T19:58:32Z", "releases_url":"https://api.github.com/repos/samdoran/ubi-trino/releases{/id}", "size":204, "squash_merge_commit_message":"COMMIT_MESSAGES", "squash_merge_commit_title":"COMMIT_OR_PR_TITLE", "ssh_url":"git@github.com:samdoran/ubi-trino.git", "stargazers_count":0, "stargazers_url":"https://api.github.com/repos/samdoran/ubi-trino/stargazers", "statuses_url":"https://api.github.com/repos/samdoran/ubi-trino/statuses/{sha}", "subscribers_url":"https://api.github.com/repos/samdoran/ubi-trino/subscribers", "subscription_url":"https://api.github.com/repos/samdoran/ubi-trino/subscription", "svn_url":"https://github.com/samdoran/ubi-trino", "tags_url":"https://api.github.com/repos/samdoran/ubi-trino/tags", "teams_url":"https://api.github.com/repos/samdoran/ubi-trino/teams", "trees_url":"https://api.github.com/repos/samdoran/ubi-trino/git/trees{/sha}", "updated_at":"2024-09-26T18:43:04Z", "url":"https://api.github.com/repos/samdoran/ubi-trino", "use_squash_pr_title_as_default":false, "visibility":"public", "watchers":0, "watchers_count":0, "web_commit_signoff_required":false}, "sha":"fb8451c91468dc684b8991bd26e2b6ace17da0ed", "user":{"avatar_url":"https://avatars.githubusercontent.com/u/4047861?v=4", "events_url":"https://api.github.com/users/samdoran/events{/privacy}", "followers_url":"https://api.github.com/users/samdoran/followers", "following_url":"https://api.github.com/users/samdoran/following{/other_user}", "gists_url":"https://api.github.com/users/samdoran/gists{/gist_id}", "gravatar_id":"", "html_url":"https://github.com/samdoran", "id":4047861, "login":"samdoran", "node_id":"MDQ6VXNlcjQwNDc4NjE=", "organizations_url":"https://api.github.com/users/samdoran/orgs", "received_events_url":"https://api.github.com/users/samdoran/received_events", "repos_url":"https://api.github.com/users/samdoran/repos", "site_admin":false, "starred_url":"https://api.github.com/users/samdoran/starred{/owner}{/repo}", "subscriptions_url":"https://api.github.com/users/samdoran/subscriptions", "type":"User", "url":"https://api.github.com/users/samdoran"}}, "changed_files":1, "comments":0, "comments_url":"https://api.github.com/repos/samdoran/ubi-trino/issues/4/comments", "commits":3, "commits_url":"https://api.github.com/repos/samdoran/ubi-trino/pulls/4/commits", "created_at":"2024-09-26T19:45:55Z", "deletions":16, "diff_url":"https://github.com/samdoran/ubi-trino/pull/4.diff", "draft":false, "head":{"label":"samdoran:pac-var-debug", "ref":"pac-var-debug", "repo":{"allow_auto_merge":false, "allow_forking":true, "allow_merge_commit":true, "allow_rebase_merge":true, "allow_squash_merge":true, "allow_update_branch":true, "archive_url":"https://api.github.com/repos/samdoran/ubi-trino/{archive_format}{/ref}", "archived":false, "assignees_url":"https://api.github.com/repos/samdoran/ubi-trino/assignees{/user}", "blobs_url":"https://api.github.com/repos/samdoran/ubi-trino/git/blobs{/sha}", "branches_url":"https://api.github.com/repos/samdoran/ubi-trino/branches{/branch}", "clone_url":"https://github.com/samdoran/ubi-trino.git", "collaborators_url":"https://api.github.com/repos/samdoran/ubi-trino/collaborators{/collaborator}", "comments_url":"https://api.github.com/repos/samdoran/ubi-trino/comments{/number}", "commits_url":"https://api.github.com/repos/samdoran/ubi-trino/commits{/sha}", "compare_url":"https://api.github.com/repos/samdoran/ubi-trino/compare/{base}...{head}", "contents_url":"https://api.github.com/repos/samdoran/ubi-trino/contents/{+path}", "contributors_url":"https://api.github.com/repos/samdoran/ubi-trino/contributors", "created_at":"2023-03-23T20:14:01Z", "default_branch":"main", "delete_branch_on_merge":true, "deployments_url":"https://api.github.com/repos/samdoran/ubi-trino/deployments", "disabled":false, "downloads_url":"https://api.github.com/repos/samdoran/ubi-trino/downloads", "events_url":"https://api.github.com/repos/samdoran/ubi-trino/events", "fork":true, "forks_count":0, "forks_url":"https://api.github.com/repos/samdoran/ubi-trino/forks", "full_name":"samdoran/ubi-trino", "git_commits_url":"https://api.github.com/repos/samdoran/ubi-trino/git/commits{/sha}", "git_refs_url":"https://api.github.com/repos/samdoran/ubi-trino/git/refs{/sha}", "git_tags_url":"https://api.github.com/repos/samdoran/ubi-trino/git/tags{/sha}", "git_url":"git://github.com/samdoran/ubi-trino.git", "has_discussions":false, "has_downloads":true, "has_issues":false, "has_pages":false, "has_projects":true, "has_wiki":true, "hooks_url":"https://api.github.com/repos/samdoran/ubi-trino/hooks", "html_url":"https://github.com/samdoran/ubi-trino", "id":618129135, "is_template":false, "issue_comment_url":"https://api.github.com/repos/samdoran/ubi-trino/issues/comments{/number}", "issue_events_url":"https://api.github.com/repos/samdoran/ubi-trino/issues/events{/number}", "issues_url":"https://api.github.com/repos/samdoran/ubi-trino/issues{/number}", "keys_url":"https://api.github.com/repos/samdoran/ubi-trino/keys{/key_id}", "labels_url":"https://api.github.com/repos/samdoran/ubi-trino/labels{/name}", "language":"Shell", "languages_url":"https://api.github.com/repos/samdoran/ubi-trino/languages", "license":{"key":"agpl-3.0", "name":"GNU Affero General Public License v3.0", "spdx_id":"AGPL-3.0", "url":"https://api.github.com/licenses/agpl-3.0"}, "merge_commit_message":"PR_TITLE", "merge_commit_title":"MERGE_MESSAGE", "merges_url":"https://api.github.com/repos/samdoran/ubi-trino/merges", "milestones_url":"https://api.github.com/repos/samdoran/ubi-trino/milestones{/number}", "name":"ubi-trino", "node_id":"R_kgDOJNfm7w", "notifications_url":"https://api.github.com/repos/samdoran/ubi-trino/notifications{?since,all,participating}", "open_issues":2, "open_issues_count":2, "owner":{"avatar_url":"https://avatars.githubusercontent.com/u/4047861?v=4", "events_url":"https://api.github.com/users/samdoran/events{/privacy}", "followers_url":"https://api.github.com/users/samdoran/followers", "following_url":"https://api.github.com/users/samdoran/following{/other_user}", "gists_url":"https://api.github.com/users/samdoran/gists{/gist_id}", "gravatar_id":"", "html_url":"https://github.com/samdoran", "id":4047861, "login":"samdoran", "node_id":"MDQ6VXNlcjQwNDc4NjE=", "organizations_url":"https://api.github.com/users/samdoran/orgs", "received_events_url":"https://api.github.com/users/samdoran/received_events", "repos_url":"https://api.github.com/users/samdoran/repos", "site_admin":false, "starred_url":"https://api.github.com/users/samdoran/starred{/owner}{/repo}", "subscriptions_url":"https://api.github.com/users/samdoran/subscriptions", "type":"User", "url":"https://api.github.com/users/samdoran"}, "private":false, "pulls_url":"https://api.github.com/repos/samdoran/ubi-trino/pulls{/number}", "pushed_at":"2024-09-26T19:58:32Z", "releases_url":"https://api.github.com/repos/samdoran/ubi-trino/releases{/id}", "size":204, "squash_merge_commit_message":"COMMIT_MESSAGES", "squash_merge_commit_title":"COMMIT_OR_PR_TITLE", "ssh_url":"git@github.com:samdoran/ubi-trino.git", "stargazers_count":0, "stargazers_url":"https://api.github.com/repos/samdoran/ubi-trino/stargazers", "statuses_url":"https://api.github.com/repos/samdoran/ubi-trino/statuses/{sha}", "subscribers_url":"https://api.github.com/repos/samdoran/ubi-trino/subscribers", "subscription_url":"https://api.github.com/repos/samdoran/ubi-trino/subscription", "svn_url":"https://github.com/samdoran/ubi-trino", "tags_url":"https://api.github.com/repos/samdoran/ubi-trino/tags", "teams_url":"https://api.github.com/repos/samdoran/ubi-trino/teams", "trees_url":"https://api.github.com/repos/samdoran/ubi-trino/git/trees{/sha}", "updated_at":"2024-09-26T18:43:04Z", "url":"https://api.github.com/repos/samdoran/ubi-trino", "use_squash_pr_title_as_default":false, "visibility":"public", "watchers":0, "watchers_count":0, "web_commit_signoff_required":false}, "sha":"0c72304d7466fc38b559d453419addbadd530e02", "user":{"avatar_url":"https://avatars.githubusercontent.com/u/4047861?v=4", "events_url":"https://api.github.com/users/samdoran/events{/privacy}", "followers_url":"https://api.github.com/users/samdoran/followers", "following_url":"https://api.github.com/users/samdoran/following{/other_user}", "gists_url":"https://api.github.com/users/samdoran/gists{/gist_id}", "gravatar_id":"", "html_url":"https://github.com/samdoran", "id":4047861, "login":"samdoran", "node_id":"MDQ6VXNlcjQwNDc4NjE=", "organizations_url":"https://api.github.com/users/samdoran/orgs", "received_events_url":"https://api.github.com/users/samdoran/received_events", "repos_url":"https://api.github.com/users/samdoran/repos", "site_admin":false, "starred_url":"https://api.github.com/users/samdoran/starred{/owner}{/repo}", "subscriptions_url":"https://api.github.com/users/samdoran/subscriptions", "type":"User", "url":"https://api.github.com/users/samdoran"}}, "html_url":"https://github.com/samdoran/ubi-trino/pull/4", "id":2094487979, "issue_url":"https://api.github.com/repos/samdoran/ubi-trino/issues/4", "locked":false, "maintainer_can_modify":false, "merge_commit_sha":"c22d2be021b69c31fa0a67167448958c7cfa0daf", "mergeable_state":"unknown", "merged":false, "node_id":"PR_kwDOJNfm785811mr", "number":4, "patch_url":"https://github.com/samdoran/ubi-trino/pull/4.patch", "review_comment_url":"https://api.github.com/repos/samdoran/ubi-trino/pulls/comments{/number}", "review_comments":0, "review_comments_url":"https://api.github.com/repos/samdoran/ubi-trino/pulls/4/comments", "state":"open", "statuses_url":"https://api.github.com/repos/samdoran/ubi-trino/statuses/0c72304d7466fc38b559d453419addbadd530e02", "title":"Hack the planet", "updated_at":"2024-09-26T19:58:33Z", "url":"https://api.github.com/repos/samdoran/ubi-trino/pulls/4", "user":{"avatar_url":"https://avatars.githubusercontent.com/u/4047861?v=4", "events_url":"https://api.github.com/users/samdoran/events{/privacy}", "followers_url":"https://api.github.com/users/samdoran/followers", "following_url":"https://api.github.com/users/samdoran/following{/other_user}", "gists_url":"https://api.github.com/users/samdoran/gists{/gist_id}", "gravatar_id":"", "html_url":"https://github.com/samdoran", "id":4047861, "login":"samdoran", "node_id":"MDQ6VXNlcjQwNDc4NjE=", "organizations_url":"https://api.github.com/users/samdoran/orgs", "received_events_url":"https://api.github.com/users/samdoran/received_events", "repos_url":"https://api.github.com/users/samdoran/repos", "site_admin":false, "starred_url":"https://api.github.com/users/samdoran/starred{/owner}{/repo}", "subscriptions_url":"https://api.github.com/users/samdoran/subscriptions", "type":"User", "url":"https://api.github.com/users/samdoran"}}
      

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Acceptance criteria: 

      The value for body.pull_request is always interpolated on pull request checks.
       

      Definition of Done:

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

            Unassigned Unassigned
            rh-ee-sdoran Sam Doran
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: