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

[Sessions] chore: Use depinject for sessions mgr construction #175

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

red-0ne
Copy link
Contributor

@red-0ne red-0ne commented Nov 9, 2023

Summary

Human Summary

Use depinject to construct relayerSessionsManager.

AI Summary

Summary generated by Reviewpad on 09 Nov 23 23:19 UTC

This pull request introduces several changes.

The first patch (1/3) adds a new file options.go to the pkg/relayer/session package, which contains a new function WithStoresDirectory. This function sets the path on disk where KVStore data files are created.

The second patch (2/3) adds a small improvement to the WithStoresDirectory function. It changes the error message when the session tree store path already exists.

The third patch (3/3) improves the readability of the error messages in the errors.go file. It updates the error codespace and the error messages to make them more descriptive. It also updates the error message when the session tree store path already exists.

Overall, these changes aim to enhance the management of sessions and their corresponding data files in the relayer package.

Type of change

Select one or more:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Testing

  • Run all unit tests: make go_develop_and_test
  • Verify Localnet manually: See the instructions [here](TODO: add link to instructions)

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have performed a self-review of my own code
  • I have commented my code, updated documentation and left TODOs throughout the codebase

@red-0ne red-0ne added session Changes related to Session management off-chain Off-chain business logic labels Nov 9, 2023
@red-0ne red-0ne added this to the Shannon TestNet milestone Nov 9, 2023
@red-0ne red-0ne self-assigned this Nov 9, 2023
pkg/relayer/session/errors.go Outdated Show resolved Hide resolved
pkg/relayer/session/session.go Show resolved Hide resolved
Copy link
Contributor

@bryanchriswhite bryanchriswhite left a comment

Choose a reason for hiding this comment

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

Left a couple of comments but otherwise G2G! 🚀

Preemptively approving.

@red-0ne red-0ne merged commit 28f8db3 into main Nov 10, 2023
7 checks passed
bryanchriswhite added a commit that referenced this pull request Nov 10, 2023
* pokt/main:
  [Proxy] chore: Use depinject for relayerProxy (#173)
  [Sessions] chore: Use depinject for sessions mgr construction (#175)
okdas pushed a commit that referenced this pull request Nov 14, 2024
* chore: Use depinject for sessions mgr construction

* chore: Add WithStoresDirectory function to set the path
for KVStore data files.

* chore: improve errors readability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
off-chain Off-chain business logic session Changes related to Session management
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants