-
Notifications
You must be signed in to change notification settings - Fork 56
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(#2445): add c8y proxy config settings #2446
fix(#2445): add c8y proxy config settings #2446
Conversation
da17827
to
d0ffd90
Compare
Codecov Report
Additional details and impacted files
|
Robot Results
|
The Cumulocity HTTP API can be accessed at `http://{host}:{port}/c8y/{c8y-endpoint}`. Configuration settings | ||
`c8y.proxy.client.host` and `c8y.proxy.client.port` are used to configure `{host}` and `{port}` parts of the base URL | ||
which will be used by thin-edge components to make requests to the C8y Proxy. `c8y.proxy.bind.address` and |
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.
If my understanding is correct, this should stress that the client settings configure the mapper and not the agent (which is what I, as a user, would assume the client setting changes as it is how the equivalent MQTT settings work). I guess the main clue as to this being the case without knowing the implementation details is that the c8y
settings only affect the mapper as that's the only component that cares about Cumulocity.
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.
It is defining how clients can reach the endpoint.
The mapper is the only component that uses the setting directly, however the value of the setting will be used within command payloads which are consumed by other clients (e.g. custom device connectors)
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 get that, my point was "there isn't any point setting this on a child device as the value won't be used", which is unlike what happens for the mqtt client settings. It probably doesn't have much of an impact, but the logic behind why it's like that doesn't seem like a thing that's necessarily obvious to a user so might be worth drawing attention to.
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 agree with @jarhodes314. We must be explicit telling that both c8y.proxy.bind.address
and c8y.proxy.client.host
have to be set on the box running the c8y
mapper. The latter will be forwarded by the c8y mapper to its clients. c8y.proxy.client.host
can also be directly set on the clients which aim to use the c8y REST API.
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.
My bad, forgot about this ticket. Description tweaked in 0159f91, is it OK now?
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.
Approved
This commit adds `c8y.proxy.client.host` and `c8y.proxy.client.port` used to connect to running C8y HTTP proxy.
0159f91
to
eafe1b3
Compare
TODO
Proposed changes
This PR adds
c8y.proxy.client.host
andc8y.proxy.client.port
used to connect to running C8y HTTP proxy.Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments