Skip to content

AWS Job Definition needs wait time to reach VALID state before submission #506

@phgupta

Description

@phgupta

In this line, the script submits the AWS Batch job immediately after creating the Job Definition. However, the Job Definition does not always transition to the VALID state instantly — in some cases, it takes a few minutes.

To avoid intermittent failures, I added a time.sleep(300) before the job submission as a temporary workaround. While this ensures the Job Definition is ready in most cases, the 300-second delay is an arbitrarily chosen number and may not be optimal.

A more robust solution might involve polling the Job Definition status until it becomes VALID, or using AWS event-based callbacks if available.

Platform (please complete the following information):

  • Simulation platform: AWS
  • BuildStockBatch version, branch, or sha: v2024.11.0
  • resstock or comstock repo version, branch, or sha: v3.4.0
  • Local Desktop OS: Mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions