Skip to content
Snippets Groups Projects

Fix review apps cleanups

Merged David Dieulivol requested to merge 359100-review_cleanup_issues into master
All threads resolved!

What does this MR do and why?

Closes #359100 (closed) Closes https://gitlab.com/gitlab-org/quality/engineering-productivity-infrastructure/-/issues/18

There will be a follow-up issue (https://gitlab.com/gitlab-org/quality/engineering-productivity-infrastructure/-/issues/36) to clean up the orphaned resources in the cluster.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Rémy Coutable

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • A deleted user added backend label

    added backend label

  • 1 Message
    :book: CHANGELOG missing:

    If you want to create a changelog entry for GitLab FOSS, add the Changelog trailer to the commit message you want to add to the changelog.

    If you want to create a changelog entry for GitLab EE, also add the EE: true trailer to your commit message.

    If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.

    Pipeline Changes

    This merge request contains changes to the pipeline configuration for the GitLab project.

    Please consider the effect of the changes in this merge request on the following:

    Please consider communicating these changes to the broader team following the communication guideline for pipeline changes

    Reviewer roulette

    Changes that require review have been detected!

    Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:

    Category Reviewer Maintainer
    backend Jon Jenkins current availability (@jon_jenkins) (UTC-6, 7 hours behind @ddieulivol) Igor Drozdov current availability (@igor.drozdov) (UTC+1, same timezone as @ddieulivol)
    maintenanceworkflow / maintenancepipelines for CI, Danger Maxime Orefice current availability (@morefice) (UTC+1, same timezone as @ddieulivol) Igor Drozdov current availability (@igor.drozdov) (UTC+1, same timezone as @ddieulivol)

    To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

    To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

    Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

  • David Dieulivol
  • David Dieulivol
  • David Dieulivol
  • Rémy Coutable
    • Resolved by Rémy Coutable

      So I ran review-cleanup but I think this error prevents the process from finishing and getting to the Helm cleanup:

      /usr/local/lib/ruby/gems/3.0.0/gems/gitlab-4.19.0/lib/gitlab/request.rb:71:in `validate': Server responded with code 500, message: 500 Internal Server Error. Request URI: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab/environments/12187117 (Gitlab::Error::InternalServerError)
      	from /usr/local/lib/ruby/gems/3.0.0/gems/gitlab-4.19.0/lib/gitlab/request.rb:55:in `block (2 levels) in <class:Request>'
      	from /usr/local/lib/ruby/gems/3.0.0/gems/gitlab-4.19.0/lib/gitlab/client/environments.rb:74:in `delete_environment'
      	from /usr/local/lib/ruby/gems/3.0.0/gems/gitlab-4.19.0/lib/gitlab.rb:28:in `method_missing'
      	from scripts/review_apps/automated_cleanup.rb:189:in `delete_environment'
      	from scripts/review_apps/automated_cleanup.rb:89:in `block in perform_gitlab_environment_cleanup!'
      	from /usr/local/lib/ruby/gems/3.0.0/gems/gitlab-4.19.0/lib/gitlab/paginated_response.rb:41:in `<<'
      	from /usr/local/lib/ruby/gems/3.0.0/gems/gitlab-4.19.0/lib/gitlab/paginated_response.rb:41:in `each_page'
      	from /usr/local/lib/ruby/gems/3.0.0/gems/gitlab-4.19.0/lib/gitlab/paginated_response.rb:52:in `each'
      	from /usr/local/lib/ruby/gems/3.0.0/gems/gitlab-4.19.0/lib/gitlab/paginated_response.rb:52:in `each'
      	from /usr/local/lib/ruby/gems/3.0.0/gems/gitlab-4.19.0/lib/gitlab/paginated_response.rb:52:in `each'
      	from /usr/local/lib/ruby/gems/3.0.0/gems/gitlab-4.19.0/lib/gitlab/paginated_response.rb:52:in `each'
      	from /usr/local/lib/ruby/gems/3.0.0/gems/gitlab-4.19.0/lib/gitlab/paginated_response.rb:52:in `auto_paginate'
      	from scripts/review_apps/automated_cleanup.rb:76:in `perform_gitlab_environment_cleanup!'
      	from scripts/review_apps/automated_cleanup.rb:289:in `block in <main>'
      	from scripts/review_apps/automated_cleanup.rb:266:in `timed'
      	from scripts/review_apps/automated_cleanup.rb:288:in `<main>'

      It seems the environment doesn't exist: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab/environments/12187117

  • David Dieulivol changed the description

    changed the description

  • added 1 commit

    • 3c988e94 - Harmonize helm delete of releases

    Compare with previous version

    • Resolved by David Dieulivol

      I think we'll also need to fix

      Checking for Helm releases that are failed or not updated in the last 7 days...
      Running command: `helm list --namespace "review-apps" --max 256 --offset 0 --output json --all --date`
      Running command: `helm list --namespace "review-apps" --max 256 --offset 256 --output json --all --date`

      Our Helm3Client is only looking at the review-apps namespace:

          def helm
            @helm ||= Tooling::Helm3Client.new(namespace: review_apps_namespace)
          end
  • added 1 commit

    Compare with previous version

  • David Dieulivol
  • added 1 commit

    • 040c5d50 - Ignore 500 errors when deleting environments

    Compare with previous version

  • David Dieulivol requested review from @rymai

    requested review from @rymai

  • David Dieulivol changed the description

    changed the description

  • added 1 commit

    • 8391d811 - Do not namespace the helm delete command

    Compare with previous version

  • It looks like we have specs for the helm3 client :laughing: https://gitlab.com/gitlab-org/gitlab/-/jobs/3331487772

  • added 1 commit

    Compare with previous version

  • Rémy Coutable approved this merge request

    approved this merge request

  • :wave: @rymai, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.

    For more info, please refer to the following links:

  • 🤖 GitLab Bot 🤖 added 1 deleted label

    added 1 deleted label

  • Rémy Coutable resolved all threads

    resolved all threads

  • Rémy Coutable marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

    marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

  • removed missed:15.3 label

  • removed missed:15.2 label

  • removed missed:15.4 label

  • removed missed:15.5 label

  • Rémy Coutable enabled an automatic merge when the pipeline for ad782a0e succeeds

    enabled an automatic merge when the pipeline for ad782a0e succeeds

  • Rémy Coutable mentioned in commit e29c8637

    mentioned in commit e29c8637

  • mentioned in issue #359100 (closed)

  • added workflowstaging label and removed workflowcanary label

  • Contributor

    Great job @ddieulivol!

  • Please register or sign in to reply
    Loading