Merge pull request #2761 from bblommers/bugfix/1427

EMR - Return start time of first step
This commit is contained in:
Steve Pulec 2020-02-22 18:26:01 -06:00 committed by GitHub
commit a89c150627
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View file

@ -86,6 +86,9 @@ class FakeStep(BaseModel):
self.start_datetime = None
self.state = state
def start(self):
self.start_datetime = datetime.now(pytz.utc)
class FakeCluster(BaseModel):
def __init__(
@ -204,6 +207,8 @@ class FakeCluster(BaseModel):
self.start_cluster()
self.run_bootstrap_actions()
if self.steps:
self.steps[0].start()
@property
def instance_groups(self):

View file

@ -835,7 +835,7 @@ LIST_STEPS_TEMPLATE = """<ListStepsResponse xmlns="http://elasticmapreduce.amazo
{% if step.end_datetime is not none %}
<EndDateTime>{{ step.end_datetime.isoformat() }}</EndDateTime>
{% endif %}
{% if step.ready_datetime is not none %}
{% if step.start_datetime is not none %}
<StartDateTime>{{ step.start_datetime.isoformat() }}</StartDateTime>
{% endif %}
</Timeline>