-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added to queue event: null buildId #159
Comments
I don't believe an ID has been assigned at this point. My understanding is that the ID is assigned at the started event. |
🤔 If you use API to add a new build to queue, teamcity returns build ID and other additional information. And it doesn’t matter has it been started right now or just was added to a queue. Here is my simple part of PowerShell code which I use to start builds and get their IDs:
$response.id has an ID of every build |
There is an item id. Is that id the same as the id of the build when it's running/finished? |
Sorry. Ignore that. That is part of your payload, and I misread it on my phone. |
ok, I found what they are doing. They're getting the promotion and mapping it. I'll need to have a better look when I get to a computer. Thanks for raising it. It seems like we can make this better! |
This ticket implies that promotionId and buildId are the same for TeamCity 9.0 and above. I'll do some testing to confirm. |
I've committed a change that copies the promotionId into the buildId field in the Queued webhook events (queue and de-queue). |
I will take a look on it on Monday. Thank you. |
Cool. If I get a chance I'll do some more testing too. |
I have a webservice that receives a LegacyJson webhook request for every build event in my development environment. I can confirm that for every I didn't have any previous |
I'd appreciate it if you could keep an eye on the buildId, and let me know if they ever don't match for the other events in the build. However from my little bit of testing, and that comment in the youtrack ticket, I think it should be fine. |
No problem! I guess everything will be fine. I've tested your fix on a newly installed teamcity and it works. Just one case I want to show you. The payload looks like this when there are no agents to start. But I suppose that is fine. You can't definitely know buildId.
None the less I'll get you to know If something goes wrong. |
Thanks for the update. I didn't really think about it, but I guess it makes sense that the id is allocated when it starts. Otherwise there would be buildIds that are never used when multiple queued events are grouped into a single build. I'll merge this branch into master and release a new alpha in the next few weeks. |
@netwolfuk do you have plans to release v1.2? |
Hi @nrukavkov. Yes. A new alpha will be released this weekend. Alpha 7 adds project parameter editing in the UI. Alpha 8 is filter editing in the UI. I suspect the final release is still a few months away. But the alphas are very stable. |
Sorry for the delay. We found bug #167 just before I wanted to release, and I thought it was going to affect all users. Alpha 7 will be released this weekend. |
Hello @netwolfuk 😋
Current Behavior
Event 'added to queue' generates webhook without buildid. We were expecting to be able to change a tag on a build. But it is not possible, because webhook's payload has a null value in buildId. Is it possible to have some trick and pass a build value?
Your Environment
The text was updated successfully, but these errors were encountered: