Skip to content
Snippets Groups Projects

Log QA resource reuse

Merged Mark Lapierre requested to merge ml-log-resource-reuse into master
All threads resolved!

What does this MR do and why?

Changes the debug log message shown when a resource is fabricated.

  • "Built" as previously, when a resource is created.
  • "Retrieved" when an existing resource is fetched.
  • "Retrieved for reuse" when an existing resource is fetched as a reusable resource.

Adds a ReusableGroup class so that ResuableProject is truly reusable (otherwise ResuableProject would create a new group in a different project each time).

Part of https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/1032

Examples

Previously, the debug log for fabricating a resource always said Built, like this:

==> Built a QA::Resource::Project with full_path 'gitlab-qa-sandbox-group/contribution_analytics-a630bee295505362/contribution_analytics-d94f429a07bfa22a' via api in 0.607407829 seconds

Now it still says Built when a new resource is created, but if an existing resource is fetched (instead of creating a new one), it says something like:

==> Retrieved a QA::Resource::Group with full_path 'gitlab-qa-sandbox-group/qa-test-2022-01-10-23-52-28-6e54ea33b183dbe5' via api in 1.244220592 seconds

And if it's a reusable resource:

==> Retrieved for reuse a QA::Resource::ReusableGroup with full_path 'gitlab-qa-sandbox-group/reusable_group' via api in 0.804077896 seconds

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 Mark Lapierre

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
  • Andrejs Cunskis
  • Mark Lapierre added 622 commits

    added 622 commits

    Compare with previous version

  • Andrejs Cunskis resolved all threads

    resolved all threads

  • Andrejs Cunskis approved this merge request

    approved this merge request

  • Andrejs Cunskis mentioned in commit 9f083200

    mentioned in commit 9f083200

  • added workflowcanary label and removed workflowstaging label

  • added workflowproduction label and removed workflowcanary label

  • Please register or sign in to reply
    Loading