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

JSON API: add PruningTest and make it pass #17167

Conversation

raphael-speyer-da
Copy link
Collaborator

@raphael-speyer-da raphael-speyer-da commented Jul 24, 2023

If the ledger has been pruned more recently that the last cached copy, then attempting to fetch the changes since that last offset will fail, rendering the relevant template(s) unqueryable. This PR detects that condition, clears the cache for the relevant template and queries again, which will refresh the cache with a fresh copy of the ACS for that template, and serve the query from that.

I also made some usability tweaks around running canton-ee tests, to help improve the dev experience for failures I came across while trying to run them. Specifically

  • Use --config=canton-ee to opt into the tests which require canton-ee
  • When downloading that EE from artifactory, provide better diagnostics if the required auth isn't set up.

@raphael-speyer-da raphael-speyer-da force-pushed the json-api-lt-17-rls-on-pruning-error-clear-cache-and-retry branch 4 times, most recently from 23a15cb to 26f684e Compare July 25, 2023 10:00
@raphael-speyer-da raphael-speyer-da force-pushed the json-api-lt-17-rls-on-pruning-error-clear-cache-and-retry branch from 26f684e to 88d83c9 Compare July 25, 2023 10:32

Those tests are run on CI.

If you're using a local build of canton (setting `local` to `True` per above)
_and_ you are explicitly overwriting the `*_tag_filters` to run the Canton EE
_and_ you are explicitly using `--config=canton-ee` to run the Canton EE
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice !

canton_dep.bzl Outdated
@@ -4,5 +4,5 @@
canton = {
"sha": "fa0257b6b6d6673934db535216a861552ed57017481581b4f190742d13a5842e",
"url": "https://www.canton.io/releases/canton-open-source-2.7.0-snapshot.20230719.10832.0.v93eda8bc.tar.gz",
"local": True,
"local": False,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please do not change this one.
I know this break the local development. We will find a solution when @gary is back.

Copy link
Collaborator

Choose a reason for hiding this comment

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

fyi, this was change back to False in #17174

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.

2 participants