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

Contributing valkeyJSON module #1

Merged
merged 9 commits into from
Nov 29, 2024
Merged

Conversation

roshkhatri
Copy link
Member

This PR adds the implementation of valkeyJSON module based on the specifications detailed in the accepted RFC document: ValkeyJSON Specification.

The implementation does not include JSON.MSET implementation but I am working on it as we review this. I am hoping we could add the implementation post merging this PR.

@valkey-io/core-team

Signed-off-by: Roshan Khatri <[email protected]>
Signed-off-by: Roshan Khatri <[email protected]>
Signed-off-by: Roshan Khatri <[email protected]>
src/json/json_api.h Outdated Show resolved Hide resolved
@hwware
Copy link
Member

hwware commented Nov 26, 2024

Sorry,what's the blocker for JSON.MSET implementation? ^_^?

@roshkhatri
Copy link
Member Author

Sorry,what's the blocker for JSON.MSET implementation? ^_^?

There is no blocker. its WIP. That can be added in a separate PR.

Copy link

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

There is no way that I can review all this. 27K in one commit. :D

There will need to be maintainer team for each module that can review each other's PRs. So, at least two maintainers would be useful. Is there anyone besides you @roshkhatri?

I'd say let's merge it! Later, we can talk about beta releases and stable releases. The TSC can oversee your release plans and the work on a high level, but I don't see that TSC members have enough time to be deeply involved in these modules.

CMakeLists.txt Show resolved Hide resolved
@roshkhatri
Copy link
Member Author

roshkhatri commented Nov 26, 2024

There will need to be maintainer team for each module that can review each other's PRs. So, at least two maintainers would be useful. Is there anyone besides you @roshkhatri?

Yes, @joehu21 will be the maintainer besides me.

I'd say let's merge it! Later, we can talk about beta releases and stable releases. The TSC can oversee your release plans and the work on a high level, but I don't see that TSC members have enough time to be deeply involved in these modules.

Yes, once this is merged we can open issues and discuss/work on them.

@hwware
Copy link
Member

hwware commented Nov 26, 2024

Mostly it looks like fine, agree to merge it. Great work.

@roshkhatri roshkhatri requested a review from joehu21 November 26, 2024 19:25
Copy link
Collaborator

@joehu21 joehu21 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Roshan Khatri <[email protected]>
Copy link
Member

@madolson madolson left a comment

Choose a reason for hiding this comment

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

Just evaluated the RFC against the implementation. There seems to be some discrepancies, so would like to start conversations about why.

src/json/json.cc Show resolved Hide resolved
src/json/stats.h Show resolved Hide resolved
Copy link
Member

@madolson madolson left a comment

Choose a reason for hiding this comment

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

I am mostly trusting the code, can we setup github workflows to make sure this code all builds and what not?

src/json/json.cc Show resolved Hide resolved
src/json/json.cc Show resolved Hide resolved
src/json/json.cc Outdated Show resolved Hide resolved
src/json/json.cc Show resolved Hide resolved
src/json/json.cc Show resolved Hide resolved
src/json/json.cc Outdated Show resolved Hide resolved
@madolson
Copy link
Member

Ideally let's make issues for the comments here. The only thing I think we should fix before merging is getting the CI working.

roshkhatri and others added 3 commits November 26, 2024 20:46
Signed-off-by: Roshan Khatri <[email protected]>
Signed-off-by: Roshan Khatri <[email protected]>
@roshkhatri
Copy link
Member Author

I have added the CI workflow to run against valkey unstable and 8.0.0 for now.

Screenshot 2024-11-26 at 12 57 52 PM

Copy link
Member

@PingXie PingXie left a comment

Choose a reason for hiding this comment

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

This does look overwhelming and I only reviewed haphazardly. I agree we should just merge this PR and polish it incrementally, including adding more test coverage.

Thanks @roshkhatri and @joehu21!

.github/workflows/ci.yml Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
CMakeLists.txt Outdated
elseif("${ARCHITECTURE}" STREQUAL "aarch64")
message("Building JSON for aarch64")
else()
message(FATAL_ERROR "Unsupported architecture. JSON is only supported on x86_64 and aarch64.")
Copy link
Member

Choose a reason for hiding this comment

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

print out the architecture?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, printing out ${ARCHITECTURE} will be helpful.

Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like this is all about reusing the tests at https://github.com/valkey-io/valkey-bloom/tree/unstable/tests? or there is more?

Yes, it's for reusing the pytest infrastructure in valkey-bloom.

Copy link
Member

Choose a reason for hiding this comment

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

hmm this dependency is a bit odd - does it make sense to pull the pytest infra into the Valkey repo instead? We are discussing migrating to python based integration test infra for Valkey too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I would suggest we should pull it out in the valkey repo instead. However, we can change the line later when we have it separately.

Copy link
Member

Choose a reason for hiding this comment

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

I was going to suggest we write an RFC or something similar for the python testing framework as well before we get too far along building it organically.

Choose a reason for hiding this comment

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

Why not move the testing framework to it's own repo to start with? It only needs to be pulled in for running the tests, not when just building the module.

I'd rather see people spend time on a README for the test framework than on an RFC. Or we can do both in parallel...?

Copy link
Member

Choose a reason for hiding this comment

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

I'd rather see people spend time on a README for the test framework than on an RFC. Or we can do both in parallel...?

I just want us to have some long term plan for testing and not just build it up organically. The reason is that Amazon internally has a similar testing framework that is extremely complex because nobody really maintains it and just bolt on random features. There are many cases where it's possible to do the same way 2 or 3 different ways. I think the same is true of our TCL framework, just to a smaller scale.

So whether it be an RFC or just some direction in a new repo, I don't care which.

.github/workflows/ci.yml Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
build.sh Show resolved Hide resolved
src/json/json.cc Show resolved Hide resolved
src/json/json.cc Show resolved Hide resolved
@madolson
Copy link
Member

Before we merge, please just make sure everything has issues so we can track them.

Copy link
Member

@enjoy-binbin enjoy-binbin left a comment

Choose a reason for hiding this comment

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

did not review, but it is indeed a good work, thanks.

Signed-off-by: Roshan Khatri <[email protected]>
@roshkhatri
Copy link
Member Author

I have created relevant issues for the comments and resolved those conversations to track them better. I have also addressed some feedback for minor changes.

Let me know if any more issues are required to be opens before we merge this PR. Happy Thanksgiving Everyone!!

Signed-off-by: Roshan Khatri <[email protected]>
@hwware
Copy link
Member

hwware commented Nov 28, 2024

I have created relevant issues for the comments and resolved those conversations to track them better. I have also addressed some feedback for minor changes.

Let me know if any more issues are required to be opens before we merge this PR. Happy Thanksgiving Everyone!!

Happy Black Friday !

@madolson
Copy link
Member

We have 6/6 TSC actually approved, so going ahead and merging it.

@madolson madolson merged commit 926b6fd into valkey-io:unstable Nov 29, 2024
1 check passed
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.

8 participants