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

chore: Upgrade otel core to v114 #1714

Merged
merged 12 commits into from
Dec 18, 2024
Merged

chore: Upgrade otel core to v114 #1714

merged 12 commits into from
Dec 18, 2024

Conversation

rnishtala-sumo
Copy link
Contributor

@rnishtala-sumo rnishtala-sumo commented Nov 27, 2024

Upgrade otel core to v114. Notable changes include

  • Remove the sumologicexporter (Deprecated) There are upstream API breaking changes that cause errors in this deprecated module. Removing it.
  • Remove the syslog exporter (Deprecated)
  • Remove loggingexporter (Deprecated)
  • Remove ballastextension (Deprecated)
  • Changes to the processhelper function names because of API breaking changes
  • Remove deprecated flags from OtelColBuilder
    • --go
    • --version
    • otel_version renamed to version

@rnishtala-sumo rnishtala-sumo requested a review from a team as a code owner November 27, 2024 23:27
@chan-tim-sumo
Copy link
Contributor

oh yeah for v108 I removed ensure-correct-builder-version in the Makefile cause there was a build version format error from upstream which was stopping the v108 upgrade from happening. That build version format fix was merged in starting v110, should this be added back?

ef1d4d4#diff-e8782025fe5d59d3c20654fab229e808933fbb3941c607950f88c694a58051dcL81

@rnishtala-sumo
Copy link
Contributor Author

@chan-tim-sumo I have added the check for ensuring builder version back in the Makefile.

@rnishtala-sumo rnishtala-sumo force-pushed the update-otel-114 branch 2 times, most recently from bb06233 to 4217617 Compare December 3, 2024 03:05
@@ -193,7 +193,7 @@ jobs:
run: |
binary=${{ steps.set-binary-name.outputs.binary_name }}
binary_path=otelcolbuilder/cmd/${binary}
./ci/get_version_from_binary.sh otc "${binary_path}"
./ci/get_version_from_binary.sh core "${binary_path}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The script doesn't have an otc argument. This wasn't working before

Copy link
Collaborator

@echlebek echlebek 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 a little confused by the change from otelcol_version to version in the yaml. Are you sure about it?

Makefile Outdated
OT_CONTRIB_VERSION := $(shell grep --max-count=1 '^ - gomod: github\.com/open-telemetry/opentelemetry-collector-contrib/' otelcolbuilder/.otelcol-builder.yaml | cut -d " " -f 6 | $(SED) "s/v//")
# usage: make update-ot OT_CORE_NEW=x.x.x OT_CONTRIB_NEW=y.y.y
.PHONY: update-ot
update-ot: install-gsed
@test $(OT_CORE_NEW) || (echo "usage: make update-ot OT_CORE_NEW=x.x.x OT_CONTRIB_NEW=y.y.y"; exit 1);
@test $(OT_CONTRIB_NEW) || (echo "usage: make update-ot OT_CORE_NEW=x.x.x OT_CONTRIB_NEW=y.y.y"; exit 1);
@echo "Updating OT core from $(OT_CORE_VERSION) to $(OT_CORE_NEW) and OT contrib from $(OT_CONTRIB_VERSION) to $(OT_CONTRIB_NEW)"
$(SED) -i "s/\(otelcol_version:\) $(OT_CORE_VERSION)$$/\1 $(OT_CORE_NEW)/" otelcolbuilder/.otelcol-builder.yaml
$(SED) -i "s/\(version:\) $(OT_CORE_VERSION)$$/\1 $(OT_CORE_NEW)/" otelcolbuilder/.otelcol-builder.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

As discussed, let’s not use sed for editing yaml files 😅

Copy link
Contributor Author

@rnishtala-sumo rnishtala-sumo Dec 3, 2024

Choose a reason for hiding this comment

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

yeah, it was sed originally, I changed to use yq in some places. I'll change this too.

Copy link
Contributor Author

@rnishtala-sumo rnishtala-sumo Dec 3, 2024

Choose a reason for hiding this comment

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

@echlebek I used yq to edit the version in the builder config. Replacing the version in all the dependencies listed in the builder config using yq seems tricky. Open to suggestions. Seems like we need to use regex along with yq which defeats the purpose of using it maybe? The alternative is to replace each dep line by line which seems inefficient.

Copy link
Contributor Author

@rnishtala-sumo rnishtala-sumo Dec 18, 2024

Choose a reason for hiding this comment

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

I was able replace sed with yq for the builder config here - 182cf62

@rnishtala-sumo
Copy link
Contributor Author

I’m a little confused by the change from otelcol_version to version in the yaml. Are you sure about it?

@echlebek yes I'm pretty sure, otelcol_version isn't recognized as a config option anymore. We're expected to use version instead.

@@ -102,7 +102,7 @@ endif

.PHONY: _builder
_builder:
$(eval VERSION ?= $(shell git describe --tags --abbrev=5 --match "v[0-9]*"))
$(eval VERSION ?= $(shell git describe --tags --abbrev=5 --match "v[0-9]*"| sed 's/^v//'))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove the prefix (v) from the version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This it out of date: https://github.com/SumoLogic/sumologic-otel-collector/blob/main/otelcolbuilder/Makefile. You may want to merge main into this branch before merging as there are quite a few changes to the Makefile.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I rebased and pushed the changes.

@rnishtala-sumo rnishtala-sumo force-pushed the update-otel-114 branch 2 times, most recently from 2bc695f to ac2a0e8 Compare December 16, 2024 17:21
@rnishtala-sumo rnishtala-sumo requested a review from a team December 17, 2024 16:19
Copy link
Contributor

@chan-tim-sumo chan-tim-sumo left a comment

Choose a reason for hiding this comment

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

💪 approved, but quick question:

i'm assuming ensure-correct-builder-version isn't needed anymore? since probably after this ugrade, we're gonna be moving to the packaging to let it do this for us? 🤔

@rnishtala-sumo rnishtala-sumo merged commit c36e934 into main Dec 18, 2024
42 checks passed
@rnishtala-sumo rnishtala-sumo deleted the update-otel-114 branch December 18, 2024 20:49
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.

4 participants