-
Notifications
You must be signed in to change notification settings - Fork 239
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
Fix: don't overwrite .env file #2261
Conversation
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 <rapphil@gmail.com>
44b8f0a
to
22be499
Compare
Signed-off-by: Raphael Silva <rapphil@gmail.com>
@@ -253,6 +253,27 @@ jobs: | |||
ARCH=amd64 DEST=build/packages/debian/amd64 tools/packaging/debian/create_deb.sh | |||
ARCH=arm64 DEST=build/packages/debian/arm64 tools/packaging/debian/create_deb.sh | |||
|
|||
test-control-stript: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using PR-build for now to test that this works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to leave this permanently since these tests are very cheap to execute.
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
@@ -46,15 +46,15 @@ cp LICENSE "${AOC_ROOT}/opt/aws/aws-otel-collector/" | |||
cp VERSION "${AOC_ROOT}/opt/aws/aws-otel-collector/bin/" | |||
cp "build/linux/${ARCH}/aoc" "${AOC_ROOT}/opt/aws/aws-otel-collector/bin/aws-otel-collector" | |||
cp tools/ctl/linux/aws-otel-collector-ctl.sh "${AOC_ROOT}/opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl" | |||
cp config.yaml "${AOC_ROOT}/opt/aws/aws-otel-collector/etc" | |||
# default configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding this to this pr since this is a one liner.
This change will make the .deb file in parity with the RPM file and how the control script works.
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
* 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 <rapphil@gmail.com> * Add tests for control script Signed-off-by: Raphael Silva <rapphil@gmail.com> * Fix typo in github workflow Signed-off-by: Raphael Silva <rapphil@gmail.com> * Fix shell linting errors Signed-off-by: Raphael Silva <rapphil@gmail.com> * Update .github/workflows/PR-build.yml * Make debian aligned with RPM Signed-off-by: Raphael Silva <rapphil@gmail.com> * properly install collector deb Signed-off-by: Raphael Silva <rapphil@gmail.com> * Use dpkg to install collector Signed-off-by: Raphael Silva <rapphil@gmail.com> * Properly use cache Signed-off-by: Raphael Silva <rapphil@gmail.com> * Move control script tests to the CI Signed-off-by: Raphael Silva <rapphil@gmail.com> * Add the pr-build tests back Signed-off-by: Raphael Silva <rapphil@gmail.com> --------- Signed-off-by: Raphael Silva <rapphil@gmail.com> Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com> * Fix control script to avoid sed special characters Signed-off-by: Raphael Silva <rapphil@gmail.com> * Fix typo in tests Signed-off-by: Raphael Silva <rapphil@gmail.com> * Update release notes Signed-off-by: Raphael Silva <rapphil@gmail.com> --------- Signed-off-by: Raphael Silva <rapphil@gmail.com> Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com>
* 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 <rapphil@gmail.com> * Add tests for control script Signed-off-by: Raphael Silva <rapphil@gmail.com> * Fix typo in github workflow Signed-off-by: Raphael Silva <rapphil@gmail.com> * Fix shell linting errors Signed-off-by: Raphael Silva <rapphil@gmail.com> * Update .github/workflows/PR-build.yml * Make debian aligned with RPM Signed-off-by: Raphael Silva <rapphil@gmail.com> * properly install collector deb Signed-off-by: Raphael Silva <rapphil@gmail.com> * Use dpkg to install collector Signed-off-by: Raphael Silva <rapphil@gmail.com> * Properly use cache Signed-off-by: Raphael Silva <rapphil@gmail.com> * Move control script tests to the CI Signed-off-by: Raphael Silva <rapphil@gmail.com> * Add the pr-build tests back Signed-off-by: Raphael Silva <rapphil@gmail.com> --------- Signed-off-by: Raphael Silva <rapphil@gmail.com> Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com> * Fix control script to avoid sed special characters Signed-off-by: Raphael Silva <rapphil@gmail.com> * Fix typo in tests Signed-off-by: Raphael Silva <rapphil@gmail.com> * Update release notes Signed-off-by: Raphael Silva <rapphil@gmail.com> --------- Signed-off-by: Raphael Silva <rapphil@gmail.com> Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com> --------- Signed-off-by: Raphael Silva <rapphil@gmail.com> Co-authored-by: Raphael Philipe Mendes da Silva <rapphil@gmail.com> Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com>
Description: 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
Link to tracking Issue: #2243
Testing: Manual
New tests were also added to validate the regression. I'm adding to both the CI and PR build since this test is very cheap to execute and does not require any special permissions.
Documentation:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.