Skip to content

[Bugfix:Testing] fix ci errors from old php dependencies#12925

Merged
bmcutler merged 18 commits into
mainfrom
fix-cypress-php
Jun 19, 2026
Merged

[Bugfix:Testing] fix ci errors from old php dependencies#12925
bmcutler merged 18 commits into
mainfrom
fix-cypress-php

Conversation

@roye2

@roye2 roye2 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

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

@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Jun 17, 2026
@roye2 roye2 changed the title [Bugfix:Cypress] change how php fpm is being installed in actions.yml [Bugfix:Cypress] change php fpm install in actions.yml Jun 17, 2026
@roye2 roye2 changed the title [Bugfix:Cypress] change php fpm install in actions.yml [Bugfix:Testing] change php fpm install in actions.yml Jun 17, 2026
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.45%. Comparing base (8fa4355) to head (2aacc6c).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             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              
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.01% <ø> (-0.01%) ⬇️
migrator 100.00% <ø> (ø)
php 20.49% <ø> (-0.04%) ⬇️
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@roye2 roye2 closed this Jun 17, 2026
@roye2 roye2 reopened this Jun 17, 2026
Comment on lines +234 to +241
- 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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)

@roye2 roye2 Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@williamjallen is there a reason we weren't updating Symfony routing, besides "it's working, don't break it"?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@roye2 roye2 changed the title [Bugfix:Testing] change php fpm install in actions.yml [Bugfix:Testing] fix ci errors with old php dependencies Jun 19, 2026
@roye2 roye2 changed the title [Bugfix:Testing] fix ci errors with old php dependencies [Bugfix:Testing] fix ci errors from old php dependencies Jun 19, 2026
@bmcutler
bmcutler merged commit a05048f into main Jun 19, 2026
23 of 27 checks passed
@bmcutler
bmcutler deleted the fix-cypress-php branch June 19, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants