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

Add option to control state expiration #101

Open
Tunduk opened this issue Nov 23, 2023 · 1 comment
Open

Add option to control state expiration #101

Tunduk opened this issue Nov 23, 2023 · 1 comment
Labels
blocked Blocked by external dependency enhancement New feature or request

Comments

@Tunduk
Copy link

Tunduk commented Nov 23, 2023

Proposal

In my case of usage, 60 min is too long. We run wiremock in k8s with pretty narrow memory limits and we have memory leaks. I fixed my problem with deleteState but it would be great to have the ability to control state expiration.
I think 2 kinds of settings are needed:

  1. Global setting (something like --state-expiration for run args)
  2. By context name. Just a new property for the recordState action.
    Both kinds of settings should use seconds as an input value

Of course, I would like to help with it. Let me know if I can open a PR

References

No response

@Tunduk Tunduk added the enhancement New feature or request label Nov 23, 2023
@dirkbolte
Copy link
Collaborator

That's a good idea and any contribution is highly welcome.

WRT implementation: the extension has no internal knowledge about the characteristics of the store, and it should stay that way in order to make it replaceable. Thus having a context-specific expiration might be difficult - at least on stub-configuration level.
For the global configuration, I'm looking for a way to make this fit nicely into the architecture. Alternatively, as backup: with the latest update you can delete multiple contexts. So creating an artificial endpoint to remove all contexts might be a mitigation as well:

"serveEventListeners": [
    {
      "name": "deleteState",
      "parameters": {
        "contextsMatching": ".*"
      }
    }
  ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by external dependency enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants