Skip to content

Conversation

@jakebailey
Copy link
Member

@jakebailey jakebailey commented Aug 10, 2023

This changes the code to use the new pipelines run API rather than the old build queueing API. The new API gets rid of the wart that required parameters be stored as strings (my favorite comment, "This API is real bad") in favor of an object. The downside is that they haven't exposed this API directly in the Node client yet (microsoft/azure-devops-node-api#519), but it wasn't hard to figure out via watching the UI requests and reading the Go API client which does support this API.

This allows allow me to change the perf run tasks to specify the new pipeline and use new repo resources (which I've chosen over what typescript-error-deltas does via a param as it works better in the UI; we could change the error deltas pipelines at some point too).

From what I can tell, the new API should still work on the old builds; I tested a few by hand and they worked, but it's a little hard to tell for the old-style UI pipelines which don't exactly have a "real" parameters set. I'm going to try and double check for each of these, though.

This PR has changed since I sent it, but it effectively abstracts away the pipeline/build triggering sep a bit, leaving the original ones unchanged, and adds a new pipeline trigger for the new perf stuff, which will eventually just replace the old one.

@jakebailey
Copy link
Member Author

PR is not quite right; the old perf builds should be running in a specific pool so I have to figure out if the new API supports that. Maybe it doesn't matter and I can just stick my new perf change into this PR.

@jakebailey
Copy link
Member Author

Yeah, seems like you can't set the build queue in this new API. I guess I'll either have to revert this and make it able to use both APIs, or just bite the bullet and put my new change in here with the assumption that we'll never need to specify a queue again.

@jakebailey jakebailey marked this pull request as ready for review August 10, 2023 23:21
@jakebailey jakebailey changed the title Use new pipelines API instead of build API Refactor build queueing, add new perf pipeline under new name Aug 10, 2023
@sandersn
Copy link
Member

Is this ready to review now?

@jakebailey
Copy link
Member Author

Yes, after one change I just pushed.

@jakebailey
Copy link
Member Author

I'd recommend reading the diff without whitespace: https://github.com/microsoft/typescript-bot-test-triggerer/pull/29/files?w=1

@jakebailey jakebailey merged commit 6b95e7c into microsoft:master Aug 11, 2023
@jakebailey jakebailey deleted the new-build-api branch August 11, 2023 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants