Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Respect image from task_definition_arn and use default prefect image if no image is provided #170

Merged
merged 13 commits into from
Dec 6, 2022

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Dec 6, 2022

Replaces #168 with updates from review because I didn't want to manually remove all the image added in the test.

Sets image = Field(default=None) instead of image = Field(default_factory=get_prefect_image_name)

Checks if the input values contain an image or a task definition ARN. If either of those are present, it returns those. If neither are present, it checks the task definition for a Prefect container image and uses that if it is present. If no Prefect container image is found, it uses the default Prefect base image.

Closes #138

Example

Screenshots

Checklist

  • References any related issue by including "Closes #" or "Closes ".
    • If no issue exists and your change is not a small fix, please create an issue first.
  • Includes tests or only affects documentation.
  • Passes pre-commit checks.
    • Run pre-commit install && pre-commit run --all locally for formatting and linting.
  • Includes screenshots of documentation updates.
    • Run mkdocs serve view documentation locally.
  • Summarizes PR's changes in CHANGELOG.md

@ahuang11 ahuang11 requested a review from desertaxle as a code owner December 6, 2022 02:32
@ahuang11 ahuang11 requested a review from zanieb December 6, 2022 02:52
prefect_aws/ecs.py Outdated Show resolved Hide resolved
tests/test_ecs.py Outdated Show resolved Hide resolved
tests/test_ecs.py Show resolved Hide resolved
@ahuang11 ahuang11 requested a review from desertaxle December 6, 2022 18:44
Copy link
Member

@desertaxle desertaxle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

tests/test_ecs.py Outdated Show resolved Hide resolved
@ahuang11 ahuang11 changed the title New default for image 2 Set default to image = None rather than a default factory of get_prefect_image_name in ECS Dec 6, 2022
@ahuang11 ahuang11 changed the title Set default to image = None rather than a default factory of get_prefect_image_name in ECS Respect image from task_definition_arn and use default prefect image if no image is provided Dec 6, 2022
@ahuang11 ahuang11 merged commit e1ffd23 into main Dec 6, 2022
@ahuang11 ahuang11 deleted the new_default_for_image_2 branch December 6, 2022 19:11
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.

Image set on a task definition should be respected
3 participants