-
Notifications
You must be signed in to change notification settings - Fork 68
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
Expose invocation metering in the SDK. #1411
Conversation
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.
💯 This is so needed and awesome to see getting added to the SDK.
I have some thoughts just about the API and how we integrate it. Lmk what you think, and we can DM / chat too to do a little more realtime.
c249cb6
to
4939279
Compare
4939279
to
b454ab5
Compare
Co-authored-by: Jay Geng <[email protected]>
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.
👏🏻 Love the level of docs we're adding around these functions.
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.
See the suggestion inline about how to deal with set_config.
Co-authored-by: Leigh McCulloch <[email protected]>
That makes sense and I've tried to sketch this. But this doesn't pass the semver check, as we're adding a new pub field to a struct, so initialization will be broken. So I'm even more in favor of enabling this by default. |
Darn, I forgot about this when I created this struct. In v23 we should change the struct into private fields with functions to modify the state. I created an issue to do that here:
👍🏻. We can plan to retroactively introduce a EnvTestConfig flag in v23 too if needed. If folks need to turn it off before then, we can introduce an env var too. I had considered adding an env var for the other env test config item too. |
ab13d81
to
9c4658d
Compare
Based on the previous discussion I've enabled this by default, PTAL. One caveat that I forgot about is that besides budget we also reset all the events between the calls. This makes sense in general and may actually highlight issues people might have had (if an event was expected to happen after a wrong contract call). |
I think it's reasonable to treat that like a bug fix. The way it works today is too unspecific as to when events occur. |
…ban-sdk into resource_metering
Co-authored-by: Leigh McCulloch <[email protected]>
What
Expose invocation metering in the SDK.
Why
Improving testing UX.
#1319
Known limitations
N/A