Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: Install packages into working directory #92

Merged
merged 5 commits into from
Dec 21, 2022
Merged

Conversation

sophiewigmore
Copy link
Member

@sophiewigmore sophiewigmore commented Dec 12, 2022

Summary

#46

  • Rolls back changes made in Run autoloading separately from composer install #25 and instead installs all packages into /workspace/vendor directly. This is done to prevent symlinking issues with composer, in which packages installed into the layer cannot find files in /workspace like .env and classes outside of vendor.
  • The /workspace/vendor directory is manually copied into a layer for caching
  • This enables framework support which previously failed to build due to symlinking issues
  • Tests added for:
    • Laravel app
    • Symfony app
    • Drupal app (removed because it was enormous, and was previously failing for the same symlinking issues as the other two apps)

#90

  • Fixes vendored app rebuilds
  • When performing a rebuild of a vendored application, the app /workspace/vendor dir is cleared and the cached vendor directory from the layer is copied into /workspace.

Open questions:

  • can we optimize the code to avoid copying vendor to layer
  • how could we instead leverage slice layers rather than copying around vendor?

Use Cases

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@sophiewigmore sophiewigmore self-assigned this Dec 14, 2022
@sophiewigmore sophiewigmore changed the title WIP - install packages into working directory Bug fix: Install packages into working directory Dec 14, 2022
@sophiewigmore sophiewigmore marked this pull request as ready for review December 14, 2022 21:03
@sophiewigmore sophiewigmore requested a review from a team as a code owner December 14, 2022 21:03
- Test against framework apps
- Update vendored packages on rebuild
@sophiewigmore
Copy link
Member Author

The tests are passing locally :/ investigating

@thitch97 thitch97 added the semver:patch A change requiring a patch version bump label Dec 16, 2022
thitch97
thitch97 previously approved these changes Dec 20, 2022
build.go Outdated Show resolved Hide resolved
@thitch97
Copy link
Contributor

This all looks good to me! Just had one question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants