Skip to content

feat: Fail submission if packages have not been cleaned up for days#593

Open
kalikiana wants to merge 1 commit into
os-autoinst:masterfrom
kalikiana:trigger_fail_daysold
Open

feat: Fail submission if packages have not been cleaned up for days#593
kalikiana wants to merge 1 commit into
os-autoinst:masterfrom
kalikiana:trigger_fail_daysold

Conversation

@kalikiana

@kalikiana kalikiana commented Jun 10, 2026

Copy link
Copy Markdown
Member

Currently there's only INFO messages and even though this will break things Jenkins pipelines are successful when there are old packages.

@kalikiana kalikiana force-pushed the trigger_fail_daysold branch from ac6bab0 to 85bdc04 Compare June 10, 2026 13:42
Comment thread trigger-openqa_in_openqa Outdated
echo "+++ NOTE+++ Only triggering tests from $src_project (not overriding $staging_project and doing a submission) because $staging_project still contains packages. You might need to do a manual cleanup if no other pipeline is running. Packages: $staged_packages" \
| tee job_post_skip_submission
local staging_project_url="https://build.opensuse.org/project/show/$staging_project"
if curl -sL "$staging_project_url" | grep -q -v Days; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How does this condition check for "in 6+ hours"?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, Days will never be in the curl output. 1. It's lowercase "days" 2. The package list is generated by javascript, so the HTML will never contain any package names or dates.
I would try using osc api. It doesn't provide package timestamps for the whole project, but if there are any packages (osc ls devel:openQA:testing), one can check at least one of them with obs api /source/devel:openQA:testing/os-autoinst/_history to get the timestamp.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed. Thanks for noticing!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

did you completely miss my comment? this can't work

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this can't work

I also don't see how this can work.

@okurz okurz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@kalikiana kalikiana force-pushed the trigger_fail_daysold branch from 85bdc04 to 568e9b2 Compare June 11, 2026 08:52
Currently there's only INFO messages and even though this will break
things Jenkins pipelines are successful when there are old packages.
@kalikiana kalikiana force-pushed the trigger_fail_daysold branch from 568e9b2 to 3d1fa8e Compare June 11, 2026 08:54
Comment thread trigger-openqa_in_openqa
Comment on lines +125 to +129
local staging_project_url="https://build.opensuse.org/project/show/$staging_project"
if curl -sL "$staging_project_url" | grep -q Days; then
echo "Stale packages have not been cleaned up in 1+ days. Check $staging_project_url"
return 1
fi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The above comment says "You might need" so it's conditional. Also the message states "if no other pipeline is running" which isn't checked here. Are we sure this is the right condition to consistently fail on? What other situations can arise where this failure would just annoy as because we already know that we have a situation where there are still packages? What if package submissions are just pending acceptance for valid reasons?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also the message states "if no other pipeline is running" which isn't checked here.

We don't run pipelines in parallel, and for this case it wouldn't be a problem anyway.

Are we sure this is the right condition to consistently fail on? What other situations can arise where this failure would just annoy as because we already know that we have a situation where there are still packages? What if package submissions are just pending acceptance for valid reasons?

the testing project should always be cleaned after openQA tests have finished.
if there are still packages for longer, something went wrong. we can try to improve that situation by cleaning the project in more cases, but right now we have the situation that the whole submission process is blocked by this and noone notices if that happens.

but the implementation of the check won't work like that, as i wrote in my other comment

@mergify

mergify Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants