Open ericallam opened 11 months ago
/bounty $200
/attempt #388
with your implementation plan/claim #388
in the PR body to claim the bounty/livestream
once liveThank you for contributing to triggerdotdev/trigger.dev!
/attempt #388
/attempt #388
@fvckDesa is already attempting to complete #388 and claim the bounty. If you attempt to complete the same issue, there is a chance that @fvckDesa will complete the issue first, and be awarded the bounty. Try discussing with @fvckDesa and potentially collaborating on the same solution versus creating an alternate solution.
@ericallam you can already get runs for a job, and get info about a run using the SDK
@matt-aitken private data or just public?
BTW the reason I created this issue is because of this scenario:
https://github.com/triggerdotdev/trigger.dev/issues/386#issuecomment-1690604407
Hold off on working on this for now, I think there's a discussion that needs to be had first about if it makes sense to use the Project API Key's for these management API endpoints or if we should have another type of API key that works across projects & environments. A sort of "Personal Access Token" type API Key, similar to the Supabase Management API works
/attempt #388
@Chigala @fvckDesa don't work on this. We need to think more about how this works.
Yea this feature will require a new type of API Key called a Personal Access Token:
These API Keys have authorization the "Management APIs", some of which are mentioned above. The endpoints should be different from our current API endpoints (maybe something like /manage/api/v1/...
)
You should be able to create multiple personal access tokens, and we don't create one for you by default. The PAT should look like tr_pat_XXXXXXXXXXXXXX
.
PATs should also be revokable. They should be stored in a new table called PersonalAccessToken
and belong to a specific User. The PersonAccessToken table should have a lastAccessedAt column that should be updated anytime the PAT is used and that value should be displayed in the list of PATs
@ericallam using personal access tokens for the management APIs makes more sense. This is how the PAT table would be modelled right?
model PersonalAccessToken {
id String @id @default(cuid())
token String @unique
revoked Boolean @default(false)
revokedAt DateTime?
lastAccessedAt DateTime
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade)
}
When a PAT is revoked, should we just take this my approach of a soft delete or remove the token from the DB?
Yea I think you don't need the revoked
column, you can just use revokedAt
. Also lastAccessedAt
should be optional. everything else looks good
Ohk, Thanks. Are there any more changes on your end about this? If no, that means I can start working on it right?
@Chigala I would let @neo773 take this one for now, as he started on it last night
That's ohk
@fvckDesa: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏
@Chigala: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏
this seems easy why and august in the tech world is ages ago so how comes no one has finished it. or claimed the reward anyways is this still open ?
@dennismzia I had a PR for this but the trigger management have put it on hold for now.
I would really benefit from this functionality as right now our end users have no way of retrying a job run if it fails. Either a management API or even returning the run's payload info in getRun() or useEventRunDetails(), would enable users to retry failed runs. Is there any update on this?
@andrewlu0 we've recently released a new API for exposing run data to the public called Run Statuses:
https://trigger.dev/docs/documentation/guides/react-hooks-statuses
Would that help in your case?
@VirtualDharm: The Trigger.dev (YC W23) team prefers to assign a single contributor to the issue rather than let anyone attempt it right away. We recommend waiting for a confirmation from a member before getting started.
@ericallam Can I work on this?
@rishi-raj-jain They put it on hold since they needed a few prerequisite changes prior to merging my PR. Not sure what the status is now. You could use my closed PR as base if you'd wish https://github.com/triggerdotdev/trigger.dev/pull/406
@vinfinity7: The Trigger.dev (YC W23) team prefers to assign a single contributor to the issue rather than let anyone attempt it right away. We recommend waiting for a confirmation from a member before getting started.
/attempt #388
@xiaoqixing: The Trigger.dev (YC W23) team prefers to assign a single contributor to the issue rather than let anyone attempt it right away. We recommend waiting for a confirmation from a member before getting started.
/attempt #388
@madhukaraman: The Trigger.dev (YC W23) team prefers to assign a single contributor to the issue rather than let anyone attempt it right away. We recommend waiting for a confirmation from a member before getting started.
/attempt #388
@michaelajilore: The Trigger.dev (YC W23) team prefers to assign a single contributor to the issue rather than let anyone attempt it right away. We recommend waiting for a confirmation from a member before getting started.
Can I be assigned? @matt-aitken
/attempt #388
@Bhavyajain21: The Trigger.dev (YC W23) team prefers to assign a single contributor to the issue rather than let anyone attempt it right away. We recommend waiting for a confirmation from a member before getting started.
@ericallam is this issue still open can i work on it??
/attempt #388
@rituraj12797: The Trigger.dev (YC W23) team prefers to assign a single contributor to the issue rather than let anyone attempt it right away. We recommend waiting for a confirmation from a member before getting started.
This looks like an intriguing feature to build, and I'm eager to work on it, but I'd like to just clarify that the bounty is still open and that the scope/parameters of the bounty haven't changed (since it's been nine months).
/attempt 388
@RamitVishwakarma: The Trigger.dev (YC W23) team prefers to assign a single contributor to the issue rather than let anyone attempt it right away. We recommend waiting for a confirmation from a member before getting started.
We need to flesh out our API to allow you to manage jobs and runs:
These would ideally all be exposed via the
TriggerClient
class and would require the Server API Key to access.TRI-1135