-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bump version to v0.32.0 * Add windows version update * Port fix of ctl script to v0.32.0 release (#2269) * Fix: don't overwrite .env file (#2261) * Fix: don't overwrite .env file Do not overwrite the .env file in case ctl commands are executed. This is specially important if extra environment variables are passed in the .env file Signed-off-by: Raphael Silva <[email protected]> * Add tests for control script Signed-off-by: Raphael Silva <[email protected]> * Fix typo in github workflow Signed-off-by: Raphael Silva <[email protected]> * Fix shell linting errors Signed-off-by: Raphael Silva <[email protected]> * Update .github/workflows/PR-build.yml * Make debian aligned with RPM Signed-off-by: Raphael Silva <[email protected]> * properly install collector deb Signed-off-by: Raphael Silva <[email protected]> * Use dpkg to install collector Signed-off-by: Raphael Silva <[email protected]> * Properly use cache Signed-off-by: Raphael Silva <[email protected]> * Move control script tests to the CI Signed-off-by: Raphael Silva <[email protected]> * Add the pr-build tests back Signed-off-by: Raphael Silva <[email protected]> --------- Signed-off-by: Raphael Silva <[email protected]> Co-authored-by: bryan-aguilar <[email protected]> * Fix control script to avoid sed special characters Signed-off-by: Raphael Silva <[email protected]> * Fix typo in tests Signed-off-by: Raphael Silva <[email protected]> * Update release notes Signed-off-by: Raphael Silva <[email protected]> --------- Signed-off-by: Raphael Silva <[email protected]> Co-authored-by: bryan-aguilar <[email protected]> --------- Signed-off-by: Raphael Silva <[email protected]> Co-authored-by: Raphael Philipe Mendes da Silva <[email protected]> Co-authored-by: bryan-aguilar <[email protected]>
- Loading branch information
1 parent
4da7dca
commit f36b166
Showing
8 changed files
with
169 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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,74 @@ | ||
#!/bin/bash -x | ||
|
||
set -e | ||
|
||
# This script is supposed to run during the CI to validate that the control | ||
# script is working as expected | ||
# Important: this script requires root permission. | ||
|
||
COLLECTOR_DEB=$1 | ||
COLLECTOR_CONFIG=$2 | ||
|
||
ADOT_CTL=/opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl | ||
ENV_FILE="/opt/aws/aws-otel-collector/etc/.env" | ||
CONFIG_FILE="/opt/aws/aws-otel-collector/etc/config.yaml" | ||
|
||
setup() { | ||
dpkg -i "$COLLECTOR_DEB" | ||
} | ||
|
||
test_collector_ctl_does_not_overwrite_env() { | ||
$ADOT_CTL -a start | ||
if [ ! -e $CONFIG_FILE ]; then | ||
echo "Config file does not exist" | ||
exit 1 | ||
fi | ||
|
||
echo "EXTRA_ENV=\"some value\"" | tee -a $ENV_FILE > /dev/null | ||
|
||
# We don't need the collector to succeed, just that the control script is execised | ||
$ADOT_CTL -a start -c "http://example.com" | ||
|
||
if ! grep -q EXTRA_ENV "$ENV_FILE"; then | ||
echo "Env file was overwritten" | ||
exit 1 | ||
fi | ||
|
||
$ADOT_CTL -a start -c "$COLLECTOR_CONFIG" | ||
if ! grep -q EXTRA_ENV "$ENV_FILE"; then | ||
ehco "Env file was overwritten" | ||
exit 1 | ||
fi | ||
echo "${FUNCNAME[0]} ... OK" | ||
} | ||
|
||
test_collector_ctl_with_sed_special_chars() { | ||
# ampersand is a special character in sed | ||
cfg="https://example.com?test=1&test=2" | ||
$ADOT_CTL -a start -c "$cfg" | ||
|
||
expected_string="^config=\"--config '${cfg}'\"$" | ||
|
||
if ! grep -q "${expected_string}" "$ENV_FILE"; then | ||
echo "Configuration is incorrect" | ||
exit 1 | ||
fi | ||
|
||
cfg="./config.yaml" | ||
$ADOT_CTL -a start -c "$cfg" | ||
|
||
expected_string="^config=\"--config /opt/aws/aws-otel-collector/etc/config.yaml\"$" | ||
if ! grep -q "${expected_string}" "$ENV_FILE"; then | ||
echo "Configuration is incorrect" | ||
exit 1 | ||
fi | ||
|
||
echo "${FUNCNAME[0]} ... OK" | ||
} | ||
|
||
|
||
setup | ||
|
||
## Tests | ||
test_collector_ctl_does_not_overwrite_env | ||
test_collector_ctl_with_sed_special_chars |
This file contains 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 |
---|---|---|
|
@@ -379,6 +379,27 @@ jobs: | |
run: | | ||
gpg --fingerprint --with-colons [email protected] grep "^fpr" | sed -n 's/^fpr:::::::::\([[:alnum:]]\+\):/\1/p' | xargs gpg --batch --yes --delete-secret-keys | ||
gpg --list-secret-keys | ||
test-control-stript: | ||
runs-on: ubuntu-latest | ||
needs: [packaging-deb] | ||
steps: | ||
- name: Checkout | ||
if: ${{ needs.changes.outputs.changed == 'true' }} | ||
uses: actions/checkout@v3 | ||
|
||
- name: Restore cached Debs | ||
if: ${{ needs.changes.outputs.changed == 'true' }} | ||
uses: actions/cache@v3 | ||
with: | ||
key: "cached_debs_${{ github.run_id }}" | ||
path: ${{ env.PACKAGING_ROOT }} | ||
|
||
- name: Execute tests | ||
if: ${{ needs.changes.outputs.changed == 'true' }} | ||
run: | | ||
sudo ./.github/scripts/test-collector-ctl.sh $PACKAGING_ROOT/debian/amd64/aws-otel-collector.deb ./config.yaml | ||
packaging-ssm: | ||
runs-on: ubuntu-latest | ||
needs: [packaging-rpm, packaging-deb, packaging-msi] | ||
|
This file contains 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 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 |
---|---|---|
@@ -1 +1 @@ | ||
v0.31.0 | ||
v0.32.0 |
This file contains 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,23 @@ | ||
# Changelog | ||
|
||
## [v0.32.0](https://github.com/aws-observability/aws-otel-collector/tree/v0.32.0) (2023-08-11) | ||
|
||
[Full Changelog](https://github.com/aws-observability/aws-otel-collector/compare/v0.31.0...v0.32.0) | ||
|
||
**Merged pull requests:** | ||
|
||
- dependabot updates Fri Aug 11 04:54:36 UTC 2023 [\#2264](https://github.com/aws-observability/aws-otel-collector/pull/2264) | ||
- Add the load balancing exporter and k8s attributes processor [\#2262](https://github.com/aws-observability/aws-otel-collector/pull/2262) ([humivo](https://github.com/humivo)) | ||
- Add Log statement about statsd receiver [\#2250](https://github.com/aws-observability/aws-otel-collector/pull/2250) ([vasireddy99](https://github.com/vasireddy99)) | ||
- Dependabot updates [\#2245](https://github.com/aws-observability/aws-otel-collector/pull/2245) ([vasireddy99](https://github.com/vasireddy99)) | ||
- \[chore\] Add Patch file for kafka exporter [\#2244](https://github.com/aws-observability/aws-otel-collector/pull/2244) ([vasireddy99](https://github.com/vasireddy99)) | ||
- \[main\] Vendor modules and add patch file for StatsD Receiver [\#2241](https://github.com/aws-observability/aws-otel-collector/pull/2241) ([vasireddy99](https://github.com/vasireddy99)) | ||
- Dependabot prs/2023 08 01 t120653 and OTel Collector v0.82.0 [\#2229](https://github.com/aws-observability/aws-otel-collector/pull/2229) ([vasireddy99](https://github.com/vasireddy99)) | ||
- Adding ECS\_Observer\_Test\_Case [\#2227](https://github.com/aws-observability/aws-otel-collector/pull/2227) ([PaurushGarg](https://github.com/PaurushGarg)) | ||
- \[chore\] update main branch with release/v0.31.x [\#2213](https://github.com/aws-observability/aws-otel-collector/pull/2213) ([bryan-aguilar](https://github.com/bryan-aguilar)) | ||
- \[chore\] Add missing cluster targets [\#2212](https://github.com/aws-observability/aws-otel-collector/pull/2212) ([bryan-aguilar](https://github.com/bryan-aguilar)) | ||
- \[chore\] Store and use testcases file from collector repo [\#2205](https://github.com/aws-observability/aws-otel-collector/pull/2205) ([bryan-aguilar](https://github.com/bryan-aguilar)) | ||
- \[fix\] Don't overwrite systemd environment file [\#2261](https://github.com/aws-observability/aws-otel-collector/pull/2261) [\#2267](https://github.com/aws-observability/aws-otel-collector/pull/2267) ([rapphil](https://github.com/rapphil)) | ||
|
||
|
||
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* |
This file contains 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 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 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