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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

chore: Upgrade otel core to v114 #1714

wants to merge 12 commits into from

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.

@@ -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

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 - fa95a95

@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.

@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? 🤔

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.

3 participants