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

[gRPC] remote: add ability to specify array attributes in exported resources #1442

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flxzt
Copy link
Contributor

@flxzt flxzt commented Jul 15, 2024

I was trying out the gRPC branch and noticed that certain attributes added to resources in my fork break when they are exported to the coordinator. The gRPC branch currently does not have support for array attributes.

This PR adds support for exactly that - (nested) array field attributes, by adding MapValueArray that contains repeated MapValue's to the .proto definition file and the conversion between config dicts <-> grpc messages.

I know the gRPC branch is still very much in movement, but I hope the PR will be considered. It improves the expandability of the framework in forks and closes the feature gap to the old crossbar implementation

@jluebbe
Copy link
Member

jluebbe commented Jul 15, 2024

Can you give more details on which attributes use arrays in your fork? For now, we've intentionally avoided nesting of MapValues to keep the complexity low.

Note that I've seen that the two conversion functions already take significant amounts of CPU time on slower exporters with many resources (with some ad-hoc profiling). So we should make sure that they don't become significantly slower.

@flxzt
Copy link
Contributor Author

flxzt commented Jul 15, 2024

sure: I have a branch that implements ssh jumps, these jumps can be specified on any resource that derives networkresource as a list like this:

 NetworkResourceName:
   host: <remote.example.computer>
   sshpassword: <remote-password>
   jumps:
    - <user@jump-host-1:port>
    - <user@jump-host-2:port>

see here: https://github.com/flxzt/labgrid/tree/networkresource-jumps

@flxzt
Copy link
Contributor Author

flxzt commented Aug 15, 2024

Friendly ping 🙂

@flxzt flxzt changed the base branch from grpc to master August 16, 2024 15:45
Signed-off-by: Felix Zwettler <Felix.Zwettler@duagon.com>
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.

2 participants