We have some repos linked to GitHub and some require using the REST api to post our build events. The GitHub linked show a Deployment Time metric, but the custom one does not. I assume it's some bug in the way I'm posting my deployment events via the REST api. I post a PENDING event with an updateSequenceNumber, then at the end I post a SUCCESSFUL event with a higher updateSequenceNumber and a a later lastUpdated date. deploymentProperties.sequenceNumber stays the same both posts.
When looking at the timeline in Compass, I first see the pending event in the timeline, then when done, it's turned into a complete checkmark. So it seems the 2 events are being associated with each other correctly? But the Deployment time metrics show now events as you can see in the screen shot. Appreciate the help!!
Hi, @Andrew Harmon !
Based on your description, it sounds like you're using the right environments and sequence numbers, as you can see the deployment frequency being calculated.
Are you providing both `deploymentProperties.startedAt` and `deploymentProperties.completedAt` in your successful deployment events? You'd need to pass both so that the deployment time would be calculated.
so it turns out it was hooked to a GitHub repo, so I think it was somehow pulling that stat. but bc we don't do deploys from that repo (we use a centralized repo from which I make my rest calls), that was blank. I've since detached the GitHub repo.
we have many apps made up from multiple repos, like one for app code and one for infrastructure. so a "deploy" could start from either of those. a central repo managing configuration for the app/env deploys the code. This doesn't seem to play nicely with compass, I created 3 components, 2 attached to repos, and a 3rd with dependencies on the first 2. when the central repo deploys either of the sub components, it uses the REST api to log deployments to the parent component. I'm not sure if this is the best practice, but I don't see any other way to set it up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i'm a bit confused on the deploymentProperties.startedAt and deploymentProperties.completedAt on success. I'm not passing those at all. I don't see them in the rest api spec for deployment events here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oh wow, but it is in the downloadable OpenAPI docs. I'll try this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Andrew Harmon ,
I believe the Deployment Time metric is only automatically calculated for deployment events that meet specific criteria. For GitHub-linked repositories, Compass collects deployment events via the GitHub integration, specifically from GitHub Actions deployments that use a GitHub Environment name mapped to "Production" or "Staging" > here's the integration article
Now, this might provide some additional insights: Deployments not showing from Rest API
Apart from ensuring that your deployment events and environment names are structured properly, and keeping in mind that deployment activity and metrics only appear if there has been at least one deployment in a production or staging environment within the last 28 days, not sure what else you could check 🤔
You could try checking if there's an open feature request or reported bug in JAC. (I did a quick sweep, but couldn't find anything related)
Atlassian folks might chime in on this and provide some better assistance.
Cheers,
Tobi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.