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

Release script fixes #102

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Release script fixes #102

merged 1 commit into from
Nov 15, 2023

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Nov 15, 2023

This adds a utility that can add and remove replace statements from a set of go.mod files.
This builds on previous developments in this repo -- continues relying on a go.work file being checked in.
The release tools will remove replace statements.
The genotelarrowcol tool will add replace statements.
This PR includes the results of

make prepare-release RELEASE_CANDIDATE=v0.8.0 PREVIOUS_VERSION=v0.7.0 MODSET=beta

which updates the go.mod files with an unreleased version, such that go work sync cannot succeed. It will succeed again after the release is pushed.

It was difficult to untangle several changes from happening at once.

  1. The release v0.7.0 was improperly made, so the go tools want to update all .sum files with the actual sum of those tags.
  2. The ocb tool at v0.88.0 would insert a necessary replace statement, so we needed v0.89.x

The change to v0.89.x was carried out using make genotalarrowcol which now runs go work sync, resulting in all modules receiving the update to v0.89.x. However, to avoid this sort of problem in the future, the ocb version is now hard-coded in the Dockerfile and Makefile.


.PHONY: genotelarrowcol
genotelarrowcol: builder
rm -f collector/cmd/otelarrowcol/*
$(BUILDER) --skip-compilation --skip-get-modules --config collector/otelarrowcol-build.yaml
GOWORK="off" $(GOCMD) run ./tools/replacer fix
GOWORK="off" $(BUILDER) --skip-compilation --config collector/otelarrowcol-build.yaml
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note not using --skip-get-modules.
The GOWORK=off trick works too.

@lquerel
Copy link
Contributor

lquerel commented Nov 15, 2023

@jmacd and @codeboten do we still need to apply #101 with this new PR?

Copy link
Contributor

@lquerel lquerel left a comment

Choose a reason for hiding this comment

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

LGTM

@jmacd
Copy link
Contributor Author

jmacd commented Nov 15, 2023

@lquerel this is an alternative to #101.
It would be nice, probably, to see this split into several incremental steps, but I found that it was near impossible to find a resting place between them.

@jmacd jmacd merged commit dd4f4c6 into open-telemetry:main Nov 15, 2023
1 check passed
@jmacd jmacd deleted the jmacd/missed_mod branch November 15, 2023 16:01
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.

2 participants