Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 1 addition & 32 deletions .github/workflows/otel-fork-replace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,7 @@ jobs:
git config --global user.name 'Github Action'
git config --global user.email '[email protected]'
git checkout -b otel-fork-replace-${{ steps.get-latest-commit.outputs.sha }}
go mod edit -replace go.opentelemetry.io/collector/config/confighttp=github.com/amazon-contributing/opentelemetry-collector-contrib/config/confighttp@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor=github.com/amazon-contributing/opentelemetry-collector-contrib/processor/resourcedetectionprocessor@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter=github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsemfexporter@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter=github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsxrayexporter@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray=github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/xray@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil=github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/awsutil@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight=github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/containerinsight@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s=github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/k8s@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver=github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver=github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/prometheusreceiver@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus=github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/translator/prometheus@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs=github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/cwlogs@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter=github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver=github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awsxrayreceiver@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws=github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza=github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
scripts/update-otel-deps.sh
git commit -am "Update OTel fork components to https://github.com/amazon-contributing/opentelemetry-collector-contrib/commit/${{ steps.get-latest-commit.outputs.sha }}"
git push -u origin HEAD
git config --global --unset user.name
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,10 @@ package-darwin: package-prepare-darwin-tar
ARCH=amd64 TARGET_SUPPORTED_ARCH=x86_64 PREPKGPATH="$(BUILD_SPACE)/private/darwin/amd64/tar/amazon-cloudwatch-agent-pre-pkg" $(BUILD_SPACE)/Tools/src/create_darwin.sh
ARCH=arm64 TARGET_SUPPORTED_ARCH=aarch64 PREPKGPATH="$(BUILD_SPACE)/private/darwin/arm64/tar/amazon-cloudwatch-agent-pre-pkg" $(BUILD_SPACE)/Tools/src/create_darwin.sh

.PHONY: fmt fmt-sh build test clean
update-otel-deps:
scripts/update-otel-deps.sh

.PHONY: fmt fmt-sh build test clean update-otel-deps

.PHONY: dockerized-build dockerized-build-vendor
dockerized-build:
Expand Down
13 changes: 13 additions & 0 deletions scripts/update-otel-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Get latest commit SHA from aws-cwa-dev branch
LATEST_SHA=$(git ls-remote https://github.com/amazon-contributing/opentelemetry-collector-contrib.git aws-cwa-dev | awk '{print $1}')

echo "Updating to commit: $LATEST_SHA"

# Update only amazon-contributing references in replace directives
sed -i '' "s|=> github\.com/amazon-contributing/opentelemetry-collector-contrib/\([^@]*\) v0\.0\.0-[0-9]*-[a-f0-9]*|=> github.com/amazon-contributing/opentelemetry-collector-contrib/\1 $LATEST_SHA|g" go.mod

go mod tidy

echo "Updated all OTel dependencies to $LATEST_SHA"
Loading