Skip to content

Move Minutes Usage Update to Async Job

Allison Browne requested to merge ab-cancel-on-delete-4 into master

What does this MR do?

This is part of pipeline cryptomining abuse measures. We want to cancel pipelines before deleting them because minutes are not accumulated on deleted jobs that continue to run. In order to cancel pipelines before deleting them and have minutes accumulate properly, we need to compute the minutes synchronously before the destroy to pass off to an async worker that can do the rest.

This is the last MR of 3:

Introduces flag:

!65586 (merged) (Merged)

Splits Service:

!65595 (merged) (Merged) Issue:

https://gitlab.com/gitlab-org/gitlab/-/issues/331891

Screenshots or Screencasts (strongly suggested)

description screenshot location
Created a new group/project Screen_Shot_2021-07-14_at_12.21.08_PM
Added a ci file that sleeps Screen_Shot_2021-07-14_at_12.10.43_PM
enabled 10k minutes in the admin panel Screen_Shot_2021-07-14_at_12.22.34_PM Admin>Settings>CI/CD
Deleted pipelines during a run Screen_Shot_2021-07-14_at_12.11.11_PM
Checked for minute accumultation Screen_Shot_2021-07-14_at_12.18.17_PM Navigate to group Settings>Usage Quotas

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Allison Browne

Merge request reports

Loading