Skip to content

Prevent to hit rpmlint_log action if no builds yet #17966

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ncounter
Copy link
Contributor

@ncounter ncounter commented May 28, 2025

Fixes #17960

The changes look quite complex but it's just because of the indentation. It only wraps and prevents to run the js call in case of the condition repository_list.empty? that means that there are no builds yet available despite repositories are configured already in the related project.

Depends on #17970

@github-actions github-actions bot added the Frontend Things related to the OBS RoR app label May 28, 2025
= render partial: 'no_repositories', locals: { project: project }
- else
- if repository_list.empty?
= render partial: 'no_repositories', locals: { project: project }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really true right? Just because you have no buildresults does not mean you have no repositories....

For instance this was one of the packages where this came from:

https://build.opensuse.org/package/show/SUSE:SLE-15-SP3:GA/suse-prime.15937

The project has plenty of repositories defined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda. Your picture is pretty much correct, it's the naming of the variables and the partial that is tricky.
repository_list comes from the package_controller and it is an extracted list of repositories the ones if there is a build result of it. The differentiation for when there are no build results or there are really not even repositories define it is handled internally in the no_repositories partial.
I fully agree with you if you say "then, let's rename and refactor better because as it is right now it's completely misleading", but because this partial is used by multiple code path I'd rather postpone it. Tracked here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial refactoring/renaming step available here --> #17970 , just to give a hint what the partial stands for

@ncounter ncounter marked this pull request as draft May 30, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Things related to the OBS RoR app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[production][package#rpmlint_log] param is missing or the value is empty: repository
2 participants