Skip to content
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

feat: introduce new API for batch task requests #6915

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

Alphare
Copy link
Contributor

@Alphare Alphare commented Mar 19, 2024

This is done according to RFC 189¹. In few words, the motivation is to drastically reduce the number of index API calls done by decision tasks, since they sometimes need the task ids for hundreds of tasks.

[1] taskcluster/taskcluster-rfcs#189

@Alphare Alphare requested a review from a team as a code owner March 19, 2024 10:59
@Alphare Alphare requested review from lotas, petemoore and matt-boris and removed request for a team March 19, 2024 10:59
@Alphare
Copy link
Contributor Author

Alphare commented Mar 19, 2024

I'm submitting this to get some feedback to make sure I'm headed in the right direction. I have a couple of questions inside (in XXX) about auth and validation, I'd be glad to get some pointers there. :)

@Alphare Alphare marked this pull request as draft March 19, 2024 11:05
services/index/src/api.js Outdated Show resolved Hide resolved
services/index/src/api.js Outdated Show resolved Hide resolved
Copy link
Contributor Author

@Alphare Alphare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the commit following your advice. I think this is starting to look good. Should I get it out of draft?

services/index/test/api_test.js Show resolved Hide resolved
services/index/src/api.js Outdated Show resolved Hide resolved
services/index/src/helpers.js Show resolved Hide resolved
@Alphare Alphare marked this pull request as ready for review March 19, 2024 14:31
@Alphare Alphare mentioned this pull request Mar 21, 2024
assert.equal(rows.length, expectedIndexes.length);
assert.deepStrictEqual(rows, expectedTasks);

// Order of the input doesn't matter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Contributor

@lotas lotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This looks great, thanks for the contirbution

This is done according to RFC 189¹. In few words, the motivation is
to drastically reduce the number of index API calls done by decision
tasks, since they sometimes need the task ids for hundreds of tasks.

[1] taskcluster/taskcluster-rfcs#189
@lotas lotas merged commit 52cae7c into taskcluster:main Mar 22, 2024
73 checks passed
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.

None yet

2 participants