#6830 [Test] Task service api test fix review
Pull request opened by
machichima
## Tracking issue
follow-up:
#6823
## Why are the changes needed?
Fix remaining reviews in
#6823
## What changes were proposed in this pull request?
• Fast fail is api test server failed to start
• Improve clean-up logic
• Remove redundant code
## How was this patch tested?
• API test
❯ make api-test
Makefile
58 warning: overriding commands for target `test'
../go.Makefile
96 warning: ignoring old commands for target `test'
Makefile
122 warning: overriding commands for target `clean'
../go.Makefile
132 warning: ignoring old commands for target `clean'
Running API integration tests...
#
github.com/flyteorg/flyte/v2/runs/test/api.test
ld: warning: '/private/var/folders/27/52rf9wx95tvfqzcw0t_x7qqc0000gn/T/go-link-2876845023/000023.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
time="2025-12-30T16
4117+08:00" level=info msg="Set connection pool values to [{MaxOpenConnections:0 OpenConnections:0 InUse:0 Idle:0 WaitCount:0 WaitDuration:0s MaxIdleClosed:1 MaxIdleTimeClosed:0 MaxLifetimeClosed:0}]"
2025/12/30 16
4117 Database initialized
time="2025-12-30T16
4117+08:00" level=info msg="Database migrations completed successfully (recreated actions table)"
2025/12/30 16
4117 Database migrations completed
2025/12/30 16
4117 Test server starting on
http://localhost:8091
2025/12/30 16
4117 Test server is ready
=== RUN TestDeployTask
time="2025-12-30T16
4117+08:00" level=info msg="Created/Updated task: test-org/test-project/test-domain/test-task version 1767084077691962000"
task_service_test.go
59 Task deployed successfully: org:"test-org" project:"test-project" domain:"test-domain" name:"test-task" version:"1767084077691962000"
task_service_test.go
74 Task details retrieved successfully: task_id
{org"test-org" project:"test-project" domain:"test-domain" name:"test-task" version:"1767084077691962000"} metadata
{short name"test-task" deployed_at
{seconds-62135596800}} spec
{task template{type:"container" container
{image"alpine:latest" args:"echo" args:"hello"}}}
task_service_test.go
24 Test database cleaned up
--- PASS: TestDeployTask (0.01s)
PASS
2025/12/30 16
4117 Test server stopped
ok
github.com/flyteorg/flyte/v2/runs/test/api 1.050s
### Labels
Please add one or more of the following labels to categorize your PR:
•
added: For new features.
•
changed: For changes in existing functionality.
•
deprecated: For soon-to-be-removed features.
•
removed: For features being removed.
•
fixed: For any bug fixed.
•
security: In case of vulnerabilities
This is important to improve the readability of release notes.
### Setup process
### Screenshots
## Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
## Related PRs
## Docs link
flyteorg/flyte