[Bugfix:Testing] fix ci errors from old php dependencies#12925
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12925 +/- ##
============================================
- Coverage 21.48% 21.45% -0.03%
- Complexity 9842 9896 +54
============================================
Files 268 268
Lines 36851 36967 +116
Branches 495 495
============================================
+ Hits 7919 7933 +14
- Misses 28441 28543 +102
Partials 491 491
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| - name: print debugging again | ||
| if: failure() | ||
| run: | | ||
| echo "=== PHP-FPM Service Status ===" | ||
| sudo systemctl status php8.2-fpm --no-pager || true | ||
| echo "=== Apache Error Log ===" | ||
| sudo tail -n 50 /var/log/apache2/error.log || true | ||
| shell: bash |
There was a problem hiding this comment.
| - name: print debugging again | |
| if: failure() | |
| run: | | |
| echo "=== PHP-FPM Service Status ===" | |
| sudo systemctl status php8.2-fpm --no-pager || true | |
| echo "=== Apache Error Log ===" | |
| sudo tail -n 50 /var/log/apache2/error.log || true | |
| shell: bash | |
| - name: print debugging again | |
| if: failure() | |
| run: | | |
| echo "=== PHP-FPM Service Status ===" | |
| sudo systemctl status php8.2-fpm --no-pager || true | |
| echo "=== Submitty Apache Vhost Log ===" | |
| sudo tail -n 100 /var/log/apache2/submitty.log || true | |
| echo "=== Apache Error Log ===" | |
| sudo tail -n 50 /var/log/apache2/error.log || true | |
| echo "=== Manual curl against site ===" | |
| curl -v http://localhost/ 2>&1 || true | |
| shell: bash |
This shows a main issue that was happening.
"GET /git/s26/sample/open_homework/instructor/info/refs?service=git-upload-pack HTTP/1.1" 401 664 "-" "git/2.54.0" [Thu Jun 18 19:02:13.137430 2026] [proxy_fcgi:error] [pid 248955:tid 139809167705664] [client ::1:37264] AH01071: Got error 'PHP message: PHP Warning: preg_match(): Compilation failed: length of lookbehind assertion is not limited at offset 0 in /usr/local/submitty/site/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php on line 176;
PHP message: PHP Warning: preg_match(): Compilation failed: length of lookbehind assertion is not limited at offset 0 in /usr/local/submitty/site/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php on line 176;
We have not updated Symfony/routing in three years (according to blame on the composer.lock, it is 6.1.**), and there have been some changes that happened in php for the warning messages. These have been addressed since, but the three year gap is (apparently) causing some issues. I changed it to be 6.4.13, and the tests now run successfully. I would be good to get William or Chris's feedback on this also, since I am not sure why we don't update most of symfony with dependabot.
If you change the composer.json to require symfony/routing: 6.4.13, and run composer update to update the lock file, it should address some of the issues (for the git)
There was a problem hiding this comment.
Thanks for the review. I updated the symfony/routing version to 6.4.13 in composer.json and ran composer update symfony/routing. hopefully that fixes the errors. for now, I've left in both the new install of php8.2-fpm as well as the print debugging. Please let me know if the changes to composer.lock did or did not apply correctly, as I'm not really familiar with what is expected when running composer update.
Edit, it looks like CI is working with the change. Before merging this PR I will remove the print debugging, and we can also get William or Chris to look at it. Additionally, I'll make a separate issue/PR to fix the problems mentioned in PHP lint.
There was a problem hiding this comment.
@williamjallen is there a reason we weren't updating Symfony routing, besides "it's working, don't break it"?
There was a problem hiding this comment.
There's no reason not to update that I'm aware of. Not sure why dependabot hasn't prompted us to update. Maybe some transitive dependency issues on the latest versions or something. It probably is worthwhile to get up to the latest versions of all symfony stuff at some point.
Why is this Change Important & Necessary?
all of cypress is failing when trying to use apt-get to install php8.2-fpm
What is the New Behavior?
This issue is weird, because AFAIK shivammathur/[email protected] is called in this file to setup php, and that action installs and uses ppa:ondrej/php as a dependency. I'm not sure why it broke if that is the case.
Currently to fix, I am just removing the install call and seeing what will happen.
Edit: Removing php8.1 does not seem to fix the git clone access issue but does cause some problems with packages for php, at least the way I did it.
Edit: I have an idea on how to fix the git perms issue, will push if these checks fail.
What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
Other information