packit: pull_request jobs fail on permissions

The packit jobs triggered on PR https://github.com/oamg/convert2rhel/pull/82 say: Submit of the build failed: Only owners and admins may update their projects.

But @SpyTec has another PR, https://github.com/oamg/convert2rhel/pull/78, where the jobs run fine. @SpyTec is an admin of the https://github.com/oamg/convert2rhel/ repo.

The only reason that comes to my mind is that the PR is marked as a draft.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (12 by maintainers)

Most upvoted comments

@bocekm I’ll take a look. The problem is that we are trying to update copr project settings (chroots, removal, additional_repos,…) each time to be able to change the settings also after the copr project creation. That can be a problem for the custom project since we don’t permissions to do the updates.

I would like to implement the following fix:

  • Update only if needed – this should solve your situation. You didn’t change anything so you don’t need the update.
  • If the update is needed and we don’t have enough permissions to do it, we need to ask for admin permissions or comment about what needs to be manually changed by admins of the copr project.
1. Grant our COPR packit user admin rights in your project so it can set the chroot list correctly.

We need to ask for that permission so they can grant it to us. (We can do that manually if you need it ASAP.)

2. Set the chroot list yourself (match what you have in packit.yaml).

Teammates, please correct me if I’m wrong.

You can also remove the custom project/user from config for now.

Hey @bocekm, @lachmanfrantisek will look into this.

  • If we can’t update because of the permissions.
    • Place a comment with the info about a need to grant the permissions to our user or do the change manually.
  • Users don’t need to grant us higher permissions if they don’t want to.

The thing is that unless your packit copr user requests the Admin permissions, nobody can grant them: Screenshot from 2020-07-16 12-59-35

So you either request for the Admin permissions right away when you realize you don’t have them, and/or, and I think that would be sufficient, just add a comment explaining what the current copr project admins should change in the settings.