[go: up one dir, main page]

Refactor workspaces component-related code and specs

Issue: Refactorings to workspace container/script logic (#511503 - closed)

What does this MR do and why?

Refactor workspaces component-related code and specs.

This is a preliminary refactoring/rename/cleanup to prepare for Add support for devfile postStart event in Work... (#505988 - closed), as previously discussed with @vtak .

Changes:

  • Split out logic for updating main/editor component to new MainComponentUpdater ROP step class, to separate it from the Tools Injector component logic.
  • Change terminology of ROP steps for new components from Injector to Inserter, since "injector" was an overloaded term (we call the init container which injects the tools the "tools-injector" component
  • Renamed gl-cloner-injector component (and associated command) to gl-project-cloner, to be consistent with other references to "project cloner" and to avoid the overloaded "injector" term.
  • Renamed associated fixture files to be consistent with above changes
  • Changes following files to use fast_spec_helper:
    • ee/spec/lib/remote_development/workspace_operations/create/project_cloner_component_inserter_spec.rb
    • ee/spec/lib/remote_development/workspace_operations/create/post_flatten_devfile_validator_spec.rb
    • ee/spec/lib/remote_development/workspace_operations/create/pre_flatten_devfile_validator_spec.rb
  • Updates fast_spec_helper to mock out _ method from GettextI18nRails

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

N/A, pure refactoring, no UI or functionality changes

How to set up and validate locally

  • Workspace creation, reconcile, and usage (cloning and volume mounting) should still work as expected.
Edited by Chad Woolley

Merge request reports

Loading