Skip to content

Update Go to 1.27.1 and modernize codebase - #9701

Merged
taylorsilva merged 3 commits into
concourse:masterfrom
alicul:modernize-and-update-go
Sep 9, 2026
Merged

taylorsilva merged 3 commits into
concourse:masterfrom
alicul:modernize-and-update-go

Conversation

@alicul

@alicul alicul commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Upgrades the Go toolchain to Go 1.27.1 and modernizes the codebase by running go fix ./... for Go 1.26 and Go 1.27 language features.

End goal: remove workarounds we put in place due to the Go bugs that are now resolved:

  1. err = root.Symlink(filepath.FromSlash(header.Linkname), filePath)
  2. // Workaround for https://github.com/golang/go/issues/80308

Changes

  • Toolchain & Dependencies: Upgraded Go directive and toolchain to 1.27.1 in go.mod (go get [email protected] && go mod tidy).
  • Go 1.26 Modernization: Applied automatic fixes via go fix ./....
  • Go 1.27 Modernization: Applied Go 1.27 fixes, notably adopting struct literal field selectors to initialize nested and embedded struct fields directly across ATC, worker, Baggageclaim, and test suites.

References

Thanks to @marco-m-pix4d for teaching me about go fix :)

The majority of the changes are related to this language change:

> a key in a struct literal may now be any valid field selector for the struct type,
> allowing fields in nested or embedded structs to be initialized directly.

See
- https://go.dev/blog/go1.27
- https://victoriametrics.com/blog/go-1-27/#struct-literal-field-selectors

    go fix ./...
@alicul alicul changed the title Modernize and update go Update Go to 1.27.1 and modernize codebase Sep 4, 2026
@taylorsilva

Copy link
Copy Markdown
Member

I like a negative diff 😁
image

I was going to open an issue to remind myself to do this stuff. I've had this tab open as a reminder: https://victoriametrics.com/blog/go-1-27/index.html

Love these little chore wins 🧹

@taylorsilva taylorsilva added this to the 8.3.1 milestone Sep 4, 2026
@taylorsilva taylorsilva mentioned this pull request Sep 4, 2026
15 tasks done
@alicul

alicul commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor Author

@taylorsilva I am curious. Would you accept also something like: 3a6d0b9 ?

@taylorsilva

Copy link
Copy Markdown
Member

@alicul I am very open to discussing this. I know there's prior discussion about this and I think the general sentiment was that we don't generally want the concourse/concourse code base treated as a library.

That said, this would probably help with a bunch of CVE's that get flagged sometimes since we're not following this pattern.

Let's review prior discussion before making a decision. Feel free to open an issue where we can discuss this further.

@taylorsilva
taylorsilva merged commit bea0205 into concourse:master Sep 9, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Pull Requests Sep 9, 2026
@alicul
alicul deleted the modernize-and-update-go branch September 9, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants