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

Fix ListMetadata #112

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

erikbosch
Copy link
Contributor

@erikbosch erikbosch commented Nov 29, 2024

This intends to make the implementation consistent with the documentation.

In short, Databroker does not know if A.B refer to a signal A.B or a branch A.B. We solve that by both looking for A.B.** and A.B.
That is OK as if there is a signal A.B there cannot be a branch A.B, even if it may require somewhat more comparisons, but you cannot do it in one comparision using glob.

Also our current glob cargo package does not seem to be maintained, we may consider migrating to something else.

How to test:

Run the three commands below on latest released version as well as with this PR


# This one previously failed as we did not add .**

docker run --network=host fullstorydev/grpcurl  -d '{ "root": "Vehicle.Cabin.Sunroof" }' -plaintext localhost:55555 kuksa.val.v2.VAL.ListMetadata

# This one worked before as we added .** if path did not contain dots

docker run --network=host fullstorydev/grpcurl  -d '{ "root": "Vehicle" }' -plaintext localhost:55555 kuksa.val.v2.VAL.ListMetadata

# This one worked before as it reference a signal

docker run --network=host fullstorydev/grpcurl  -d '{ "root": "Vehicle.Speed" }' -plaintext localhost:55555 kuksa.val.v2.VAL.ListMetadata

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 94.57364% with 7 lines in your changes missing coverage. Please review.

Project coverage is 59.79%. Comparing base (bfcb1e4) to head (972a30e).

Files with missing lines Patch % Lines
databroker/src/glob.rs 89.39% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
+ Coverage   59.33%   59.79%   +0.45%     
==========================================
  Files          33       33              
  Lines       16067    16161      +94     
==========================================
+ Hits         9534     9663     +129     
+ Misses       6533     6498      -35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This intends to make the implementation consistent with the documentation.

In short, Databroker does not know if A.B refer to a signal A.B or a branch A.B.
We solve that by both looking for A.B.** and A.B.
That is OK as if there is a signal A.B there cannot be a branch A.B,
even if it may require somewhat more comparisons, but you cannot do it in one comparision using glob.

Also our current glob cargo package does not seem to be maintained,
we may consider migrating to something else.
Otherwise quite useless if you request data with wildcard
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.

1 participant