https://prefect.io
Join Slack
For some reason, the artifacts create_markdown is rendering the markdown, but it is ignoring the ima...
t

Tomás Emilio Silva Ebensperger

almost 4 years ago
For some reason, the artifacts create_markdown is rendering the markdown, but it is ignoring the images. Has anyone had this issue?
1️⃣ 2
✅ 1
t
b
  • 2
  • 9
  • 173
Hi - we are running into a problem with running a flow on a docker container. We get the following ...
m

madhav

over 4 years ago
Hi - we are running into a problem with running a flow on a docker container. We get the following error:
Failed to load and execute flow run: ModuleNotFoundError("No module named '/root/'")
Our setup: • a GitHub agent packages and deploys a docker container to ECR • ECS pulls the ECR image and deploys a fargate instance • (For our proof of concept) When the machine runs, we register a flow that lives in the image/fargate instance • After that we run
prefect local agent start
(both flow registration and starting the agent are run from a script that our ECS task definition runs on boot) • We do a “quick run” and get the module not found error. Other things to note: • all of our flows and supporting modules are on this container. • I’ve read some of the existing discussion surrounding this error and was not sure if the solution applied to our situation - given that we are running everything on the same Fargate instance
m
k
m
  • 3
  • 12
  • 173
Is `prefect.context.get("scheduled_start_time")` timezone aware? if not, is there an assumed timezo...
c

Constantino Schillebeeckx

almost 5 years ago
Is
prefect.context.get("scheduled_start_time")
timezone aware? if not, is there an assumed timezone of UTC? If I schedule my flow with something like
CronSchedule(cron, start_date=pendulum.datetime(2021, 1, 1, tz=tz))
will the "scheduled_start_time" have the same timezone as the cron schedule?
c
k
  • 2
  • 3
  • 173
Hello Prefect Community, I’m looking to automate a workflow with Prefect 2 that needs to start whene...
r

Rustam Salavatov

over 2 years ago
Hello Prefect Community, I’m looking to automate a workflow with Prefect 2 that needs to start whenever a new file is uploaded to a Google Cloud Storage bucket. I’m not sure how to set up a trigger in Google Cloud that notifies my Prefect flow as soon as a new file is available. Ideally, this would involve some integration between Google Cloud Functions and Google Pub/Sub to detect new files and trigger the flow. Has anyone here set up something similar? Could you provide guidance or examples on how to configure the triggers and set up the flow to listen for these events? Any help or insights would be greatly appreciated! Thank you in advance!
r
n
m
  • 3
  • 3
  • 172
Hi, I’m looking for instructions on installing requirements on deployments, but this guide seems to ...
j

Jonah

almost 3 years ago
Hi, I’m looking for instructions on installing requirements on deployments, but this guide seems to be missing: https://docs.prefect.io/latest/guides/deployment/kubernetes
✅ 1
j
c
j
  • 3
  • 10
  • 172
Does anyone know of a workaround to run a task from a task in Prefect 2? I've found some examples of...
o

Oscar Björhn

about 4 years ago
Does anyone know of a workaround to run a task from a task in Prefect 2? I've found some examples of people using .fn but it doesn't appear to work in my case. Specifically, I'd prefer to run trigger_dbt_cli_command from the prefect-dbt package from one of my tasks rather than having to create a flow to run it. I can't change the definition of trigger_dbt_cli_command, since the package itself defines it as a task. I think my problem might be related to the task being async, it seems to finish the execution instantly and the returned type is "None". As long as I'm not using fn(), Prefect will patiently wait for a result, but then I'm forced to call the task from a flow. Edit: If anyone thinks I'm going about this the wrong way, I'd be happy to hear that too. Maybe I just need to settle on always calling trigger_dbt_cli_command from a flow. 🙂
✅ 1
o
k
m
  • 3
  • 3
  • 172
Hello! All my flows are stuck in "late" state :cry:
j

Johan sh

about 2 years ago
Hello! All my flows are stuck in "late" state 😢
j
b
+5
  • 7
  • 25
  • 171
Morning! I have an issue with the latest prefect release (2.16.0), the version 2.15.0 works fine. ...
w

William Jamir

over 2 years ago
Morning! I have an issue with the latest prefect release (2.16.0), the version 2.15.0 works fine. I have this minimal workable code async code.
@flow
async def myflow(experiment_id: int):
    engine = create_async_engine(
        url=get_db_url(),
        connect_args={
            'statement_cache_size': 0,
            'prepared_statement_cache_size': 0,
        },
    )

    async with AsyncSession(engine) as session:
        await session.get(Experiment, experiment_id)

if __name__ == '__main__':

    loop = asyncio.run(myflow(189))
But if I use a task, I got the following error:
RuntimeError: Task <Task pending name='Task-27' coro=<AsyncSession.close() running at /Users/william/.pyenv/versions/myenv/lib/python3.11/site-packages/sqlalchemy/ext/asyncio/session.py:1016> cb=[shield.<locals>._inner_done_callback() at /Users/william/.pyenv/versions/3.11.5/lib/python3.11/asyncio/tasks.py:881]> got Future <Future pending cb=[Protocol._on_waiter_completed()]> attached to a different loop
Full stracktrace on thread. Should I open a github ticket?
w
c
c
  • 3
  • 7
  • 171
is it possible to set a context variable on the flow level? for context, i want to set a flow owner ...
l

Lana Dann

over 4 years ago
is it possible to set a context variable on the flow level? for context, i want to set a flow owner to the flow and then use that value in my slack state handler. but even when i set
with prefect.context(dict(flow_owner="test")):
before defining the flow, i still get an error
Traceback (most recent call last):
  File "/Users/lanadann/.pyenv/versions/data-prefect-3.9.7/lib/python3.9/site-packages/prefect/engine/runner.py", line 161, in handle_state_change
    new_state = self.call_runner_target_handlers(old_state, new_state)
  File "/Users/lanadann/.pyenv/versions/data-prefect-3.9.7/lib/python3.9/site-packages/prefect/engine/task_runner.py", line 113, in call_runner_target_handlers
    new_state = handler(self.task, old_state, new_state) or new_state
  File "/Users/lanadann/prefect/data_prefect/lib/notifiers.py", line 13, in post_to_slack_on_failure
    f"@{prefect.context.flow_owner} "
AttributeError: 'Context' object has no attribute 'flow_owner'
discourse 1
l
a
k
  • 3
  • 30
  • 171
<@ULVA73B9P>, how can I define a task with a specific timeout and retries?
p

Pascal Jahan Elahi (Pawsey)

over 1 year ago
@Marvin, how can I define a task with a specific timeout and retries?
p
m
  • 2
  • 11
  • 170
Previous464748Next

Prefect Community

Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.

Powered by