FOLIO-4506 Fail release builds when lockfiles pin snapshot dependencies#149
Conversation
|
@alb3rtino -- Please define this new configuration variable at README-UI.md (Is there a Jira ticket for this?) Cc: @zburke and @ncovercash |
|
@dcrossleyau Happy to expose it as a user input so users can opt-out. Let me know if you'd like that. I have created FOLIO-4506 for this. |
|
I like the idea, however, I'm not sure it's possible to get to this scenario...the NPM repository is already determined by the action depending on if it's a release or not, so if it is a release then |
It is. See stripes-components v13.1.0 release workflow. |
|
@ncovercash, what advantage do you see in exposing this value as a user-settable attribute? My take on this PR had been, "Whoops, good catch, this fixes a bug." What am I missing? |
|
@alb3rtino ah, forgot about some modules having their own lockfile (rather than most of the UI ones being generated at build time). @zburke I'm fine not having it be user-settable, unless you can think of any scenario where we'd need to publish with a snapshot dependency (I can't). I would probably recommend renaming the step to |
|
Thanks for the explanation. I mis-interpreted what "inputs" meant in this case. Leaving it to the experts. |
https://folio-org.atlassian.net/browse/FOLIO-4506
Purpose
Release builds must not ship with snapshot dependencies pinned in
yarn.lock. Snapshot versions resolve from thenpm-foliocirepository, whereas released versions resolve fromnpm-folio. If a release tag is built against a lockfile that still referencesnpm-folioci, the resulting artifact depends on non-released FOLIO packages. This change prevents such releases from succeeding by failing the UI install-and-lint workflow when snapshot resolutions are detected on a release tag.Approach
fail-on-snapshot-depsinput toui-install-and-lint.ymlthat, when true, grepsyarn.lockfornpm-foliociresolutions and fails the job if any are found.ui.ymlto passfail-on-snapshot-deps: trueonly whenis-releaseisTrue.