docs: factory version bump description #1124
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
CONTRIBUTING > Releasing a new factory version specifies releasing a new
cypress/factoryversion after changes to factory.Dockerfile or installScripts. It does not mention changes to the factory/.env file.In practice, changes to the following parameters in the factory/.env file have prompted bumping the
FACTORY_VERSIONand recording it in the factory/CHANGELOG:BASE_IMAGEFACTORY_DEFAULT_NODE_VERSIONYARN_VERSIONChanges to the following parameters have not caused
FACTORY_VERSIONto be bumped:CHROME_VERSIONCYPRESS_VERSIONEDGE_VERSIONFIREFOX_VERSIONThis unwritten rule should be documented.
Discussion
BASE_IMAGE
Changes to
BASE_IMAGEmust be accompanied by a bump toFACTORY_VERSIONin factory/.env. This environment variable is used in factory/docker-compose.yml and if it were not updated, then Docker images such ascypress/base,cypress/browsersandcypress/includedwould build on the oldBASE_IMAGEvalue.FACTORY_DEFAULT_NODE_VERSION
The environment variable
CYPRESS_FACTORY_DEFAULT_NODE_VERSIONis loaded into thecypress/factoryimage, so in order to release this change, and keep released images consistent with the factory/.env contents,FACTORY_VERSIONmust be bumped.YARN_VERSION
The
cypress/factoryimage does not contain Yarn. IfYARN_VERSIONis changed in factory/.env it does not cause any new releases ofcypress/base,cypress/browsersorcypress/includedto take place, since releases are only triggered when there is a change of tag. The Yarn version is not included in any tag, so there is no tag change.Nevertheless,
YARN_VERSIONis a significant parameter. BumpingFACTORY_VERSIONand logging the change in the factory/CHANGELOG is worthwhile simply from a documentation standpoint.Browser versions
Browsers are not built into
cypress/factoryand changes should not be logged into factory/CHANGELOG or cause a change ofFACTORY_VERSION.CHROME_VERSIONEDGE_VERSIONFIREFOX_VERSIONCYPRESS_VERSION
The parameter
CYPRESS_VERSIONin factory/.env only affects thecypress/includedimage, notcypress/factory,cypress/baseorcypress/browsers, so changes should not be logged into factory/CHANGELOG or cause a change ofFACTORY_VERSION.Change
Add information that the
FACTORY_VERSIONshould be changed for the following parameters, and for no others:BASE_IMAGEFACTORY_DEFAULT_NODE_VERSIONYARN_VERSION