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

Allow to partially re-schedule a product from a job #5233

Merged
merged 4 commits into from Jul 24, 2023

Conversation

Martchus
Copy link
Contributor

@Martchus Martchus commented Jul 4, 2023

  • Fix re-triggering scheduled products with falsy required params
    (see commit message for details)

  • Allow to re-trigger a scheduled product from the job details
    page of a job of this product
    • Re-schedule the job itself and all its chained children
      and parallel dependencies
    • Do not re-schedule chained parents
  • Refactor JavaScript code for re-scheduling so it can be used
    on the job details page as well
  • Improve error handling in JavaScript code for re-scheduling
  • State successful re-triggering via "The product has been
    re-triggered as …" with a link (instead of "… should appear
    when refreshing page.").
  • Related ticket: https://progress.opensuse.org/issues/124469

It is possible to set required parameters to falsy values when
scheduling a product, e.g. `VERSION=0`. This changes allows
re-triggering such a scheduled product without running into a
validation error.
* Allow to re-trigger a scheduled product from the job details
  page of a job of this product
    * Re-schedule the job itself and all its chained children
      and parallel dependencies
    * Do *not* re-schedule chained parents
* Refactor JavaScript code for re-scheduling so it can be used
  on the job details page as well
* Improve error handling in JavaScript code for re-scheduling
* State successful re-triggering via "The product has been
  re-triggered as …" with a link (instead of "… should appear
  when refreshing page.").
* Related ticket: https://progress.opensuse.org/issues/124469
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #5233 (d008837) into master (aa85372) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #5233   +/-   ##
=======================================
  Coverage   98.31%   98.31%           
=======================================
  Files         389      389           
  Lines       37133    37140    +7     
=======================================
+ Hits        36506    36514    +8     
+ Misses        627      626    -1     
Impacted Files Coverage Δ
lib/OpenQA/WebAPI/Controller/API/V1/Iso.pm 96.59% <100.00%> (+1.13%) ⬆️
t/ui/17-product-log.t 100.00% <100.00%> (ø)
t/ui/18-tests-details.t 100.00% <100.00%> (ø)

Copy link
Member

@okurz okurz left a comment

Choose a reason for hiding this comment

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

Looks good to me but we should give more people the opportunity to review over a bit longer time hence adding not-ready label

@okurz okurz added the not-ready label Jul 4, 2023
* Ask for confirmation before invoking the re-trigger
* Related ticket: https://progress.opensuse.org/issues/124469
@Martchus
Copy link
Contributor Author

Removing the not-ready label as we gave people enough time to review. There's still at least one more review required anyways.

@mergify mergify bot merged commit b9e03ab into os-autoinst:master Jul 24, 2023
36 checks passed
@Martchus Martchus deleted the partial-retrigger branch July 24, 2023 09:32
const id = jqXHR.responseJSON?.scheduled_product_id;
const msg =
typeof id === 'number'
? `The product has been re-triggered as <a href="/admin/productlog?id=${id}">${id}</a>.`
Copy link
Contributor

Choose a reason for hiding this comment

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

This results in

unterminated quoted string literal at /usr/lib/perl5/vendor_perl/5.26.1/Mojolicious/Plugin/AssetPack/Pipe/JavaScript.pm line 22.

in https://build.opensuse.org/package/live_build_log/devel:openQA/openQA/openSUSE_Leap_15.4/x86_64

Copy link
Member

Choose a reason for hiding this comment

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

I proposed #5264 to address this

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.

None yet

4 participants