Brian
Brian3w ago

Checking Endpoint Version

When a workflow is being shipped, I can see various Version numbers. Though they are not iterating when doing a new ship. Is this intended? I would like to setup a separate workflow with a cronjob that checks if the other endpoint has a new version so I can send some automated Update Notifications. Is this possible? This would be my solution for a hacky " Trigger" for a new shipment version. (Buildship really needs a shipment trigger 😢)
Solution:
For now, it's not available, we'll be having a git functionality in near future, where you'll be able to get different version.
Jump to solution
10 Replies
AI Support
AI Support3w ago
AI Support Bot Information
<@112676328783802368> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
AI Support
AI Support3w ago
AI Response
It's unfortunate that Buildship doesn't currently have a shipment trigger. However, there is indeed a workaround using a Scheduled Cron Trigger along with logic nodes like Branch and Switch nodes to set up a workflow that checks for new versions and sends update notifications. Outline of the Solution 1. Scheduled Cron Trigger: - Use this node to schedule the workflow to run at regular intervals (e.g., every hour or day). 2. API Request to Fetch Shipments: - Using an API request node, fetch the details of the currently shipped version. 3. Branch Node: - Compare the fetched version with a previously stored version. 4. Switch Node: - Based on the comparison, decide whether to send an update notification or not. Steps to Build the Workflow 1. Set up Scheduled Cron Trigger: - Schedule this at a suitable interval (e.g., every hour). For more information on setting up the Scheduled Cron Trigger, please check the BuildShip documentation here. 2. Fetch Current Version: - Use an API Request node to call the endpoint of your workflow to check the current version. Store this value. 3. Stored Version: - Fetch the last stored version from a database or a file storage. 4. Comparison (Branch Node): - Use a Branch node to compare the current fetched version with the stored version. For more information on using the Branch Node, refer to the documentation here. 5. Action based on Comparison (Switch Node): - If the versions differ, send an update notification and store the new version. - If the versions are the same, do nothing. Details on using Switch nodes can be found here. Additional Information Given that Buildship does not support shipment triggers directly, this method will provide a workaround to monitor version changes and send notifications accordingly. If you have any other questions or need further assistance, please let me know, or you can reach out to BuildShip support via the in-app support.
BuildShip AI Support
Brian
Brian2w ago
How would I get the Workflow API Version? What does the GET request look like?
Gaurav Chadha
Gaurav Chadha2w ago
Hey @Brian, the deployment ids are updating correctly, it could be that your logs didn't updated? Or browser is caching, can you try in incognito. Also, for this I would like to setup a separate workflow with a cronjob that checks if the other endpoint has a new version so I can send some automated Update Notifications. Is this possible? - the cron logic suggested by the AI bot should be ideal and work. Could you please elaborate by what you meant by shippment trigger, each trigger does gets shipped (deployment) and creates a prod deployment.
No description
Brian
Brian2w ago
With "shipment trigger" I mean a trigger that would activate if a new shipment was successfully launched, so we could use that to trigger other workflows (so I don't need to check with a cron job for a new workflow version). So is it now possible to get the endpoint Version with an api request somewhere somehow?
Gaurav Chadha
Gaurav Chadha2w ago
To call other workflows you can use BuildShip trigger which gives you workflow id option https://docs.buildship.com/trigger-nodes/buildship-trigger this should work for your usecase.
BuildShip Trigger – BuildShip
A unified resource to start building your backend with low-code. Dive into triggers, nodes, and step-by-step guidance to jumpstart your workflow creation.
Brian
Brian2w ago
No it doesn't, because when I click on "Ship" it should trigger a workflow So is there an easy way to get the workflow's version? I do not want to crawl around the webpage and filter the button and trigger some clicks to download the file "manually".
Gaurav Chadha
Gaurav Chadha2w ago
you can get the workflow id, not the workflow version? workflow version won't seems to be of use here.
Brian
Brian2w ago
But the goal is to check for a new Version of the workflow.
Solution
Gaurav Chadha
Gaurav Chadha2w ago
For now, it's not available, we'll be having a git functionality in near future, where you'll be able to get different version.