ci: Fix visual and integration test jobs
What does this MR do?
ci: Fix visual and integration test jobs
This fixes the CI visual and integration test jobs encountered lately, e.g. in !4446 (merged).
The main issue is that the Playwright and Cypress images don't have a C
compiler installed by default, and they use different Node versions
(20.15.1 and 20.5.0, respectively) compared to our main Node image
(20.16.0). So, the node_modules
cache, which is created by the
populate_npm_cache
job using Node 20.16.0, becomes invalid for some
packages. These packages need to be rebuilt to match the current Node
version.
This is fixed by ensuring that GCC is installed on all images which run
yarn install
. The CC environment variable is also removed, since
installing GCC automatically sets up a cc
symbolic link using the
Debian Alternatives system.
This has the downside that those CI jobs are a bit less efficient, as they will be rebuilding those packages each time, rather than using the prepared build cache.
One alternative approach would be to make sure the Node version is consistent across the CI images we use. This doesn't seem viable, though, since we don't have control over the Playwright/Cypress images. We could build our own images, but that seems like too much overhead.
In the future, we could prepare more node_modules
caches to cover all
the Node versions we use in CI, but again, that seems like more trouble
than it's worth, at least for now.
One oddity which isn't explained by all of this is that the Cypress image is on Node 20.5.0, and has been for months. As such, it's not clear why jobs only recently began failing for it.
Screenshots or screen recordings
Integration merge requests
-
GitLab: mr_url -
CustomersDot: mr_url -
Status Page: mr_url
Does this MR meet the acceptance criteria?
This checklist encourages the authors, reviewers, and maintainers of merge requests (MRs) to confirm changes were analyzed for conformity with the project's guidelines, security and accessibility.
Toggle the acceptance checklist
Conformity
-
Code review guidelines. -
GitLab UI's contributing guidelines. -
If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer. -
If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer. -
If the MR changes a component's API, integration MR(s) have been opened (see integration merge requests above). -
Added the ~"component:*"
label(s) if applicable.
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
Security reports checked/validated by a reviewer from the AppSec team
Accessibility
If this MR adds or modifies a component, take a few moments to review the following:
-
All actions and functionality can be done with a keyboard. -
Links, buttons, and controls have a visible focus state. -
All content is presented in text or with a text equivalent. For example, alt text for SVG, or aria-label
for icons that have meaning or perform actions. -
Changes in a component’s state are announced by a screen reader. For example, changing aria-expanded="false"
toaria-expanded="true"
when an accordion is expanded. -
Color combinations have sufficient contrast.