Browse Source

build(yarn): Use --frozen-lockfile instead of --pure-lockfile (#17210)

We should have been using `--frozen-lockfile` from the beginning as `--pure-lockfile` does not fail when `yarn.lock` and `package.json` are out of sync, silently syncing them in-memory and chugging along.
Burak Yigit Kaya 5 years ago
parent
commit
7a443cf52c
3 changed files with 6 additions and 6 deletions
  1. 4 4
      .travis.yml
  2. 1 1
      Makefile
  3. 1 1
      src/sentry/utils/distutils/commands/base.py

+ 4 - 4
.travis.yml

@@ -101,7 +101,7 @@ base_acceptance: &acceptance_default
     - docker run -d --network host --name snuba --env SNUBA_SETTINGS=test --env CLICKHOUSE_SERVER=localhost:9000 getsentry/snuba
     - docker ps -a
   install:
-    - ./bin/yarn install --pure-lockfile
+    - ./bin/yarn install --frozen-lockfile
     - python setup.py install_egg_info
     - pip install -U -e ".[dev]"
     - |
@@ -128,7 +128,7 @@ matrix:
         - SENTRY_LIGHT_BUILD=1 pip install -U -e ".[dev]"
         - find "$NODE_DIR" -type d -empty -delete
         - nvm install
-        - ./bin/yarn install --pure-lockfile
+        - ./bin/yarn install --frozen-lockfile
 
     # Proactive linting on 3.7 during the porting process
     - python: 3.7
@@ -160,7 +160,7 @@ matrix:
         - find "$NODE_DIR" -type d -empty -delete
         - nvm install
       install:
-        - ./bin/yarn install --pure-lockfile
+        - ./bin/yarn install --frozen-lockfile
 
     - python: 2.7
       name: 'Command Line'
@@ -221,7 +221,7 @@ matrix:
         # Use the decrypted service account credentials to authenticate the command line tool
         - gcloud auth activate-service-account --key-file client-secret.json
       install:
-        - ./bin/yarn install --pure-lockfile
+        - ./bin/yarn install --frozen-lockfile
         - gcloud version
       script: bash .travis/deploy-storybook.sh
       after_success: skip

+ 1 - 1
Makefile

@@ -73,7 +73,7 @@ node-version-check:
 install-yarn-pkgs: node-version-check
 	@echo "--> Installing Yarn packages (for development)"
 	# Use NODE_ENV=development so that yarn installs both dependencies + devDependencies
-	NODE_ENV=development $(YARN) install --pure-lockfile
+	NODE_ENV=development $(YARN) install --frozen-lockfile
 	# A common problem is with node packages not existing in `node_modules` even though `yarn install`
 	# says everything is up to date. Even though `yarn install` is run already, it doesn't take into
 	# account the state of the current filesystem (it only checks .yarn-integrity).

+ 1 - 1
src/sentry/utils/distutils/commands/base.py

@@ -141,7 +141,7 @@ class BaseBuildCommand(Command):
 
         if node_version[2] is not None:
             log.info(u"using node ({0})".format(node_version))
-            self._run_yarn_command(["install", "--production", "--pure-lockfile", "--quiet"])
+            self._run_yarn_command(["install", "--production", "--frozen-lockfile", "--quiet"])
 
     def _run_command(self, cmd, env=None):
         log.debug("running [%s]" % (" ".join(cmd),))