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: update scheduled actions [SPA-284] #882
Conversation
datetime: new Date().toISOString(), | ||
}, | ||
}), | ||
testSpace.createScheduledAction({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with these
expect(fetchedAction.entity).to.eql(createdAction.entity) | ||
|
||
// cleanup | ||
await fetchedAction.delete() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to put clean up in a finally {}
block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess in case of an error, scheduled action wouldn't be created, so there would be nothing to cleanup, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends on where it failed (could also fail on fetch)
7dfc5b2
to
53ebd3e
Compare
// Deletes a Release and all its Release Actions | ||
await scheduledAction.delete() | ||
|
||
const response = await testSpace.getScheduledActions({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if wouldn't be better to try to find the specific scheduled action.
What I am thinking is that if for some reason another test is running this might become flakey since you querying for all scheduled actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we actually don't have a getScheduledAction
added to the SDK? 🤦🏽
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I noticed it as well and I wanted to add it, but then I heard "please not in the same PR", so I cut the ticket instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍🏽
Minor nitpicks:
- Add JSDoc explaining how the use the
scheduledAction.update()
and that you have to update the object itself before calling it - Add a test covering/using the
update
fromentities/scheduled-action.ts
…lease implementation
92bdcd4
to
41f91ac
Compare
b9e4e3c
to
0489ad0
Compare
const params = getParams(this) | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const { sys, ...payload } = this.toPlainObject() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defining it as _sys
wouldn't make the eslint-disable
disappear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
🎉 This PR is included in version 7.28.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Adds support for
Description
Motivation and Context
Checklist (check all before merging)
When adding a new method:
./lib/export-types.ts