Skip to content

Fix AwsBatchExecutor test_try_adopt_task_instances after TaskInstanceDTO hostname requirement#68871

Merged
vatsrahul1001 merged 1 commit into
apache:mainfrom
aws-mwaa:fix-batch-executor-test-hostname
Jun 23, 2026
Merged

Fix AwsBatchExecutor test_try_adopt_task_instances after TaskInstanceDTO hostname requirement#68871
vatsrahul1001 merged 1 commit into
apache:mainfrom
aws-mwaa:fix-batch-executor-test-hostname

Conversation

@seanghaeli

@seanghaeli seanghaeli commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

set task.hostname on the orphaned-task mocks so the DTO validates.

Verified locally (breeze, py3.10): test_try_adopt_task_instances now passes (1 passed); previously failed with ValidationError

related: #68027

…DTO hostname requirement

apache#68027 routes orphaned-task adoption through TaskInstanceDTO.model_validate,
and TaskInstanceDTO inherits a required hostname: str field from the SDK
TaskInstance. The test's mock.Mock(spec=TaskInstance) never set .hostname,
so model_validate received a Mock and raised a pydantic string_type
ValidationError. This fails on main today (Non-DB / LowestDeps / LatestBoto /
Pendulum2 provider jobs).

Set task.hostname on the orphaned-task mocks so the DTO validates.

Verified locally: 1 passed.
@seanghaeli seanghaeli requested a review from o-nikolas as a code owner June 23, 2026 02:43
@boring-cyborg boring-cyborg Bot added area:providers provider:amazon AWS/Amazon - related issues labels Jun 23, 2026
@vatsrahul1001 vatsrahul1001 merged commit 0e99017 into apache:main Jun 23, 2026
80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants