generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 244
Add script to update OTel dependencies and simplify GitHub Action #1959
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
Open
the-mann
wants to merge
5
commits into
main
Choose a base branch
from
otel-deps-script-only
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cc9aa49
Add script to update OTel dependencies and simplify GitHub Action
the-mann d3699d9
Merge branch 'main' into otel-deps-script-only
the-mann b392b6a
Merge branch 'main' into otel-deps-script-only
the-mann 197990d
Improve OTel deps update script with parameter support and better err…
the-mann edb36c6
Update otel deps script
the-mann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.