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

[TRI-1923] React hooks should return basic metadata about the Job #884

Open
matt-aitken opened this issue Feb 6, 2024 · 0 comments · May be fixed by #891
Open

[TRI-1923] React hooks should return basic metadata about the Job #884

matt-aitken opened this issue Feb 6, 2024 · 0 comments · May be fixed by #891

Comments

@matt-aitken
Copy link
Member

matt-aitken commented Feb 6, 2024

If you want to build a UI that shows runs across multiple jobs it's difficult because the hooks return no info about the job.

I suggest we return the job "id" from them (which is actually the slug in the database).

{
  job {
   //note that this is what we call the "slug" in the database
    id: "......",
  },
  //rest of the payload
}

This would creating v3 versions of the following API endpoints that return the job.id

  1. https://github.com/triggerdotdev/trigger.dev/blob/main/apps/webapp/app/routes/api.v2.runs.%24runId.ts
  2. https://github.com/triggerdotdev/trigger.dev/blob/main/apps/webapp/app/routes/api.v2.runs.%24runId.statuses.ts
  3. https://github.com/triggerdotdev/trigger.dev/blob/main/apps/webapp/app/routes/api.v2.events.%24eventId.ts

Core schema updates (add job.id)

The SDK API client URLs need updating to be v3 instead of v2

The React package URLs need updating to be v3 instead of v2:

TRI-1923

@matt-aitken matt-aitken changed the title React hooks should return basic metadata about the Job [TRI-1923] React hooks should return basic metadata about the Job Feb 6, 2024
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 a pull request may close this issue.

1 participant