Skip to content

Allow deflake action only if user is allowed to run builds#29

Merged
mythsunwind merged 3 commits intomasterfrom
deflake-permission
Oct 2, 2024
Merged

Allow deflake action only if user is allowed to run builds#29
mythsunwind merged 3 commits intomasterfrom
deflake-permission

Conversation

@mythsunwind
Copy link
Contributor

This shows the action button only if the user has the right permissions to run builds.

Testing done

Manually tested via mvn hpi:run

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@mythsunwind mythsunwind requested a review from a team as a code owner October 2, 2024 16:29
@mythsunwind mythsunwind merged commit 2decb83 into master Oct 2, 2024
@mythsunwind mythsunwind deleted the deflake-permission branch October 2, 2024 16:29
@mythsunwind mythsunwind added the bug label Oct 2, 2024
@piyugit
Copy link

piyugit commented Oct 28, 2024

We are experiencing issues with the latest version of the Flaky Tests plugin due to the "Deflake this build" option no longer being visible. This problem appears to be related to permission settings that now check only for global build permissions rather than job-specific permissions. Since our setup does not grant global permissions to users, this approach is incompatible with our environment and prevents us from effectively using this latest plugin version

@mythsunwind
Copy link
Contributor Author

mythsunwind commented Oct 28, 2024

Thanks for the report. I will take a look tomorrow. Can you explain how you set job-specific permissions? Is this a specific plugin in Jenkins?

@mythsunwind
Copy link
Contributor Author

Hey @piyugit I opened a PR #37 for you. If possible can you maybe test it on your jenkins? I am still unsure if this is the right solution for you. You can compile an hpi with mvn package from this branch which you can then manually load into your jenkins.

@piyugit
Copy link

piyugit commented Nov 20, 2024

Hi @mythsunwind, I tested #37 , but the deflake option is still not visible to me even after manually loading it into the Jenkins. below are my permission level

1# We are part of QA group where we have all permissions see image=>
image
2# this is a overall permission structure (QA is a separate folder space of QA users)
image

It is only working even on the latest published version when QA folder/group got the access below
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants