check for .yalc/ and yalc.lock, and create these if needed - #406
Conversation
🦋 Changeset detectedLatest commit: 7a704f2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
👋 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. |
|
@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
left a comment
There was a problem hiding this comment.
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.
|
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. |
Fixes #380
The Dockerfiles for API and front-end try to copy
.yalc/andyalc.lock, which are created when experiments are installed. If a site is installed but no experiments have been installed yet, thenpushkin prepwill 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
fix/aws-deployment(the base branch), runyarn workspaces run buildto build packages.pushkin install site(using local pushkin) to install a new site. Do not install any experiments.pushkin prep. You will see the error:fix/docker-copy-error) and repeat the steps above. Runningpushkin prepshould succeed.pushkin install experimentto install an experiment, thenpushkin prep. The yalc directory andyalc.lockfile should not be overwritten with placeholders.