Introduce a configuration file for the Static Site Editor
### Problem to solve To accommodate various static site generators and project customization it is important for the Static Site Editor (SSE) to have a proper understanding of the environment that the project is configured in. While we will default to using sensible defaults there is a strong need to be able to customize these defaults to allow maximum compatibility with projects. Configuration can also be used to modify the default behavior of the SSE. 1. As a Software Developer, I want to override the SSE's default configuration, so I can ensure it works correctly with my project structure. 1. As a Software Developer, I want to override the SSE's default configuration, so I can customize the behavior of the SSE. ### Intended users Personas are described at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/ * [Delaney (Development Team Lead)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#delaney-development-team-lead) * [Sasha (Software Developer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sasha-software-developer) ### User experience goal The user should be able to create/edit a `.gitlab/static-site-editor.yml` file to override the SSE default settings. ### Proposal Introduce a configuration file that is read when the SSE URL (`/-/sse/`) is requested. We should parse, validate, and transform the configuration file entries in the gitlab~2492649 and pass it the the SSE component on the gitlab~3412464. The gitlab~2492649 will only be concerned with the parsing, validation and transformation of the configuration entries. As part of this effort, we should also update the SSE project template to address existing concerns, as well as add support for the new config file format. We will do an experimental spike for the CI in the existing SSE Unfiltered sandbox project to work out the details of what should be in the template and test it: https://gitlab.com/gl-static-site-editor/sse-unfiltered/-/issues/1 ### Further details Refer to the R&D issue, https://gitlab.com/gitlab-org/gitlab/-/issues/217019, where @vyaklushin put together a proposal for the configuration file. ### Documentation We should document all default configuration values. ### Availability & Testing <!-- This section needs to be retained and filled in during the workflow planning breakdown phase of this feature proposal, if not earlier. What risks does this change pose to our availability? How might it affect the quality of the product? What additional test coverage or changes to tests will be needed? Will it require cross-browser testing? Please list the test areas (unit, integration and end-to-end) that needs to be added or updated to ensure that this feature will work as intended. Please use the list below as guidance. * Unit test changes * Integration test changes * End-to-end test change See the test engineering planning process and reach out to your counterpart Software Engineer in Test for assistance: https://about.gitlab.com/handbook/engineering/quality/test-engineering/#test-planning --> ### What does success look like, and how can we measure that? <!-- Define both the success metrics and acceptance criteria. Note that success metrics indicate the desired business outcomes, while acceptance criteria indicate when the solution is working correctly. If there is no way to measure success, link to an issue that will implement a way to measure this. --> ### Is this a cross-stage feature? We might want to introduce a validation linter similar to (.gitlab-ci.yml) for the SSE configuration file in the future. ### Issues and MRs to implement this epic 1. :white_check_mark: Initial Research 1. :white_check_mark: Issue - R&D Static Site Editor configuration file: gitlab#217019 1. :white_check_mark: Issue - Research and document the standards for Gitlab feature configuration files : gitlab#241163 1. :white_check_mark: Issue - Read and pass configuration values to Static Site Editor (implement basic config framework for a single unused value): gitlab#241164 1. :white_check_mark: MR - Incremental refactoring of Static Site Editor controller and config (Iteration 1): gitlab!41620 1. :white_check_mark: MR - Introduce StaticSiteEditorConfigService (Iteration 2): gitlab!41923 1. :white_check_mark: MR - Implement SSE config file processing (Iteration 3): gitlab!41957 1. :white_check_mark: MR - Improve Static Site Editor feature test to cover reading config file (backfill feature test): gitlab!43384 1. :white_check_mark: Issue - Introduce configuration value for static site generator (implemented as part of above MRs): gitlab#241168 1. :white_check_mark: Issue - Optimize and refactor ConfigService and GeneratedConfig (address performance concerns, refactoring): gitlab#251014 1. :white_check_mark: MR - Optimize and refactor ConfigService and GeneratedConfig: gitlab!43480 1. :white_check_mark: Issue - Introduce configuration value for image upload path: gitlab#241165 1. :white_check_mark: MR - Introduce configuration value for image upload path: gitlab!43481 1. :white_check_mark: Issue - Introduce configuration value for mounts: gitlab#241166 1. :white_check_mark: MR - Introduce configuration value for mounts: gitlab!43485 1. :x: Issue: Update docs for new SSE config file - gitlab#262844 - **NOTE: This is being deferred until the actual features using the entries are implemented. Changes we are keeping have been added to https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44906#note_429063972** 1. :x: MR - gitlab!44507 - **NOTE: This contains the copy for the config files which should be used when the features. See also comment thread about introducing a table** 1 Docs: prep for SSE config file - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45267 - **NOTE** This should be closed out, it contains no useful information, we will instead refer to gitlab!44507 to copy content for future features** 1. :white_check_mark: Issue - Optimize SSE Template CI configuration: gl-static-site-editor/sse-unfiltered#1 1. :white_check_mark: MR: gl-static-site-editor/sse-unfiltered!35 1. :white_check_mark: MR: gl-static-site-editor/sse-unfiltered!37 1. :white_check_mark: MR: gl-static-site-editor/sse-unfiltered!38 1. :white_check_mark: MR: gl-static-site-editor/sse-unfiltered!39 1. :white_check_mark: MR: gl-static-site-editor/sse-unfiltered!40 1. Issue - Update the Middleman SSE project template to introduce the configuration file: gitlab#241170 1. MR - TODO: 1. Issue - Data: Track the number of projects with a configuration file with a custom value: gitlab#241195 1. MR - TODO: 1. Issue - Better error message when SSE config file YAML is invalid: gitlab#258840 1. Possibly move to separate epic as part of https://gitlab.com/gitlab-org/gitlab/-/issues/213285#note_414808004 1. Related Issue (to be promoted to epic) - ~~Introduce configuration value for repository URL, username, and project name~~: gitlab#247841 1. UPDATE: This work is on hold, pending discussion regarding https://gitlab.com/gitlab-org/gitlab/-/issues/247841#note_423828335
epic