https://prefect.io logo
Title
b

Ben Muller

11/09/2022, 10:05 PM
Hey all - I seem to get unlimited help from all of the incredible prefect peeps on the #prefect-community channel, so thought that in some way/shape/form may be useful to others. It is very much specific to my use case, but maybe there are pieces that others can use. It is a CI pattern I am using for a repository of ECSTask flows that run across different workspaces in Prefect 2.0. The scripts might help out others. Have a look and feel free to shoot me any questions. https://github.com/bennnym/prefect-ci-pattern
šŸ™Œ 14
šŸ‘ 7
:thank-you: 7
:upvote: 4
ā¤ļø 4
šŸš€ 8
šŸŽ‰ 6
:gratitude-thank-you: 5
šŸ‘šŸ½ 1
šŸ™ŒšŸ½ 1
a

Anna Geller

11/10/2022, 1:32 AM
very cool, thanks so much for sharing! I see now why you need cpu and memory overrides as alternative to YAML, you could also attach a schedule using
prefect deployment set-schedule
even though I guess your goal was that everything is configurable through YAML, correct? and this is why you skip upload during build and add --upload to apply step?
b

Ben Muller

11/10/2022, 2:36 AM
yep, that is exactly right @Anna Geller. I took your advice and moved away from the python object based deployments and went with the cli, I think this works well
šŸ™Œ 1
āœ… 1
šŸ™ŒšŸ½ 1
a

Anna Geller

11/10/2022, 2:39 AM
nice work and very cool to see you even added some emojis to make the output look nice šŸ˜Ž
šŸ™Œ 1
t

Timo

11/10/2022, 2:19 PM
With the latest changes from https://github.com/PrefectHQ/prefect/pull/7282 (v2.6.6+) you could provide the schedule with a timezone directly in the build command.
m

Michiel Verburg

11/10/2022, 3:26 PM
Interesting! You say you took @Anna Geller’s advice to move away from Python-based deployments essentially? I am currently not yet decided on which makes most sense. Could one of you elaborate on why CLI is better versus e.g. the
build_from_flow
? Also, if I understand your scripts correctly, you define the schedule (and other things that are essentially not having defaults, or to simply override defaults) in the
deploy/prefect/deployments.yml
file right?
b

Ben Muller

11/10/2022, 6:04 PM
Yeah that's right @Michiel Verburg. As mentioned it is very specific to my use case as I bundle up all my repos deps and use one image. Tbh the argument @Anna Geller made is that deployments are configuration and python should be used for business logic. After some thought I agreed, so I went with the cli.
šŸ™Œ 2