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

Setting publish flag in OBS workflows seams to be ineffective #14978

Closed
davidcassany opened this issue Sep 27, 2023 · 7 comments · Fixed by #15117 or #15951
Closed

Setting publish flag in OBS workflows seams to be ineffective #14978

davidcassany opened this issue Sep 27, 2023 · 7 comments · Fixed by #15117 or #15951
Labels
Bug Frontend Things related to the OBS RoR app scm-ci Things related to the scm-ci feature

Comments

@davidcassany
Copy link

Issue Description

The issue raises when trying to create branches using SCM workflows based in github pull requests. We configured our workflow to actually publish the branched project and the flag appears if I check it in the UI, the problem is that builds are not actually published. As soon as I resave the meta (via UI or via osc meta prj -e) publishing start even if this flag was unchanged.

An example of a non published branched project can be seen here. The meta at project level clearly shows:

<publish>
  <enable/>
</publish>

The worflow that created such project is set as:

pr_workflow:
  steps:
    - branch_package:
        source_project: isv:Rancher:Elemental:Dev
        source_package: elemental-operator
        target_project: isv:Rancher:Elemental:PR
    - set_flags:
        flags:
          - type: publish
            status: enable
            project: isv:Rancher:Elemental:PR
  filters:
    event: pull_request
    branches:
      only:
        - main

Expected Result

I would have expected the publishing falg to be applied from the first build and get binaries published so we can run some continuous integration processes based on OBS builds.

How to Reproduce

Set a branch_package on github pull requests and set the publish flag to enable (see the setup above), then create a PR and the branch and build will happen as expected, however the publishing won't.

Further Information

Nothing relevant

@hennevogel hennevogel added Bug Frontend Things related to the OBS RoR app labels Sep 27, 2023
@hennevogel
Copy link
Member

This should be a simple main_object.store if main_object is a Project.

@hennevogel hennevogel added the scm-ci Things related to the scm-ci feature label Oct 9, 2023
@hennevogel
Copy link
Member

Fix issue

@rubhanazeem
Copy link
Member

@davidcassany it should be fixed now. Please let us know if it is still happening

@davidcassany
Copy link
Author

@rubhanazeem sorry to come back to this topic late, until now I did not have a chance to exercise this issue again. I confirm I still face the issue. It is not fixed...

I created a fake PR for testing purposes in case you want to check it and have a look. I'd be happy to also demo it if needed or you struggle to reproduce it. I think I am not missing anything. Our current workflow setup has not changed, it still is

pr_workflow:
  steps:
    - branch_package:
        source_project: isv:Rancher:Elemental:Dev
        source_package: elemental-operator
        target_project: isv:Rancher:Elemental:PR
    - branch_package:
        source_project: isv:Rancher:Elemental:Dev
        source_package: elemental-operator-helm
        target_project: isv:Rancher:Elemental:PR
    - branch_package:
        source_project: isv:Rancher:Elemental:Dev
        source_package: elemental-operator-crds-helm
        target_project: isv:Rancher:Elemental:PR
    - branch_package:
        source_project: isv:Rancher:Elemental:Dev
        source_package: operator-image
        target_project: isv:Rancher:Elemental:PR
    - branch_package:
        source_project: isv:Rancher:Elemental:Dev
        source_package: seedimage-builder
        target_project: isv:Rancher:Elemental:PR
    - set_flags:
        flags:
          - type: publish
            status: enable
            project: isv:Rancher:Elemental:PR

And I can see the flag in meta as:

<publish>
 <enable/>
</publish>

You can see the generated project did not publish anything after the build. The interesting thing is that the meta XML looks correct and if I save it again (even without any change) publishing automatically starts in a matter of few seconds 🤷🏽‍♂️

@hennevogel hennevogel reopened this Nov 24, 2023
@hennevogel
Copy link
Member

@eduardoj
Copy link
Member

eduardoj commented Apr 8, 2024

@davidcassany, I realized that the isv:Rancher project, an ancestor of your test project ( isv:Rancher:Elemental:PR:rancher:elemental-operator:PR-573 ) has its "Publish flag" in state disabled, even it hasn't any package. See https://build.opensuse.org/repositories/isv:Rancher .

Could we try to enable this flag for this isv:Rancher parent project and see what happens?

@davidcassany
Copy link
Author

Just for the records I want to confirm the issue is fixed, thanks much 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Frontend Things related to the OBS RoR app scm-ci Things related to the scm-ci feature
Projects
None yet
4 participants