Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39444

Spurious "You have no permission to build" errors with inconsistent effects.

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Jenkins 2.28. System info attached.

      I have projects Upstream and Downstream. I want Upstream to trigger
      Downstream when Upstream is stable.

      Preferably, I would trigger Downstream as a post-build action of
      Upstream. It is also viable for me to trigger Downstream as the
      final build-step of Upstream.

      Both Upstream and Downstream have configured Build Authorization
      Strategy = `Run as User who Triggered Build`.

      Nevertheless, whether Downstream is triggered as a post-build action of
      Upstream, or as the final build-step of Upstream, the Upstream
      configuration page displays the error message:-

      You have no permission to build Downstream

      When Downstream is triggered as a post-build action of Upstream,
      this error message is true. The Upstream build log concludes:

      Warning: this build has no associated authentication, so build permissions may be lacking, and downstream projects which cannot even be seen by an anonymous user will be silently skipped
      You have no permission to build Downstream
      Finished: SUCCESS

      When Downstream is triggered as the final build-step of Upstream,
      the error message is false. The Upstream build log concludes:

      Waiting for the completion of Downstream
      Downstream #NN completed. Result was SUCCESS
      Build step 'Conditional step (single)' changed build result to SUCCESS
      No GitLab connection configured
      No GitLab connection configured
      Warning: this build has no associated authentication, so build permissions may be lacking, and downstream projects which cannot even be seen by an anonymous user will be silently skipped
      Finished: SUCCESS

      Apparent bugs are:-

      • The error message is spurious, as Upstream should have permission
        to trigger Downstream per the configured Build Authorization Strategy.
      • If the error message were not spurious, then Upstream should be unable
        to trigger Downstream either as a build-step or as a post-build action.

        Attachments

          Activity

          Hide
          scoobyshi Scott Justason added a comment -

          Yes, I forgot to mention this problem only manifested after we upgraded to 2.28 from an earlier version (I don't remember which but it's been at least 6 months since we've upgraded

          Show
          scoobyshi Scott Justason added a comment - Yes, I forgot to mention this problem only manifested after we upgraded to 2.28 from an earlier version (I don't remember which but it's been at least 6 months since we've upgraded
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          I will assign it to Authorize Project plugin maintainer. Maybe he has more insights regarding the potential regressions during the upgrade

          Show
          oleg_nenashev Oleg Nenashev added a comment - I will assign it to Authorize Project plugin maintainer. Maybe he has more insights regarding the potential regressions during the upgrade
          Hide
          ikedam ikedam added a comment -

          "You" in the error message in the configuration page means the user configuring that project.
          "You" in the build log is the user building that build.
          They are different and the mismatched error messages doesn't mean inconsistency.

          Rather, there sounds inconsistency of behaviors of build action and post-build action.

          Anyway, this sounds an issue of parameterized-trigger plugin, and I change the component/s.

          Show
          ikedam ikedam added a comment - "You" in the error message in the configuration page means the user configuring that project. "You" in the build log is the user building that build. They are different and the mismatched error messages doesn't mean inconsistency. Rather, there sounds inconsistency of behaviors of build action and post-build action. Anyway, this sounds an issue of parameterized-trigger plugin, and I change the component/s.
          Hide
          ikedam ikedam added a comment - - edited

          Mike Kinghan
          Would you attach a screenshot of the upstream project when you configure a post-build action to trigger the downstream project?

          Show
          ikedam ikedam added a comment - - edited Mike Kinghan Would you attach a screenshot of the upstream project when you configure a post-build action to trigger the downstream project?
          Hide
          ikedam ikedam added a comment -

          Note: you should use "Run as Specific User" when you use build triggers,
          as builds triggered via build triggers are considered run as anonymous when using "Run as User who Triggered Build".

          Show
          ikedam ikedam added a comment - Note: you should use "Run as Specific User" when you use build triggers, as builds triggered via build triggers are considered run as anonymous when using "Run as User who Triggered Build".

            People

            • Assignee:
              huybrechts huybrechts
              Reporter:
              imkinghan Mike Kinghan
            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: