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

Removes bionic stack #329

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Removes bionic stack #329

wants to merge 2 commits into from

Conversation

ForestEckhardt
Copy link
Contributor

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).

@ForestEckhardt ForestEckhardt requested a review from a team as a code owner July 1, 2024 14:34
@arjun024 arjun024 added the semver:patch A change requiring a patch version bump label Jul 1, 2024
@sophiewigmore sophiewigmore enabled auto-merge (squash) July 2, 2024 14:51
@sophiewigmore
Copy link
Member

I'm investigating the flaky tests

@sophiewigmore
Copy link
Member

It's not a flake - the issue is when we run Laravel/Symfony apps on the Jammy stack, the run image workspace is not writeable and that's where the frameworks want to drop logs and other storage info. we'll need to find a way around this

@sophiewigmore
Copy link
Member

sophiewigmore commented Jul 10, 2024

@till I was wondering if you could advise me with a Laravel-related issue we're having. I've been debugging for a few days, but I can't get this to work. With the Jammy stacks, the /workspace (app dir) isn't writeable at run-time. As a result, our Laravel apps fail at run-time with The exception occurred while attempting to log: The stream or file "/workspace/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied.

I've tried quite a few different mechanisms to update the app, so that the storage_path goes to /tmp instead of the app dir with no luck. I'm wondering if you have any insights that might help me?

@till
Copy link

till commented Jul 10, 2024

Hey 👋

Last time I tried this, I had to set LOG_CHANNEL=stderr and that was all.

Not sure if this is still possible in the current version.

@sophiewigmore
Copy link
Member

@till I'll look into that. Thank you!!!!!

@till
Copy link

till commented Jul 11, 2024

@sophiewigmore https://laravel.com/docs/11.x/logging#available-channel-drivers < if it's 11.x, I am not exactly sure if there's a simple way to handle this. May require a custom config with some code like in the following gist:

https://gist.github.com/yohangdev/1195fa4add05309d6d54c80380fbf10d

@sophiewigmore
Copy link
Member

sophiewigmore commented Jul 12, 2024

@till thanks for the tips. I've had no luck so far. It seems that setting LOG_CHANNEL=stderr solves the issues with the logger, but then other parts still write to the app dir, like storage/framework/sessions and other caches. Maybe my best recourse is to update the app to Laravel 11. I could also go the route of updating all configs to write to /tmp everywhere. I'd just hate to give that advice to someone wanting to use the buildpack, so I wanted to find an elegant solution

@till
Copy link

till commented Jul 12, 2024

@sophiewigmore Definitely update.

I think the buildpack could (or should) create a config (e.g. something obvious like buildback.php) and configure everything as needed.

Maybe in addition provide BP_PHP_LARAVEL_ to tweak or turn it off?

@till
Copy link

till commented Jul 12, 2024

We also had to supply an APP_KEY (random secret). Not sure if this is still in 11.x.

Everything seems to get more complex.

@till
Copy link

till commented Aug 16, 2024

@sophiewigmore did you get anywhere with this? I recently updated our symfony example to the latest (7.x) and it required a few things but overall worked. Haven't looked at Laravel yet though, but there's Laravel Sail which I wanted to try and learn what it does.

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
None yet
Development

Successfully merging this pull request may close these issues.

4 participants