Skip to content

Commit

Permalink
Merge branch 'amazon-contributing:aws-cwa-dev' into aws-cwa-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mitali-salvi authored Nov 2, 2023
2 parents 6b8813b + 85560f4 commit 15e5588
Show file tree
Hide file tree
Showing 66 changed files with 2,432 additions and 263 deletions.
23 changes: 23 additions & 0 deletions .chloggen-aws/TEMPLATE.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type:

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component:

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note:

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: []

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# e.g. '[aws]'
# Include 'aws' if the change is done done by cwa
# Default: '[user]'
change_logs: [aws]
26 changes: 26 additions & 0 deletions .chloggen-aws/changelog-aws.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: 'new_component'

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: changelog

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Added a chloggen for cwa"

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [125]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: Added a new changelog directory that stores the changelog yaml files created by the cwa team with (make chlog-new-aws)
Added a new CHANGELOG-AWS.md file for cwa team.
make chlog-update-aws will update the CHANGELOG-AWS.md file with the .chloggen-aws files and delete the .chloggen-aws directory yaml after updating.


# e.g. '[aws]'
# Include 'aws' if the change is done done by cwa
# Default: '[user]'
change_logs: [aws]
23 changes: 23 additions & 0 deletions .chloggen-aws/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# The directory that stores individual changelog entries.
# Each entry is stored in a dedicated yaml file.
# - 'chloggen new' will copy the 'template_yaml' to this directory as a new entry file.
# - 'chloggen validate' will validate that all entry files are valid.
# - 'chloggen update' will read and delete all entry files in this directory, and update 'changelog_md'.
# Specify as relative path from root of repo.
# (Optional) Default: .chloggen
entries_dir: .chloggen-aws

# This file is used as the input for individual changelog entries.
# Specify as relative path from root of repo.
# (Optional) Default: .chloggen/TEMPLATE.yaml
template_yaml: .chloggen-aws/TEMPLATE.yaml

# The CHANGELOG file or files to which 'chloggen update' will write new entries
# (Optional) Default filename: CHANGELOG.md
change_logs:
aws: CHANGELOG-AWS.md

# The default change_log or change_logs to which an entry should be added.
# If 'change_logs' is specified in this file, and no value is specified for 'default_change_logs',
# then 'change_logs' MUST be specified in every entry file.
default_change_logs: [aws]
27 changes: 27 additions & 0 deletions .chloggen/strip-aws-sdk-local-root.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: awsxrayexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Extend the AWSK.SDK prefix stripping to cover a previously missed case, for local root spans

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [27232]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: Follow-up from https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/27232

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ exporter/tencentcloudlogserviceexporter/ @open-telemetry/collect
exporter/zipkinexporter/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @astencel-sumo @crobert-1

extension/asapauthextension/ @open-telemetry/collector-contrib-approvers @jamesmoessis @MovieStoreGuy
extension/awsmiddleware/ @open-telemetry/collector-contrib-approvers @jefchien
extension/awsproxy/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @mxiamxia
extension/basicauthextension/ @open-telemetry/collector-contrib-approvers @jpkrohling @svrakitin @frzifus
extension/bearertokenauthextension/ @open-telemetry/collector-contrib-approvers @jpkrohling @pavankrish123 @frzifus
Expand Down
10 changes: 5 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ updates:
schedule:
interval: "weekly"
day: "wednesday"
- package-ecosystem: "gomod"
directory: "/extension/awsmiddleware"
schedule:
interval: "weekly"
day: "wednesday"
- package-ecosystem: "gomod"
directory: "/extension/awsproxy"
schedule:
Expand Down Expand Up @@ -1097,8 +1102,3 @@ updates:
schedule:
interval: "weekly"
day: "wednesday"
- package-ecosystem: "gomod"
directory: "/receiver/snmpreceiver"
schedule:
interval: "weekly"
day: "wednesday"
48 changes: 48 additions & 0 deletions .github/workflows/changelog-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Update changelog

on:
pull_request:
types:
- closed
jobs:
update:
runs-on: ubuntu-latest

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# updated CHANGELOG-AWS.md back to the repository.
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
contents: write
steps:
- name: Checkout action
uses: actions/checkout@v3
- name : checkout
run : |
git config --global user.name 'Github Action'
git config --global user.email '[email protected]'
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ~1.21.1
cache: false
- name: make update changelog
run: make chlog-update-aws
- name: switching from HTTPS to SSH
run: git remote set-url origin https://github.com/amazon-contributing/opentelemetry-collector-contrib.git
- name: check for changes
run: |
git branch
git status
- name: stage changed files
run: git add ./CHANGELOG-AWS.md
- name: commit changed files
run: |
git config --global user.name 'Github Action'
git config --global user.email '[email protected]'
git commit -m "Auto updating changelog-aws.md"
- name: pull from master
run: |
git remote -v
git pull
- name: push code to aws-cwa-dev
run: git push origin aws-cwa-dev
93 changes: 93 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# This action requires that any PR targeting the aws-cwa-dev branch should add a
# yaml file to the ./.chloggen/ directory. If a CHANGELOG entry is not required,
# or if performing maintance on the Changelog, add either \"[chore]\" to the title of
# the pull request or add the \"Skip Changelog\" label to disable this action.

name: changelog

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- aws-cwa-dev
env:
# Make sure to exit early if cache segment download times out after 2 minutes.
# We limit cache download as a whole to 5 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
changelog:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
env:
PR_HEAD: ${{ github.event.pull_request.head.sha }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
key: changelog-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Ensure no changes to the CHANGELOG-AWS.md
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') && !contains(github.event.pull_request.title, '[chore]')}}
run: |
if [[ $(git diff --name-only $(git merge-base origin/main $PR_HEAD) $PR_HEAD ./CHANGELOG-AWS.md) ]]
then
echo "CHANGELOG-AWS.md should not be directly modified."
echo "Please add a .yaml file to the ./.chloggen-aws/ directory."
echo "See CONTRIBUTING-AWS.md for more details."
echo "Alternately, add either \"[chore]\" to the title of the pull request or add the \"Skip Changelog\" label if this job should be skipped."
false
else
echo "CHANGELOG-AWS.md were not modified."
fi
- name: Ensure ./.chloggen-aws/*.yaml addition(s)
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') && !contains(github.event.pull_request.title, '[chore]')}}
run: |
if [[ 1 -gt $(git diff --diff-filter=A --name-only $(git merge-base origin/main $PR_HEAD) $PR_HEAD ./.chloggen-aws | grep -c \\.yaml) ]]
then
echo "No changelog entry was added to the ./.chloggen-aws/ directory."
echo "Please add a .yaml file to the ./.chloggen-aws/ directory."
echo "See CONTRIBUTING-AWS.md for more details."
echo "Alternately, add either \"[chore]\" to the title of the pull request or add the \"Skip Changelog\" label if this job should be skipped."
false
else
ls ./.chloggen-aws
echo "A changelog entry was added to the ./.chloggen-aws/ directory."
fi
- name: Validate ./.chloggen/*.yaml changes
run: |
make chlog-validate-aws \
|| { echo "New ./.chloggen-aws/*.yaml file failed validation."; exit 1; }
# In order to validate any links in the yaml file, render the config to markdown
- name: Render .chloggen changelog entries
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') && !contains(github.event.pull_request.title, '[chore]')}}
run: make chlog-preview-aws > changelog_preview.md
- name: Install markdown-link-check
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') && !contains(github.event.pull_request.title, '[chore]')}}
run: npm install -g markdown-link-check
- name: Run markdown-link-check
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') && !contains(github.event.pull_request.title, '[chore]')}}
run: |
markdown-link-check \
--verbose \
--config .github/workflows/check_links_config.json \
changelog_preview.md \
|| { echo "Check that anchor links are lowercase"; exit 1; }
10 changes: 10 additions & 0 deletions CHANGELOG-AWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- This file is autogenerated. See CONTRIBUTING.md for instructions to add an entry. -->

# GO AWS cloudwatch agent Changelog

This changelog includes only clodwatch agent developer-facing changes.
Please checkout contributing file [CONTRIBUTING-AWS.md](./CONTRIBUTING-AWS.md)

<!-- next version -->


Loading

0 comments on commit 15e5588

Please sign in to comment.