-
Notifications
You must be signed in to change notification settings - Fork 88
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
Put rvps
dependencies behind rvps-builtin
feature flag
#550
base: main
Are you sure you want to change the base?
Put rvps
dependencies behind rvps-builtin
feature flag
#550
Conversation
Signed-off-by: Ubuntu <azureuser@tdx-base-test.3z0tm1yprcsefaq3x0wq2wcmyg.cx.internal.cloudapp.net>
b4ab0fe
to
3d7465b
Compare
Signed-off-by: Ubuntu <azureuser@tdx-base-test.3z0tm1yprcsefaq3x0wq2wcmyg.cx.internal.cloudapp.net>
#[cfg(not(feature = "rvps-builtin"))] | ||
{ | ||
return "LocalFs".into() | ||
} |
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.
unclear what the correct thing to do is here
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.
hmm I think the best solution here would be to get rid of these default functions entirely and change the config struct to have Optional fields. Then we can use unwrap_or
to swap in the default values as needed (i.e. inside of the RVPS module). That's slightly more work but I think it will untangle the dependencies.
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.
The configuration part about RVPS seem not good here. If remote_addr
is set, the store_type
is actually not useful. It might be better to not have useless fields that can be set. Let me make a fix to cover this. I made a PR #553
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.
I would have settled for a simpler fix but #553 seems good at first glance.
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.
Good spotting. The current implementation isn't quite right.
#[cfg(not(feature = "rvps-builtin"))] | ||
{ | ||
return "LocalFs".into() | ||
} |
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.
hmm I think the best solution here would be to get rid of these default functions entirely and change the config struct to have Optional fields. Then we can use unwrap_or
to swap in the default values as needed (i.e. inside of the RVPS module). That's slightly more work but I think it will untangle the dependencies.
Thanks @cdrappi for raising this up. The current RVSP config is not implemented well as it does not have an explicit field to specify whether a local one or a remote one to use. Probably we need to tidy things up. |
First of all thank you for building and maintaining such a wonderful suite of libraries! CoCo has been immensely valuable for our team and we appreciate all of the work that the community has put into these projects
Problem
Currently if you run build without the
rvps-builtin
feature, it fails:cargo build --no-default-features --features restful-bin,rvps-grpc
This is because the
reference-value-provider-service
dependency is not included under this feature set (requiresrvps-builtin
), yet it is used outside of that flagProposed solution
This change tucks usage of
rvps
behind that flag, so the above built command will complete successfully