https://prefect.io logo
Title
n

Nate

04/13/2023, 8:12 PM
@Marvin can you explain how prefect artifacts are versioned? what happens if I create an artifact with the same key twice?
βœ… 1
m

Marvin

04/13/2023, 8:14 PM
Artifacts in Prefect are persisted outputs such as tables, files, or links. They can be published via the Prefect SDK or API and can be rendered and managed in the Prefect UI. This makes it easy to track and monitor the objects that your flows produce and update over time. Artifacts can be associated with a particular task run, flow run, or outside a flow run context source. When you create an artifact, it is displayed as an individual artifact in the Prefect UI. Each call to create_link_artifact() or create_markdown_artifact() generates a distinct artifact source. To inspect all versions of an artifact with a given key, you can run the following command:
prefect artifact inspect <my-key>
. You can also view all artifacts by running:
prefect artifact ls
source. It seems that when you create an artifact with the same key twice, it will create a new version of the artifact. You can inspect the lineage of an artifact over time by clicking into a specific artifact in the Prefect UI source.
n

Nate

04/13/2023, 8:27 PM
@Marvin can u explain how I can use them in terms of the teenage mutant ninja turtles? I literally can't understand anything unless its described in terms of teenage mutant ninja turtles
m

Marvin

04/13/2023, 8:28 PM
Of course, let's use the Teenage Mutant Ninja Turtles (TMNT) as an analogy to explain Prefect artifacts. Imagine the TMNT are a team of data engineers, and each turtle represents a task in a Prefect flow. Their mission is to collect and process data (pizza ingredients) to create the perfect pizza (final output). Artifacts in this context can be thought of as the intermediate pizza recipes or ingredients that the turtles collect and process during their mission. Each turtle (task) can create an artifact (recipe or ingredient) and share it with the others. For example, Leonardo might be responsible for finding the best pizza dough recipe. He creates an artifact (a dough recipe) and shares it with the team. Donatello then takes that dough recipe and adds his own twist, creating a new artifact (an updated dough recipe). This process continues with Michelangelo and Raphael, each creating their own artifacts (recipes or ingredients) as they contribute to the final pizza. In the end, the TMNT can look back at the artifacts they created during their mission to see how the pizza recipe evolved over time. They can also share these artifacts with others, like Master Splinter, who can review and provide feedback on their work. In summary, Prefect artifacts are like the intermediate recipes or ingredients that the TMNT create and share during their mission to make the perfect pizza. They help track the progress and evolution of their work, making it easier to collaborate and review the final output.
πŸ˜‚ 3
πŸ• 3
🐒 2
r

Ryan Peden

04/13/2023, 9:33 PM
@Marvin that's great, but what if I needed to use Prefect Artifacts to defeat Grand Moff Tarkin at Yavin 4? Everyone gives Skywalker credit for that victory, but I have it on good authority that Skywalker actually missed the exhaust port and Mon Mothma herself had to use Prefect Artifacts to save the day. Can you tell me how that unfolded?
πŸ˜‚ 1
❀️ 1
m

Marvin

04/13/2023, 9:34 PM
Ah, I see you're looking for a creative crossover between Prefect Artifacts and the Star Wars universe. Let's imagine how Mon Mothma might have used Prefect Artifacts to save the day at the Battle of Yavin. In this scenario, the Rebel Alliance is using Prefect to coordinate their attack on the Death Star. Each pilot's mission data and flight path are represented as tasks in a Prefect flow. As the pilots progress through their mission, they create artifacts to share vital information with the rest of the team. When Luke Skywalker misses the exhaust port, Mon Mothma quickly realizes that they need a new plan. She turns to the Prefect Artifacts created by the pilots during their mission to find a solution. Mon Mothma reviews the artifacts, which include flight data, reconnaissance images, and damage reports. She discovers an alternative weak point in the Death Star's defenses, thanks to an artifact created by one of the pilots during their attack run. Using this newfound information, Mon Mothma quickly devises a new strategy and communicates it to the remaining pilots. They adjust their attack patterns based on the updated artifacts and successfully exploit the Death Star's vulnerability, leading to its destruction and a victory for the Rebel Alliance. In this imaginative scenario, Prefect Artifacts played a crucial role in helping the Rebel Alliance adapt their strategy and ultimately defeat Grand Moff Tarkin at Yavin 4. The artifacts provided valuable insights and allowed the team to collaborate effectively, even in the heat of battle.
n

Nate

04/13/2023, 9:55 PM
lol incredible
r

Ryan Peden

04/13/2023, 9:56 PM
I'd watch that movie Using artifacts like this sounds way cooler than using the force
❗ 1
Forget Skywalker, I want to watch people fight evil with Prefect
πŸ˜„ 1
n

Nate

04/13/2023, 9:57 PM
i wonder how the story would change if i made him more acutely aware of all our core concepts, events and state n stuff
r

Ryan Peden

04/14/2023, 12:46 AM
@Marvin This is intriguing, but let me tell you a little about my greatest fear: Ewoks. Those little fuzzballs stopped the Empire from crushing the Rebel Alliance during the Battle of Endor, but it was close. Too close for comfort. I'd rather not have a bunch of sentient teddy bears as the last line of defense against galactic evil. I think that's a reasonable fear! So, tell me: could the Ewoks use artifacts, flows, tasks, and other Prefect features to bolster their capabilities? If so, how? Can you give specific examples to help me envision it? What Mon Mothma and Admiral Ackbar and co. did with artifacts was impressive, but they were advanced society with X-Wings and Y-Wings and Mon Calamari cruisers. They're exactly the type I'd expect to excel with Prefect. I'd be truly impressed with Prefect's UX if the Ewoks could use artifacts and other features to mount a credible defense against a certain pale guy in a black robe who shoots lightning from his fingertips - and his many associates.When the second Battle of Endor rolls around, I suspect our furry friends will need all the help they can get.
(I promise I'll stop bugging Marvin now)
n

Nate

04/14/2023, 12:52 AM
πŸ€” afk but i will check the logs
m

Marvin

04/14/2023, 12:54 AM
I've found some examples of how Prefect artifacts, flows, tasks, and other features can be used. Let's see how the Ewoks might apply these to their defense strategy: 1. Debugging: Ewoks could use Prefect artifacts to monitor their traps and defenses. By publishing data about their traps in the Prefect UI, they can easily see when and where their traps were set and if they were triggered. This would help them identify weak points in their defense and make adjustments as needed (source). 2. Data quality checks: Ewoks could use artifacts to publish data quality checks from in-progress tasks, ensuring that their defense systems are functioning properly. For example, they could monitor the performance of their catapults and make adjustments to improve their accuracy (source). 3. Documentation: Ewoks could use artifacts to publish documentation and sample data to help them keep track of their work and share information with their allies. This would allow them to coordinate their efforts more effectively and ensure that everyone is on the same page (source). 4. Flow orchestration: Ewoks could use Prefect to schedule and deploy workflows that run in the environments best suited to their execution. This would help them prevent and recover from failures, and view and manage the status of their defense systems, making their workflow more resilient, observable, configurable, interactive, and automated (source). While the Ewoks might not be as technologically advanced as other species in the Star Wars universe, these examples show how they could potentially use Prefect features to bolster their capabilities and mount a credible defense against the dark side.
r

Ryan Peden

04/14/2023, 12:54 AM
ahh there we go
n

Nate

04/14/2023, 12:54 AM
ooh ok just took a bit
i need to have more faith
r

Ryan Peden

04/14/2023, 1:02 AM
Thanks to Marvin, I'm imagining a bunch Ewoks writing Python on their MacBooks. The Empire won't know what hit them.
n

Nate

04/14/2023, 1:04 AM
πŸ˜‚ that’s not something i woke up anticipating I’d imagine today