Skip to content

Conversation

@MikeMcC399
Copy link
Collaborator

@MikeMcC399 MikeMcC399 commented Jun 19, 2024

Issue

CONTRIBUTING > Releasing a new factory version specifies releasing a new cypress/factory version 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_VERSION and recording it in the factory/CHANGELOG:

  • BASE_IMAGE
  • FACTORY_DEFAULT_NODE_VERSION
  • YARN_VERSION

Changes to the following parameters have not caused FACTORY_VERSION to be bumped:

  • CHROME_VERSION
  • CYPRESS_VERSION
  • EDGE_VERSION
  • FIREFOX_VERSION

This unwritten rule should be documented.

Discussion

BASE_IMAGE

Changes to BASE_IMAGE must be accompanied by a bump to FACTORY_VERSION in factory/.env. This environment variable is used in factory/docker-compose.yml and if it were not updated, then Docker images such as cypress/base, cypress/browsers and cypress/included would build on the old BASE_IMAGE value.

FACTORY_DEFAULT_NODE_VERSION

The environment variable CYPRESS_FACTORY_DEFAULT_NODE_VERSION is loaded into the cypress/factory image, so in order to release this change, and keep released images consistent with the factory/.env contents, FACTORY_VERSION must be bumped.

YARN_VERSION

The cypress/factory image does not contain Yarn. If YARN_VERSION is changed in factory/.env it does not cause any new releases of cypress/base, cypress/browsers or cypress/included to 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_VERSION is a significant parameter. Bumping FACTORY_VERSION and logging the change in the factory/CHANGELOG is worthwhile simply from a documentation standpoint.

Browser versions

Browsers are not built into cypress/factory and changes should not be logged into factory/CHANGELOG or cause a change of FACTORY_VERSION.

  • CHROME_VERSION
  • EDGE_VERSION
  • FIREFOX_VERSION

CYPRESS_VERSION

The parameter CYPRESS_VERSION in factory/.env only affects the cypress/included image, not cypress/factory, cypress/base or cypress/browsers, so changes should not be logged into factory/CHANGELOG or cause a change of FACTORY_VERSION.

Change

Add information that the FACTORY_VERSION should be changed for the following parameters, and for no others:

  • BASE_IMAGE
  • FACTORY_DEFAULT_NODE_VERSION
  • YARN_VERSION

@cypress-app-bot
Copy link

@MikeMcC399 MikeMcC399 self-assigned this Jun 19, 2024
@MikeMcC399 MikeMcC399 marked this pull request as ready for review June 19, 2024 13:30
@jennifer-shehane jennifer-shehane merged commit 6196d6d into cypress-io:master Jun 19, 2024
@MikeMcC399 MikeMcC399 deleted the factory-version-docs branch June 19, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants