Skip to content

Batch: DeregisterJobDefinition and the delete/update lifecycle operations are unrouted, so no resource can leave service #555

Description

@scttfrdmn

Summary

DeregisterJobDefinition, DeleteJobQueue, DeleteComputeEnvironment and UpdateJobQueue/UpdateComputeEnvironment are not routed by parseBatchOperation (emulator/batch_plugin.go), so a Batch resource can be created but never taken out of service or changed.

Found while implementing #530, which added the three Describe* reads and made the creates persist. That work makes this gap observable in a specific way worth recording: DescribeJobDefinitions now honours the documented status filter, but nothing can produce an INACTIVE job definition, because deregistration is the only operation that sets it. So --status INACTIVE correctly returns an empty list, and correctly always will, until this is fixed.

The same applies to the other two resources: DescribeComputeEnvironments/DescribeJobQueues report state: ENABLED and status: VALID because that is what a create records, and no routed operation can move them.

Cause

parseBatchOperation routes the three creates and (since #530) the three describes. The lifecycle operations were never added.

Acceptance criteria

  • DeregisterJobDefinition routed, marking the addressed revision INACTIVE per the API reference. Verify against the reference whether a deregistered revision remains describable (it does — that is why status is a filter) and whether the bare-name describe still reports it.
  • DeleteComputeEnvironment and DeleteJobQueue routed, with the documented precondition that a queue must be DISABLED before deletion, and that an environment associated with a queue cannot be deleted.
  • UpdateComputeEnvironment and UpdateJobQueue routed, so state can move ENABLEDDISABLED — the precondition the deletes depend on.
  • Each honours the ClientException/ServerException pair that is the only documented error shape for Batch.
  • Tests assert a deregistered job definition is reported INACTIVE and is selected by --status INACTIVE and not by --status ACTIVE, which is the assertion Batch: DescribeComputeEnvironments/DescribeJobQueues/DescribeJobDefinitions are unrouted, so a created resource cannot be read back #530's work cannot currently make.
  • docs/services.md Batch operation table updated.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething is not working correctly

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions