-
Notifications
You must be signed in to change notification settings - Fork 205
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
Store access token in trigger dao #7890
Conversation
- non-authenticated with in-memory backend - non-authenticated with database backend - authenticated with in-memory backend - authenticated with database backend changelog_begin changelog_end
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.
Nice, thanks!
...c/main/resources/com/daml/lf/engine/trigger/db/migration/postgres/V2__Add_access_token.sha25
Outdated
Show resolved
Hide resolved
...src/main/resources/com/daml/lf/engine/trigger/db/migration/postgres/V2__Add_access_token.sql
Outdated
Show resolved
Hide resolved
""" | ||
insert.update.run.void | ||
} | ||
|
||
private def queryRunningTrigger(triggerInstance: UUID): ConnectionIO[Option[RunningTrigger]] = { | ||
val select: Fragment = sql""" | ||
select (trigger_instance, trigger_name, trigger_party) from running_triggers | ||
select trigger_instance, full_trigger_name, trigger_party, access_token from running_triggers |
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’m confused, how did this work before? The column name isn’t changed by this PR.
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.
It didn't work before, this code was untested so far. See #7750 (comment).
triggers/service/src/main/scala/com/digitalasset/daml/lf/engine/trigger/dao/DbTriggerDao.scala
Show resolved
Hide resolved
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Check the trigger dao migrations digest Following the example of the corresponding ledger on SQL tests. The digests had to be updated as both of them had gone out of sync. The init digest presumably due to the change in #7226 and the one for adding the access token during review of #7890. changelog_begin changelog_end * define abstract migrations test * Use abstract migrations test in trigger service tests * use abstract migrations test in ledger on SQL * Retain check for number of .sql resources * Factor out the hash-migrations script * Consistent shell settings Addressing review comment Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Check the trigger dao migrations digest Following the example of the corresponding ledger on SQL tests. The digests had to be updated as both of them had gone out of sync. The init digest presumably due to the change in #7226 and the one for adding the access token during review of #7890. changelog_begin changelog_end * define abstract migrations test * Use abstract migrations test in trigger service tests * use abstract migrations test in ledger on SQL * Retain check for number of .sql resources * Factor out the hash-migrations script * Consistent shell settings Addressing review comment Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
readRunningTriggers
using theGet
andPut
forParty
andIdentifier
Closes #7720 (refresh token is not implemented yet)
Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tagsNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.