Skip to content
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

Rename env to EC2_INSTANCE_TAG #708

Merged

Conversation

jongwooo
Copy link
Contributor

@jongwooo jongwooo commented Aug 7, 2024

Proposed changes:

Related issue litmuschaos/litmus#4807 (comment)

This PR fixes an issue where the ec2-stop-by-tag experiment fails to target the intended EC2 instance.

The ec2-stop-by-tag experiment encounters a TARGET_SELECTION_ERROR due to an incorrect retrieval of the EC2_INSTANCE_TAG environment variable.

Fault Summary:
TARGET_SELECTION_ERROR
{"errorCode":"TARGET_SELECTION_ERROR","phase":"PreChaos","reason":"failed to get the instance tag, invalid instance tag","target":"{EC2 Instance Tag: , Region: ap-northeast-2}"}

By correctly renaming the environment variable from INSTANCE_TAG to EC2_INSTANCE_TAG, we can accurately target the intended EC2 instance.

Special notes for your reviewer:

cc. @namkyu1999

Checklist:

  • Fixes #
  • PR messages has document related information
  • Labelled this PR & related issue with breaking-changes tag
  • PR messages has breaking changes related information
  • Labelled this PR & related issue with requires-upgrade tag
  • PR messages has upgrade related information
  • Commit has unit tests
  • Commit has integration tests
  • E2E run Required for the changes

@ispeakc0de
Copy link
Member

Can you fix the pre-checks build?

The following files were found to be not go formatted:
pkg/kube-aws/ec2-terminate-by-tag/types/types.g

@Jonsy13
Copy link
Contributor

Jonsy13 commented Aug 14, 2024

Hi @jongwooo
Can you please fix the failing check in this PR, it should be fixed by running gofmt.
Command - gofmt -w .

@jongwooo
Copy link
Contributor Author

@Jonsy13 Sure thing:)

@jongwooo jongwooo force-pushed the rename-env-to-ec2-instance-tag branch from a053f3e to acaeac9 Compare August 14, 2024 10:32
@ispeakc0de ispeakc0de merged commit f051d5a into litmuschaos:master Aug 14, 2024
8 of 9 checks passed
dusdjhyeon pushed a commit to dusdjhyeon/litmus-go that referenced this pull request Aug 21, 2024
Signed-off-by: Jongwoo Han <[email protected]>
Signed-off-by: dusdjhyeon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants