Skip to content

check for .yalc/ and yalc.lock, and create these if needed - #406

Merged
becky-gilbert merged 2 commits into
fix/aws-deploymentfrom
fix/docker-copy-error
May 1, 2026
Merged

check for .yalc/ and yalc.lock, and create these if needed#406
becky-gilbert merged 2 commits into
fix/aws-deploymentfrom
fix/docker-copy-error

Conversation

@becky-gilbert

Copy link
Copy Markdown
Contributor

Fixes #380

The Dockerfiles for API and front-end try to copy .yalc/ and yalc.lock, which are created when experiments are installed. If a site is installed but no experiments have been installed yet, then pushkin prep will produce an error because these files don't exist. This PR fixes the problem by checking for the existence of the directory and file, and creating a placeholder if they do not exist.

Steps to reproduce

  • On fix/aws-deployment (the base branch), run yarn workspaces run build to build packages.
  • Run pushkin install site (using local pushkin) to install a new site. Do not install any experiments.
  • Run pushkin prep. You will see the error:
Dockerfile:4
--------------------
 2 |     
 3 |     COPY ./src /usr/src/app/src
 4 | >>> COPY .yalc /usr/src/app/.yalc/
 5 |     COPY ./package.json ./yarn.lock ./.babelrc ./yalc.lock ./dockerStart.sh /usr/src/app/
 6 |     
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref c3479bfb-5945-45c3-92ae-49c72620f001::pn5ialj989lvreg0siwxy5zu8: "/.yalc": not found
  • Switch to this branch (fix/docker-copy-error) and repeat the steps above. Running pushkin prep should succeed.
  • Run pushkin install experiment to install an experiment, then pushkin prep. The yalc directory and yalc.lock file should not be overwritten with placeholders.

@changeset-bot

changeset-bot Bot commented Apr 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7a704f2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
pushkin-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

👋
Thanks for making this pull request! We will review it as soon as possible. In the meantime, double check that your PR:

- Includes a thorough explanation of what you want to change/add.
- Links to any relevant issues/discussions.

In the interest of good development habits, if you wish to commit changes, make sure to create a new branch/fork and then submit a pull request with your changes.

@becky-gilbert

Copy link
Copy Markdown
Contributor Author

@cherriechang I see that you linked issue #380 to PR #373, but I didn't see the fix there. So this PR will add it to that branch, if you're happy with the solution.

@cherriechang cherriechang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good! I checked the behavior of what happens when you run install experiment after the empty .yalc and yalc.lock is created, and they seem to get updated as intended.

@becky-gilbert

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review @cherriechang! BTW I plan to add tests for this - just waiting to add them on the refactored version, which will make it much easier.

@becky-gilbert
becky-gilbert merged commit fff7512 into fix/aws-deployment May 1, 2026
@becky-gilbert becky-gilbert linked an issue May 1, 2026 that may be closed by this pull request
@github-actions github-actions Bot mentioned this pull request May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: aws init crashes if no experiments have been installed

2 participants