-
-
Notifications
You must be signed in to change notification settings - Fork 6
Deprecate Unity Editor versions pre-2021 #72
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
Open
davidmfinol
wants to merge
1
commit into
main
Choose a base branch
from
deprecate-pre2021
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify handling of existing pre-2021 jobs in the database.
The logic correctly implements the deprecation policy for NEW jobs. However, this change only affects jobs created after deployment. Existing CI jobs with
status: 'created'for Unity versions 2019-2020 would remain in that state and continue to be processed bygetPrioritisedQueue.Confirm whether:
Run this script to identify any existing pre-2021 jobs that may need attention:
🏁 Script executed:
Length of output: 194
I need to investigate the codebase further to understand the handling of existing pre-2021 jobs. Let me examine the code structure and migration mechanisms.
Let me search the codebase for any migration, cleanup, or deprecation mechanisms related to CI jobs:
🏁 Script executed:
Length of output: 3916
Let me check how jobs are queried and whether the
getPrioritisedQueuefunction filters by status:🏁 Script executed:
Length of output: 4551
Implement migration logic to update existing pre-2021 jobs to 'deprecated' status.
Verification confirms the original concern is valid. The code change at lines 146-148 only affects NEW job creation—existing pre-2021 jobs with
status: 'created'will continue to be processed bygetPrioritisedQueue(which explicitly filters.where('status', '==', 'created')). This creates an inconsistency:status: 'deprecated'(excluded from queue)status: 'created'(still queued and processed)Required: Implement the
dataMigrationsfunction infunctions/src/logic/dataTransformation/dataMigrations.tsto update all existing pre-2021 jobs from'created'to'deprecated'status. This function is already called in the cron job and is the appropriate location for this migration.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is interesting, but if no pre-2021 jobs exist anymore with status
created, we can probably skip the suggested migration. This can most likely be verified with a simple query in firebase.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
@GabLeRoux, excellent point! If no pre-2021 jobs with
status: 'created'exist in the database, the migration would indeed be unnecessary. Let me help you verify this with a Firebase query.Once you verify that no pre-2021 jobs with
status: 'created'exist, you can safely skip the migration logic. If you do find any, they would need to be migrated to'deprecated'status to maintain consistency with the new logic.🏁 Script executed:
Length of output: 1330
@GabLeRoux, I've provided three options above for verifying whether any pre-2021 jobs with
status: 'created'exist in your Firestore database:Option 1: gcloud CLI commands (fastest if you have gcloud configured)
Option 2: Node.js script using firebase-admin (saved to
/tmp/check_pre2021_jobs.js)Option 3: Firebase Console UI queries (most visual, no CLI needed)
If all queries return 0 documents, you can safely skip implementing the migration logic, as there would be no existing jobs to migrate. The code change alone is sufficient in that case.
Once you verify the results, you might want to add a comment to the PR documenting that you checked and confirmed no pre-2021 jobs with 'created' status exist, so future reviewers understand why no migration was needed.
Let me know what you find! 🔍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a deeper look and indeed, we might need to handle a
deprecatedstatus since this is stateful. Coderabbit provided an outdated way to request information, but I took a look;Details
./verify-jobs.sh
./check-pre2021-jobs.js
We might have to do something about this indeed 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 3343
@GabLeRoux, excellent work on verifying! With 240 existing jobs that need migration, we definitely need to implement the migration logic. Here's the implementation for
functions/src/logic/dataTransformation/dataMigrations.tsthat follows the existing batch update pattern fromCiJobs.markJobsBeforeRepoVersionAsSuperseded:Key points:
markJobsBeforeRepoVersionAsSuperseded(chunk size of 10, merge: true)Verification after deployment:
Run your verification script again after the first cron execution to confirm all jobs were migrated:
You should see
✓ No jobs found. Migration can be skipped.Once all jobs are migrated and you've confirmed zero remain, you can optionally remove or comment out the
migratePreUnity2021JobsToDeprecated()call fromdataMigrations()in a follow-up PR to avoid unnecessary queries on every cron run. 🎯🧬 Code Graph Analysis Results
File: functions/src/model/image.ts
File: functions/src/model/editorVersionInfo.ts
Summary (interface):
Summary (class):
File: functions/src/model/repoVersionInfo.ts
Summary (interface):
Summary (class):
File: functions/src/service/firebase.ts