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

feat(schedules): Rework daily schedule to always show the next scan #6700

Conversation

vicferpoy
Copy link
Member

Description

With this development, daily schedules will always add a new scheduled scan, with the correct scheduled_at datetime in its details. We are soft deprecating the next_scan_at field for it.

In addition, we added a new Django migration to migrate the former scheduled scans to this "format".

image

When adding new providers for the first time, after requesting POST /schedules/daily, a new scheduled scan with available state will be created right away and will be executed once a worker is available, improving the UX.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@vicferpoy vicferpoy requested a review from a team as a code owner January 27, 2025 15:38
@vicferpoy vicferpoy requested a review from jfagoagas January 27, 2025 15:38
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 78.35052% with 21 lines in your changes missing coverage. Please review.

Project coverage is 93.41%. Comparing base (763130f) to head (7782529).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6700      +/-   ##
==========================================
- Coverage   93.52%   93.41%   -0.11%     
==========================================
  Files          67       70       +3     
  Lines        6330     6412      +82     
==========================================
+ Hits         5920     5990      +70     
- Misses        410      422      +12     
Flag Coverage Δ
api 93.41% <78.35%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler ∅ <ø> (∅)
api 93.41% <78.35%> (-0.11%) ⬇️

AdriiiPRodri
AdriiiPRodri previously approved these changes Jan 27, 2025
Copy link
Contributor

@AdriiiPRodri AdriiiPRodri left a comment

Choose a reason for hiding this comment

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

LGTM

jfagoagas
jfagoagas previously approved these changes Jan 28, 2025
Copy link
Member

@jfagoagas jfagoagas left a comment

Choose a reason for hiding this comment

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

I've just tested out the functionality and works as expected, thanks @vicferpoy 👏

@vicferpoy vicferpoy dismissed stale reviews from jfagoagas and AdriiiPRodri via a47652b February 3, 2025 09:34
@vicferpoy vicferpoy requested a review from a team as a code owner February 3, 2025 09:35
@vicferpoy vicferpoy merged commit ef6af8e into master Feb 3, 2025
10 of 12 checks passed
@vicferpoy vicferpoy deleted the PRWLR-6072-scheduled-scans-must-appear-in-scans-right-after-creating-a-provider branch February 3, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants