[Bugfix:System] Fix PHP 8.2 Migrator#12672
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12672 +/- ##
=========================================
Coverage 21.64% 21.64%
Complexity 9654 9654
=========================================
Files 268 268
Lines 36245 36245
Branches 487 487
=========================================
Hits 7846 7846
Misses 27916 27916
Partials 483 483
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
GarvitKhandelwal31
pushed a commit
to GarvitKhandelwal31/Submitty
that referenced
this pull request
Mar 29, 2026
### Why is this Change Important & Necessary? Fixes Submitty#12667. ### What is the New Behavior? Before: Migrator fails if apt is not up to date, and completely uninstalls PHP <img width="1440" height="900" alt="Screenshot_20260327_162324" src="https://github.com/user-attachments/assets/c4f158d4-edd1-4257-ae07-42859ea2ea1a" /> After: Migrator succeeds, php still exists after `submitty_install` <img width="1440" height="900" alt="Screenshot_20260327_164407" src="https://github.com/user-attachments/assets/4407473b-2f94-4fce-b5ca-47610c09fbad" /> ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Load an old vagrant box of the Submitty vm (e.g. [25.12.00.2512070428](https://portal.cloud.hashicorp.com/vagrant/discover/SubmittyBot/ubuntu22-dev/versions/25.12.00.2512070428). This is needed to intentionally make the package list metadata in apt out of date, which triggers the error. (`vagrant box add SubmittyBot/ubuntu22-dev --box-version 25.12.00.2512070428`) 2. Run: `vagrant up; vagrant ssh; submitty_install`. 3. See if the installation succeeded or not 4. Run `php -v` to see if php exists and what version it is. If the command fails, php is no longer installed. This should never happen with this PR's changes. ### Automated Testing & Documentation None ### Other information If the migration has already been run, and the system is working normally, it does not need to be run again; the migration system should do this automatically. If the migration has not yet been run, it should be run with the changes here. Perhaps we should add `sudo apt-get update` to `submitty_install`, but that would be another PR.
GarvitKhandelwal31
pushed a commit
to GarvitKhandelwal31/Submitty
that referenced
this pull request
Apr 14, 2026
### Why is this Change Important & Necessary? Fixes Submitty#12667. ### What is the New Behavior? Before: Migrator fails if apt is not up to date, and completely uninstalls PHP <img width="1440" height="900" alt="Screenshot_20260327_162324" src="https://github.com/user-attachments/assets/c4f158d4-edd1-4257-ae07-42859ea2ea1a" /> After: Migrator succeeds, php still exists after `submitty_install` <img width="1440" height="900" alt="Screenshot_20260327_164407" src="https://github.com/user-attachments/assets/4407473b-2f94-4fce-b5ca-47610c09fbad" /> ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Load an old vagrant box of the Submitty vm (e.g. [25.12.00.2512070428](https://portal.cloud.hashicorp.com/vagrant/discover/SubmittyBot/ubuntu22-dev/versions/25.12.00.2512070428). This is needed to intentionally make the package list metadata in apt out of date, which triggers the error. (`vagrant box add SubmittyBot/ubuntu22-dev --box-version 25.12.00.2512070428`) 2. Run: `vagrant up; vagrant ssh; submitty_install`. 3. See if the installation succeeded or not 4. Run `php -v` to see if php exists and what version it is. If the command fails, php is no longer installed. This should never happen with this PR's changes. ### Automated Testing & Documentation None ### Other information If the migration has already been run, and the system is working normally, it does not need to be run again; the migration system should do this automatically. If the migration has not yet been run, it should be run with the changes here. Perhaps we should add `sudo apt-get update` to `submitty_install`, but that would be another PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why is this Change Important & Necessary?
Fixes #12667.
What is the New Behavior?
Before: Migrator fails if apt is not up to date, and completely uninstalls PHP
After: Migrator succeeds, php still exists after
submitty_installWhat steps should a reviewer take to reproduce or test the bug or new feature?
vagrant box add SubmittyBot/ubuntu22-dev --box-version 25.12.00.2512070428)vagrant up; vagrant ssh; submitty_install.php -vto see if php exists and what version it is. If the command fails, php is no longer installed. This should never happen with this PR's changes.Automated Testing & Documentation
None
Other information
If the migration has already been run, and the system is working normally, it does not need to be run again; the migration system should do this automatically. If the migration has not yet been run, it should be run with the changes here.
Perhaps we should add
sudo apt-get updatetosubmitty_install, but that would be another PR.