[Test] Task service api test fix review#6830
Merged
popojk merged 5 commits intoflyteorg:v2from Jan 6, 2026
Merged
Conversation
Signed-off-by: machichima <[email protected]>
Signed-off-by: machichima <[email protected]>
Signed-off-by: machichima <[email protected]>
Signed-off-by: machichima <[email protected]>
Signed-off-by: machichima <[email protected]>
3 tasks
Member
Author
|
@yuhuan130 PTAL |
Member
Author
|
Also cc @popojk |
popojk
reviewed
Jan 6, 2026
Contributor
popojk
left a comment
There was a problem hiding this comment.
@machichima Looks great thanks, left few comments
cc @yuhuan130
| if err != nil { | ||
| log.Fatalf("Failed to initialize database: %v", err) | ||
| log.Printf("Failed to initialize database: %v", err) | ||
| exitCode = 1 |
Contributor
There was a problem hiding this comment.
Correct me if I'm wrong. I think log.Fatalf already returned exitCode 1? Golang doc
Member
Author
There was a problem hiding this comment.
Yes! This is why we use Printf here. While Fatalf will also call os.Exit(1), it will not get into the defer block for clean-up
| if err := migrations.RunMigrations(testDB); err != nil { | ||
| log.Fatalf("Failed to run migrations: %v", err) | ||
| log.Printf("Failed to run migrations: %v", err) | ||
| exitCode = 1 |
Comment on lines
+126
to
+127
| exitCode = 1 | ||
| return |
Contributor
There was a problem hiding this comment.
nit
Suggested change
| exitCode = 1 | |
| return | |
| os.Exit(1) |
Member
Author
There was a problem hiding this comment.
Same reason as above. If we use os.Exit(1) here, the defer block will not be called
Comment on lines
+131
to
+132
| exitCode = 1 | ||
| return |
popojk
approved these changes
Jan 6, 2026
EngHabu
pushed a commit
that referenced
this pull request
Feb 26, 2026
* refactor: remove unused function Signed-off-by: machichima <[email protected]> * feat: fail directly if test server failed to start Signed-off-by: machichima <[email protected]> * refactor: fix typo Signed-off-by: machichima <[email protected]> * test: loop through model slice for cleanup Signed-off-by: machichima <[email protected]> * test: clean up to defer block Signed-off-by: machichima <[email protected]> --------- Signed-off-by: machichima <[email protected]> Signed-off-by: Haytham Abuelfutuh <[email protected]>
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.
Tracking issue
follow-up: #6823
Why are the changes needed?
Fix remaining reviews in #6823
What changes were proposed in this pull request?
How was this patch tested?
Labels
Please add one or more of the following labels to categorize your PR:
This is important to improve the readability of release notes.
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link