-
Notifications
You must be signed in to change notification settings - Fork 464
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
Unified Queue: insert software installs in the upcoming queue and address more script changes #25258
Merged
mna
merged 15 commits into
feat-upcoming-activites-queue
from
mna-23913-23918-unified-queue-2
Jan 14, 2025
Merged
Unified Queue: insert software installs in the upcoming queue and address more script changes #25258
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
28a72ac
Switch upcoming activities id to bigint
mna debf575
Mark all places where SQL statements possibly need to change
mna 8a8e4fa
Use a join table for activity-type-specific columns
mna dbe8532
Update insertion/deletion with new join table
mna e02c363
Add join table for software installs/uninstalls
mna 742f29c
Fix list pending scripts for host ordering
mna 0fa9bb3
Implement inserting pending host software installs, list pending, test
mna 854ecd0
Fix db migrations order, rebase on feature branch
mna 5c24775
Update some todos
mna e3d5636
Add activated_at, all pending states are now considered always in upc…
mna 6158664
Fix query
mna 2c3d593
Adjust software installers queries for pending/activated activities
mna a5e0b8f
Adjust the queries for the list host upcoming activities, incomplete
mna 53033ec
Finish list upcoming host activities queries, tests
mna f00dae0
Update change file
mna 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
* Added script execution to the new `upcoming_activities` table. | ||
* Added software installs to the new `upcoming_activities` table. | ||
* Updated the list upcoming activities endpoint to use the new `upcoming_activities` table as source of truth. |
This file contains 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 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Just sanity checking how this statement evaluates when the
JSON_EXTRACT
can't find a value (in which case I think it becomesAND NOT NULL
) vs. an empty string. I always get turned around when trying to sort through how MySQL treatsNULL
for logical operations and comparisons.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.
For the
IF
part, that's fine, aNULL
condition will use the second value (I tested it):For the COALESCE, it's true that if the JSON_EXTRACT doesn't find anything, the name would end up NULL which defeats the COALESCE... I'll add a fallback to empty string (in the next PR if you don't mind, at this stage of churn I feel it's easier to move forward than address in the PR since more stuff is already in progress).
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.
Oh actually there's a test that checks that name and other user stuff is NULL if there was no user id, so I'll leave it like that to reproduce the current behavior.