acoustic-carpenter-78188
03/18/2026, 6:46 PMflyteadmin/auth/authzserver/metadata_provider.go
• Added defer response.Body.Close() after successful HTTP response in GetOAuth2Metadata
• Added response.Body.Close() before retry when receiving 4xx/5xx status codes in sendAndRetryHTTPRequest — without this, each retry iteration leaks the previous response body
2. flytectl/cmd/register/register_util.go
• Added defer res.Body.Close() in DirectUpload — the response body was never closed on either success or error paths
3. flytectl/pkg/filesystemutils/file_system_utils.go
• Added outFile.Close() before returning on non-EOF io.CopyN error during tar extraction — the file handle was leaked when extraction failed mid-stream
4. flytestdlib/config/viper/collection.go
• Added reader.Close() after MergeConfig in GetConfig — the config file reader was opened but never closed
Testing
• All changes are mechanical resource cleanup additions
• No behavioral changes — only ensures proper cleanup of OS resources
• Existing tests continue to pass as the changes only affect cleanup paths
flyteorg/flyte