Did a deployment link dissapear from prefect cloud...
# prefect-cloud
c
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
@Chandan Maruthi We have combined the flows and deployments page, please see details here: https://prefect-community.slack.com/archives/CKNSX5WG3/p1683231134376849
😯 1
c
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
The only change is that the deployments are now visible from the flows page
c
See they are not. Here is a screen capture
s
Do you have deployments associated with those flows?
c
Yeah, Here is Deployments page that is no longer linked
s
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
I have not yet runs these flows, and so this UI does not show them
s
Is there nothing associated with the
standardWebProcess
,
trainModel
, and
ingestStandardCSV
flows on the Flows page?
c
But to run the flows need to see the deployments
s
Can you send a screenshot of the flows I mentioned above on the flows page?
They should have deployments associated with them
c
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
Are you not able to click into the Deployment on the screen?
c
But the deployment information is required to run the flpw
s
What happens when you click on the toggle next to “1 Deployment”?
c
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
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
Here is what is do to build a deployment
Copy code
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
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
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
Copy code
{
      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
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
Serina thank you I appreciate all your support today
🙌 2
🙌 🎉 👍 🙏
s
Happy devving!
🙌 1
f
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
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
Thanks! I plusoned it
🙌 1