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

Update alpine & PHP to 8.2 #299

Merged
merged 2 commits into from
Nov 15, 2023
Merged

Update alpine & PHP to 8.2 #299

merged 2 commits into from
Nov 15, 2023

Conversation

nigelgbanks
Copy link
Contributor

@nigelgbanks nigelgbanks commented Nov 1, 2023

Updates PHP to 8.2 as well.
And composer to 2.6.5

@nigelgbanks nigelgbanks mentioned this pull request Nov 1, 2023
@nigelgbanks nigelgbanks changed the title Update alpine Update alpine & PHP to 8.2 Nov 1, 2023
@nigelgbanks nigelgbanks force-pushed the update-alpine branch 2 times, most recently from 64b5988 to 7973198 Compare November 7, 2023 12:20
@nigelgbanks nigelgbanks marked this pull request as ready for review November 7, 2023 12:21
@nigelgbanks nigelgbanks force-pushed the update-alpine branch 2 times, most recently from 77a4dff to bcbaffc Compare November 7, 2023 14:43
@joecorall
Copy link
Contributor

joecorall commented Nov 8, 2023

Just a note here when this merges, the merge commit message into main would need the string [major] to bump the buildkit tag from 2.0.x to 3.0.0, since php 8.2 is a breaking change for Drupal 9

@nigelgbanks
Copy link
Contributor Author

Just a note here when this merges, the merge commit message into main would need the string [major] to bump the buildkit tag from 2.0.x to 3.0.0, since php 8.2 is a breaking change for Drupal 9

It does here: bcbaffc

@joecorall
Copy link
Contributor

Wasn't sure if squash and merge is used or not. I think it'd be best to put [major] in the merge commit into main.

@nigelgbanks
Copy link
Contributor Author

Yup, it's squash and merge, so the resulting commit will have [major] in it.

@joecorall
Copy link
Contributor

joecorall commented Nov 9, 2023

✅ Built the images locally (though make bake was err'ing out so ran buildx manually)

$ make bake TAG=3.0
Makefile:119: target `~/Library/Application' given more than once in the same rule.
Makefile:126: warning: overriding commands for target `&'
Makefile:121: warning: ignoring old commands for target `&'
Makefile:153: warning: overriding commands for target `&'
Makefile:126: warning: ignoring old commands for target `&'
docker buildx bake --builder default -f build/bake.json --progress=auto --load
ERROR: use `docker --context=default buildx` to switch to context "default"
make: *** [bake] Error 1
docker --context=default buildx bake --builder default -f build/bake.json --progress=auto --load

✅ Then started a site with isle-dc and added some sample content.

make starter TAG=3.0
make demo_content

Screen Shot on 2023-11-09 at 15-36-59

❌ Derivatives seem broken. All the crayfish services have similar errors

172.18.0.6 - - [09/Nov/2023:20:39:40 +0000] "GET / HTTP/1.1" 500 137332 "-" "Apache-HttpClient/4.5.13 (Java/17.0.9)" "-"
NOTICE: PHP message: 2023-11-09T20:39:41+00:00 [critical] Uncaught Exception: Unrecognized option "syn_config" under "crayfish_commons". Available options are "apix_middleware_enabled", "fedora_base_uri".
2023/11/09 20:39:41 [error] 618#618: *253 FastCGI sent in stderr: "PHP message: 2023-11-09T20:39:41+00:00 [critical] Uncaught Exception: Unrecognized option "syn_config" under "crayfish_commons". Available options are "apix_middleware_enabled", "fedora_base_uri"" while reading upstream, client: 172.18.0.6, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm82/php-fpm82.sock:", host: "hypercube:8000"
172.18.0.6 - - [09/Nov/2023:20:39:41 +0000] "GET / HTTP/1.1" 500 137332 "-" "Apache-HttpClient/4.5.13 (Java/17.0.9)" "-"

@aOelschlager
Copy link
Contributor

Those errors are from the changes done with symfony 4 -> 5 and the EntityMapper I believe.
Islandora/chullo#99
Islandora/Crayfish-Commons#63
Islandora/Crayfish#174
Islandora/islandora#936
Although I know playbook is different than Isle I thought I would include it in case it was helpful.
Islandora-Devops/islandora-playbook#263

@whikloj
Copy link
Member

whikloj commented Nov 15, 2023

@aOelschlager is correct, this message seems to indicate you also need to update the Symfony configuration files.

Crayfish-Commons configuration was updated to remove the syn_config key and add an apix_middleware_enabled key. https://github.com/Islandora/Crayfish-Commons/pull/63/files#diff-a4650f72c19f5835a8dea0883feacdc0d2bf22dc9cebb0d94e9b00aa75c6a647

You can see examples of the changes to crayfish_commons.yaml.j2 files in the islandora-playbook PR linked above.

@nigelgbanks
Copy link
Contributor Author

nigelgbanks commented Nov 15, 2023

Built the images locally (though make bake was err'ing out so ran buildx manually)

Are you using GNU Make with the appropriate minimum version?

Additionally, the error is specifying that you must set a default context.

ERROR: use docker --context=default buildx to switch to context "default"

This can be achieved with the following:

docker context use default 

Or you can specify a different context, for example if you are doing cross-platform building.


I should note that if you use the correct version of GNU Make, you should be able to test this without using isle-dc. There is a test image provided.

https://github.com/Islandora-Devops/isle-buildkit#running

Problems in the isle-dc shouldn't prevent releases of isle-buildkit as it's not the only consumer of this repository, and users of isle-dc can pin to a previous release, until isle-dc can be updated to make use of the latest images.


Those errors are from the changes done with symfony 4 -> 5 and the EntityMapper I believe.

This is very helpful. Thank you! I've patched the crayfish images and dropped the standalone crayfits. As it is now bundled with crayfish as of two weeks ago.

Looks like running without JWT isn't actually supported? I see the option in the playbook pull request though, for example crayfish_homarus_jwt_enabled defaults to true. Setting it to false doesn't appear to be supported by Symphony at least since 5.1?

So looks like JWT is actually a requirement for it to function.

NOTICE: PHP message: 2023-11-15T19:00:36+00:00 [critical] Uncaught Exception: The authenticator manager no longer has "anonymous" security. Please remove this option under the "main" firewall.

I'll amend the pull request, and it is ready for test again.

Update composer from 2.4.4 to 2.6.5
Update crayfish to 4.x
Change crayfits to come from crayfish repository

[major] Breaking change, requires Drupal 10.
@nigelgbanks
Copy link
Contributor Author

This should be ready to test again when the GitHub Actions complete.

@joecorall
Copy link
Contributor

Thanks, @nigelgbanks - docker context use default got make bake to work 👍

docker context use default
make bake

With the rebasing // force push in the PR can't to see the changes since the last review, but used the starter site and demo content to populate some content and everything looks great!

make starter TAG=local
make demo_content

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.

4 participants