When two Flow runs share same name, it appears tha...
# prefect-community
d
When two Flow runs share same name, it appears that getting logs via prefect CLI shows only the logs from more recent run, is that right? Is there a way to access the logs from earlier run with same name via CLI?
j
Ah yes that is right! This command was last adjust prior to allowing for custom named runs 🙂 Would you mind opening an issue for this? I think it should be adjusted to also allow for query based on something like ID
Actually, no need to open an issue, it’s a small change and I’ll make it right now. Would ID suffice in your case?
d
Well, I think it would if
prefect get flow-runs
also returned the flow run id -- 🙂 I am trying to use CLI to pull error messages out of Failed flow runs
Starting with scraping failed runs e.g.
prefect get flow-runs --flow final_stats-production --limit 1000 | grep Failed | awk '{print $1}'
... maybe I'm on the wrong path entirely?
j
Yeah that should be an easy addition as well 😄, stand by
🚀 1
d
Alternately, we may generate a unique run name for each Flow creation, tack a timestamp on to the end or something
j
Yeah that’s another option!
d
I think we may do that in any case for sanity's sake and so you can backlog the other improvement as you like. Thank you!
j
Great! Here’s a short PR I made https://github.com/PrefectHQ/prefect/pull/2671
👍 1
d
Thanks again!