Skip to content
Snippets Groups Projects

Improve performance of design_at_version specs

What does this MR do and why?

This MR switches out some let! calls with let_it_be in design_at_version_spec.rb. Since the objects created in these are not changed, using let_it_be prevents these from being recreated in each individual spec, and instead once in the describe block. This significantly reduces the time it takes this spec to run observed locally.

References

MR acceptance checklist

  • You have self-reviewed this MR per code review guidelines.
  • The code follows the software design guidelines.
  • Ensure automated tests exist following the testing pyramid. Add missing tests or create an issue documenting testing gaps.
  • You have considered the technical impacts on GitLab.com, Dedicated and self-managed.
  • You have considered the impact of this change on the frontend, backend, and database portions of the system where appropriate and applied the ~ux, frontend, backend, and database labels accordingly.
  • You have tested this MR in all supported browsers, or determined that this testing is not needed.
  • You have confirmed that this change is backwards compatible across updates, or you have decided that this does not apply.
  • You have properly separated EE content (if any) from FOSS. Consider running the CI pipelines in a FOSS context.
  • You have considered that existing data may be surprisingly varied. For example, if adding a new model validation, consider making it optional on existing data.
  • You have fixed flaky tests related to this MR, or have explained why they can be ignored. Flaky tests have error Flaky test '<path/to/test>' was found in the list of files changed by this MR. but can be in jobs that pass with warnings.

Screenshots or screen recordings

Before After
Screenshot_2025-02-03_at_10.49.13_am Screenshot_2025-02-03_at_10.50.07_am

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #229663 (closed)

Edited by Matt D'Angelo

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
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading