litmuschaos / litmus-go

Apache License 2.0
66 stars 118 forks source link

Rename env to EC2_INSTANCE_TAG #708

Closed jongwooo closed 4 weeks ago

jongwooo commented 1 month ago

Proposed changes:

Related issue https://github.com/litmuschaos/litmus/issues/4807#issuecomment-2271358440

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:

ispeakc0de commented 1 month ago

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 commented 4 weeks ago

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

jongwooo commented 4 weeks ago

@Jonsy13 Sure thing:)