[FOLIO-3510] UI builds fail in CI during translation compilation Created: 20/May/22  Updated: 07/Sep/22  Resolved: 07/Sep/22

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Bug Priority: P3
Reporter: Zak Burke Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
is blocked by FOLIO-3432 Update NodeJS to Active LTS (v16) in ... Closed
Relates
relates to FOLIO-3432 Update NodeJS to Active LTS (v16) in ... Closed
relates to FOLIO-3509 npm publish fails in CI boxes after N... Closed
Sprint: stripes-force 144, stripes-force 145, stripes-force 142, stripes-force 146, stripes-force 147, stripes-force 141, stripes-force 140
Story Points: 3
Development Team: Stripes Force
Release: Nolana (R3 2022)
RCA Group: Third party component integration

 Description   

Overview: UI builds fail in CI during translation compilation with an error like the following:

/home/runner/work/ui-inventory/ui-inventory/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:3316
s.prepend(`import { ${input.slice(specifier.local.start, specifier.local.end)} } from '${node.source?.value}'\n`);
                                                                                                     ^


 Comments   
Comment by Zak Burke [ 20/May/22 ]

vue, a transitive dependency of @formatjs-cli, states a minimum node version of 16.5, a requirement which did not bubble up through @formatjs-cli, which states a minimum version of 10. Despite the requirement, no incompatible code was introduced to vue until 3.2.24 that leverages optional chaining syntax, ?.. Our CI boxes presently run node 12, hence PRs began failing when 3.2.24 started filtering into the builds.

I filed issue #3602 with @formatjs/cli and had a thoughtful discussion with the owner about publishing a patch release that locked to vue 3.2.23 but was not successful in convincing him to do this. Instead, he opted to fix the issue by publishing the new node version in a breaking change/new major release. This is understandable, but unfortunate.

Discussion at #stripes-architecture centered around two options:

  1. update the node version on our CI boxes to 16, a broad change and one we know we want to move toward anyway
  2. pin the vue version, a small change with a limited blast radius and one that holds us back instead of moving us forward

Ultimately, we settled on Option 1, discussed it with devops, and have their support (but also their caution as they have seen some test errors when upgrading some Jenkins-based repos).

Comment by Zak Burke [ 25/May/22 ]

Two things that fell out of this whole kerfuffle were

  1. if we handled translation compilation via stripes-cli instead of natively via formatjs-cli, we could have substantially insulated ourselves from all these updates because it would only have been necessary to pin vue in one place (stripes-cli) instead of every place
  2. if we had been committing yarn.lock and built in CI with yarn --frozen-lockfile we could have avoided this as well, at least until the next time we added a new package to any given repo.

IOW, we are learning, and hopefully improving!

Generated at Thu Feb 08 23:28:40 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.