<#6830 [Test] Task service api test fix review> Pu...
# flyte-github
a
#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 Makefile58 warning: overriding commands for target `test' ../go.Makefile96 warning: ignoring old commands for target `test' Makefile122 warning: overriding commands for target `clean' ../go.Makefile132 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-30T164117+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 164117 Database initialized time="2025-12-30T164117+08:00" level=info msg="Database migrations completed successfully (recreated actions table)" 2025/12/30 164117 Database migrations completed 2025/12/30 164117 Test server starting on http://localhost:8091 2025/12/30 164117 Test server is ready === RUN TestDeployTask time="2025-12-30T164117+08:00" level=info msg="Created/Updated task: test-org/test-project/test-domain/test-task version 1767084077691962000" task_service_test.go59 Task deployed successfully: org:"test-org" project:"test-project" domain:"test-domain" name:"test-task" version:"1767084077691962000" task_service_test.go74 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.go24 Test database cleaned up --- PASS: TestDeployTask (0.01s) PASS 2025/12/30 164117 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