Skip to content

Update Flyte to Go 1.26#7240

Merged
Sovietaced merged 2 commits into
flyteorg:masterfrom
Sovietaced:go-1.26
Apr 27, 2026
Merged

Update Flyte to Go 1.26#7240
Sovietaced merged 2 commits into
flyteorg:masterfrom
Sovietaced:go-1.26

Conversation

@Sovietaced

@Sovietaced Sovietaced commented Apr 20, 2026

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

This pull request updates Flyte to use the latest version of Go. Consequently this also updates golangci-lint which added the following new warnings.

  • False positives about indexed slice access
  • Warnings about DDOS / resource exhaustion issues
  • False positives about not propagating contexts in goroutines
  • False positives about fake sensitive values in test fixtures

How was this patch tested?

Existing unit / integration tests

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

@codecov

codecov Bot commented Apr 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 61.53846% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.96%. Comparing base (b8b8b94) to head (2dab6fa).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
flyteadmin/auth/create_secrets.go 0.00% 3 Missing ⚠️
flytectl/pkg/pkce/token_cache_keyring.go 0.00% 1 Missing and 1 partial ⚠️
flyteadmin/auth/authzserver/authorize.go 0.00% 1 Missing ⚠️
flyteadmin/pkg/manager/impl/execution_manager.go 66.66% 1 Missing ⚠️
...kg/runtime/interfaces/application_configuration.go 0.00% 1 Missing ⚠️
flytectl/cmd/testutils/test_utils.go 0.00% 1 Missing ⚠️
flytestdlib/profutils/server.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7240   +/-   ##
=======================================
  Coverage   56.95%   56.96%           
=======================================
  Files         931      931           
  Lines       58250    58247    -3     
=======================================
+ Hits        33179    33180    +1     
+ Misses      22017    22013    -4     
  Partials     3054     3054           
Flag Coverage Δ
unittests-datacatalog 53.51% <ø> (ø)
unittests-flyteadmin 53.15% <45.45%> (+0.01%) ⬆️
unittests-flytecopilot 43.06% <ø> (ø)
unittests-flytectl 64.09% <70.00%> (ø)
unittests-flyteidl 75.71% <100.00%> (ø)
unittests-flyteplugins 60.19% <ø> (ø)
unittests-flytepropeller 53.71% <ø> (ø)
unittests-flytestdlib 62.61% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Jason Parraga <sovietaced@gmail.com>
return verifyClaims(sets.NewString(append(r.allowedAudience, expectedAudience)...), t.Claims.(jwtgo.MapClaims))
}

func doRequest(ctx context.Context, req *http.Request) (*http.Response, error) {

@Sovietaced Sovietaced Apr 23, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This I unused and was causing a gosec warning so I removed it

})
}

func Test_doRequest(t *testing.T) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test of unused method

secretsData := make(map[string][]byte, 4)

err := filepath.Walk(localPath, func(path string, info os.FileInfo, err error) error {
fsys := os.DirFS(localPath)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolves a gosec warning about walking a filesystem and having the files switch to symlink underneath.

return func(writer http.ResponseWriter, request *http.Request) {
// 1. Limit the request body to 1MB (1 << 20 bytes)
// This MUST be done before ParseForm() or FormValue()
request.Body = http.MaxBytesReader(writer, request.Body, 1048576)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This resolve a gosec warning about resource exhaustion when using an unbuffered reader.

@Sovietaced Sovietaced added housekeeping Issues that help maintain flyte and keep it tech-debt free dependencies Pull requests that update a dependency file labels Apr 23, 2026
@Sovietaced Sovietaced marked this pull request as ready for review April 23, 2026 08:52

@EngHabu EngHabu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥰

@Sovietaced Sovietaced merged commit c283e7e into flyteorg:master Apr 27, 2026
52 of 53 checks passed
nuthalapativarun pushed a commit to nuthalapativarun/flyte that referenced this pull request May 1, 2026
Signed-off-by: Jason Parraga <sovietaced@gmail.com>
Signed-off-by: Varun Nuthalapati <nuthalapativarun@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file housekeeping Issues that help maintain flyte and keep it tech-debt free

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants