这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Mar 4, 2021. It is now read-only.

Conversation

@mlafeldt
Copy link
Contributor

@mlafeldt mlafeldt commented May 6, 2016

In order to get the IDs of terminated EC2 instances after the fact.

With this change, both POST and GET will return the same JSON fields for each event. For some reason, eventID (the EC2 instance ID) was missing when retrieving events via the REST API.

Before:

$ curl -s http://$DOCKER_HOST_IP:8080/simianarmy/api/v1/chaos | jq .[0]
{
  "monkeyType": "CHAOS",
  "eventType": "CHAOS_TERMINATION",
  "eventTime": 1462548706242,
  "region": "eu-west-1",
  "groupType": "ASG",
  "groupName": "some-group",
  "chaosType": "ShutdownInstance"
}

After:

$ curl -s http://$DOCKER_HOST_IP:8080/simianarmy/api/v1/chaos | jq .[0]
{
  "monkeyType": "CHAOS",
  "eventId": "i-1e0db592",
  "eventType": "CHAOS_TERMINATION",
  "eventTime": 1462548706242,
  "region": "eu-west-1",
  "groupType": "ASG",
  "groupName": "some-group",
  "chaosType": "ShutdownInstance"
}

In order to get the IDs of terminated EC2 instances after the fact.

With this change, both `POST` and `GET` will return the same JSON fields
for each event. For some reason, `eventID` (the EC2 instance ID) was
missing when retrieving events via the REST API.
@mlafeldt
Copy link
Contributor Author

mlafeldt commented May 6, 2016

Looking at the broken test right now.

@mlafeldt
Copy link
Contributor Author

mlafeldt commented May 6, 2016

Fixed the failing test. Accidentally also fixed another problem where the test checked for a field named instanceId, which doesn't exist.

Please take a look.

@ebukoski
Copy link
Contributor

ebukoski commented May 6, 2016

LGTM, thanks for the contribution!

@ebukoski ebukoski merged commit b609eeb into Netflix:master May 6, 2016
@mlafeldt mlafeldt deleted the rest-event-id branch July 9, 2016 09:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants