Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring cleaning and update rivets to latest release #205

Merged
merged 7 commits into from
May 30, 2024

Conversation

mmlb
Copy link
Member

@mmlb mmlb commented May 28, 2024

Do some spring cleaning like I've been doing to other repos here.

Also needed to update rivets because we've been pinned to an unreleased commit for a long time now. I blame go for not making this obvious. I decided to fix this now so that we can back on track and only use merged code paths. Getting the rivets PR merged and then updating this line comes next.

@mmlb
Copy link
Member Author

mmlb commented May 28, 2024

This came up when I tried using alloy in a go workspace. I thought workspaces were only for working on shared code bases without having to change deps in go.mod for dependencies specified in go.work but that doesn't seem to be right. It looks all the projects share a workspace (not unlike the old GOPATH days?) because alloy was failing to build when I added it to the go.work file, first because it referred to serverservice not fleetdb and then later the missing const.

@mmlb mmlb requested review from joelrebel and DoctorVin May 28, 2024 20:07
DoctorVin
DoctorVin previously approved these changes May 28, 2024
Copy link
Collaborator

@DoctorVin DoctorVin left a comment

Choose a reason for hiding this comment

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

I'm not sure why the linter is complaining here.

@mmlb mmlb force-pushed the update-rivets branch 2 times, most recently from 3a06963 to e986d2b Compare May 28, 2024 21:14
@mmlb mmlb changed the title Update rivets to latest release Spring cleaning and update rivets to latest release May 28, 2024
@mmlb
Copy link
Member Author

mmlb commented May 28, 2024

I'm not sure why the linter is complaining here.

Welp, I thought that maybe updating go and other stuff would fix this but nope... I'm also unsure whats going on since it works locally for me 😢

--- edit ---

Internets thinks we need go mod tidy so I've tried that too and looks like that works!

@DoctorVin
Copy link
Collaborator

I'm not sure why the linter is complaining here.

Welp, I thought that maybe updating go and other stuff would fix this but nope... I'm also unsure whats going on since it works locally for me 😢

--- edit ---

Internets thinks we need go mod tidy so I've tried that too and looks like that works!

go mod tidy is my go-to incantation when I get weird complaints about go.mod/go.sum. Glad that worked.

DoctorVin
DoctorVin previously approved these changes May 29, 2024
uses: actions/setup-go@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20"
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't we rely on go.mod here?

Copy link
Member Author

Choose a reason for hiding this comment

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

oops, yes we should. 1 moment.

Copy link
Member Author

Choose a reason for hiding this comment

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

~80 moments later...

mmlb added 7 commits May 29, 2024 15:05
The previous setup was inaccurate, only @joelrebel was actually setup as
the CODEOWNER according to docs[1].

This commit also moves the GitHub centric file to the .github dir where
other similar files already exist.

1: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
Files had mixed spacing for list and maps so I just threw prettier at
it.
We can even specify the version so that we avoid different versions
between ci and local dev machine. I'm using the same version and args as
found in CI.
This way we have one and only-one way of doing things.
The action is able to read the go.mod version to discover what go
version to install. So lets use that just like in ironlib to avoid
needing to keep multiple files in sync.

I got rid of GOVERSION used by goreleaser since its unnecessary, go
embeds this info automatically. This is already being used, goreleaser
was just overriding it.

I also switched codeql-analysis to avoid autobuild because it failed
trying to install go1.22 and we already have a way to build the binary,
so lets re use it.
We've been pinned to an *unreleased* commit of rivets for a long time
now. I blame go for not making this obvious. I decided to fix this now
so that we can back on track and only use merged code paths. Getting the
rivets PR merged and then updating this line comes next.
@mmlb mmlb merged commit edc6adb into metal-toolbox:main May 30, 2024
6 checks passed
@mmlb mmlb deleted the update-rivets branch May 30, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants