https://prefect.io logo
Title
c

Chandan Maruthi

05/06/2023, 5:47 PM
Did a deployment link dissapear from prefect cloud?
1
The page exists but is not shown on the left bar. This is very annoying.
To make API calls to submit a job we need to see the deployments. Unless there is another way to submit jobs
s

Serina

05/06/2023, 6:22 PM
@Chandan Maruthi We have combined the flows and deployments page, please see details here: https://prefect-community.slack.com/archives/CKNSX5WG3/p1683231134376849
😯 1
c

Chandan Maruthi

05/06/2023, 7:35 PM
Thank you ill take a look
👍 1
Thanks for sharing I read this in detail. See It does not makese sense to me . May be I do not understand this well. I need to define deployments and test them out . Then I need to set my application so that my React/NextJS app can trigger a flowrun via the REST API using the create flow run endpoint like this “https://api.prefect.cloud/api/accounts/${process.env.PREFECT_ACCOUNT_ID}/workspaces/${PREFECT_WORKSPACE_ID}/deployments/${os.env.PREFECT_TRAINING_DEPLOYMENT_ID}/create_flow_run”;
What does it mean when you say flows and deployments screen are merged. Are deployments going away? else where do I see deployments. If deployments are not to be refered what is the alternative to the above create flow run end point
s

Serina

05/06/2023, 8:09 PM
The only change is that the deployments are now visible from the flows page
c

Chandan Maruthi

05/06/2023, 8:09 PM
See they are not. Here is a screen capture
s

Serina

05/06/2023, 8:10 PM
Do you have deployments associated with those flows?
c

Chandan Maruthi

05/06/2023, 8:11 PM
Yeah, Here is Deployments page that is no longer linked
s

Serina

05/06/2023, 8:11 PM
I can see at the top of the page that it says “12 Flows with 6 Deployments”, so perhaps scrolling down to the Flows below will show the Deployments associated with them
c

Chandan Maruthi

05/06/2023, 8:12 PM
I have not yet runs these flows, and so this UI does not show them
s

Serina

05/06/2023, 8:12 PM
Is there nothing associated with the
standardWebProcess
,
trainModel
, and
ingestStandardCSV
flows on the Flows page?
c

Chandan Maruthi

05/06/2023, 8:12 PM
But to run the flows need to see the deployments
s

Serina

05/06/2023, 8:12 PM
Can you send a screenshot of the flows I mentioned above on the flows page?
They should have deployments associated with them
c

Chandan Maruthi

05/06/2023, 8:13 PM
Not those flows but these have been run before
I guess the scenario missing is. • User creates a flow • Defines a deployment • Has not yet run the flow • So there is no way to see it in this screen
s

Serina

05/06/2023, 8:14 PM
Are you not able to click into the Deployment on the screen?
c

Chandan Maruthi

05/06/2023, 8:14 PM
But the deployment information is required to run the flpw
s

Serina

05/06/2023, 8:14 PM
What happens when you click on the toggle next to “1 Deployment”?
c

Chandan Maruthi

05/06/2023, 8:15 PM
image.png
This approach works when the flow has been run at least once before. But when a new deployment is created for a flow that has not yet run, thats where this gets confusing.
s

Serina

05/06/2023, 8:20 PM
Hm, I wasn’t able to re-create your issue. I deployed a flow that I have never run and I can see both the flow and deployment just fine from the flows page
c

Chandan Maruthi

05/06/2023, 8:24 PM
Here is what is do to build a deployment
prefect deployment build ./ingestStandardWebsite.py:ingestStandardWebsite \
-n twigdocker-ingestStandardWebsite \
-ib $PREFECT_IB_NAME \
-q $PREFECT_QUEUE_NAME \
-o ingestStandardWebsite-deployment-$PREFECT_ENV_TYPE.yaml \
--skip-upload
And here is what i do to apply it prefect deployment apply
ingestStandardWebsite-deployment-$PREFECT_ENV_TYPE.yaml
s

Serina

05/06/2023, 8:27 PM
I see you have one deployment associated with your
ingestStandardWebsite
flow. So it is not called
twigdocker-ingestStandardWebsite
?
(meaning in the UI, the deployment listed under the
ingestStandardWebsite
flow)
c

Chandan Maruthi

05/06/2023, 8:32 PM
It is, I see what I am doing wrong, My name is not parameterized, So I am overwriting deployments for dev/staging/prod
Question on best practive, I need to run flows in dev/staging/prod configs the only thing different about each is the docker infra block as it has env variables unique to each env. In this case do I create a single deployment per flow for all 3 env dev/stag/prod and provide the env specific respective Infra Blocks when running in the REST Payload?
the reason I ask this question is the deployment refers to a Infra block and also this endpoint “https://api.prefect.cloud/api/accounts/${process.env.PREFECT_ACCOUNT_ID}/workspaces/${PREFECT_WORKSPACE_ID}/deployments/${os.env.PREFECT_TRAINING_DEPLOYMENT_ID}/create_flow_run” accepts an infra block
{
      name: "my-flow-run",
      idempotency_key: key,
      infrastructure_document_id: process.env.PREFECT_INFRA_BLOCK_ID,
      state: {
        type: "SCHEDULED",
      },
      parameters: {
        parameters: selectedAIAgent,
      },
    };
which one is actually used?
s

Serina

05/06/2023, 8:42 PM
I haven’t tested it out but my assumption would be it would read from the deployment by default. And I would create an env-specific deployment, yes, but it’s definitely up to personal preference
I’m going to mark this thread as resolved! 🙂
c

Chandan Maruthi

05/06/2023, 8:42 PM
Serina thank you I appreciate all your support today
🙌 2
🙌 🎉 👍 🙏
s

Serina

05/06/2023, 8:43 PM
Happy devving!
🙌 1
f

Frits De Roos

05/09/2023, 1:43 PM
Hi there, interesting to read this. What was the motivation behind this merge? To me it's quite difficult to find the right deployment right now, as I have way more flows defined than deployments. So I have to scroll and click a lot to find the associated deployment that I need
s

Serina

05/09/2023, 7:29 PM
Improvement to UI navigation 🙂 There’s an issue for what you’re describing here; feel free to expand upon or +1 it https://github.com/PrefectHQ/prefect/issues/9468
f

Frits De Roos

05/10/2023, 8:21 AM
Thanks! I plusoned it
🙌 1