Skip to content

Remove CSS-in-Js before running utils comparison script

Paul Gascou-Vaillancourt requested to merge fix-utils-compare-script into master

What does this MR do and why?

The compare_css_util_classes script has a tendency to fail when the CSS-in-Js was built prior to running it. This has caused a broken master after we introduced a prelint:stylelint NPM script that builds Tailwind before running Stylelint, which also happens to run before the comparison script in the static-analysis CI job.

We are therefore adding a prelint:tailwind-utils NPM script to ensure that the CSS-in-Js always gets removed before executing the script.

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.

How to set up and validate locally

  1. Start by removing the CSS-in-Js file if any:

    rm config/helpers/tailwind/css_in_js.js
  2. Run the legacy utils comparison script:

    yarn lint:tailwind-utils
    • It should succeed.
  3. Run the script again.

    • On master, the script should error out this time and in all subsequent runs unless you manually remove the CSS-in-Js before running the script.
    • On this branch, the script should always succeed.

Re gitlab-org/quality/engineering-productivity/master-broken-incidents#7786 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading