Messages sent by client should differentiate between server-api and client-api
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
Fix Released
|
Medium
|
Free Ekanayaka |
Bug Description
On the server side we already differentiate between the "server-api" and
the "client-api" fields in the message payloads posted by the
client. The "server-api" field is used by the message system to lookup
the correct MessageAPI adapter (and hence message handlers) for that
particular server API version, and the "client-api" ends up in the
Computer.
On the client side however, we just have one single API version defined
in landscape/
"client-api" fields.
We should split the API variable in SERVER_API and CLIENT_API, so we can
let the two APIs evolve independently. Basically the schema of the
messages *sent* by the client is implicitly defined by the SERVER_API
version, while the schema of the messages *accepted* by the client by
the CLIENT_API one.
One known problem is that if a client sets a SERVER_API version newer
than the latest SERVER_API version that the server is prepared to accept
(for example the latest landscape-client used with an oldish
standalone), it will get a 404 not-found error back. In that case the
client should probably be able to decrease the SERVER_API its sending
and cope with that. However this deserves another bug.
affects landscape-client
status inprogress
importance medium
assignee free.ekanayaka
milestone 1.3.4
Related branches
- Thomas Herve (community): Approve
- Sidnei da Silva (community): Approve
-
Diff: 356 lines (+48/-38)9 files modifiedlandscape/__init__.py (+11/-1)
landscape/broker/exchange.py (+3/-3)
landscape/broker/store.py (+2/-2)
landscape/broker/tests/test_exchange.py (+8/-8)
landscape/broker/tests/test_store.py (+6/-6)
landscape/broker/transport.py (+3/-3)
landscape/manager/tests/test_customgraph.py (+9/-9)
landscape/manager/tests/test_shutdownmanager.py (+3/-3)
landscape/monitor/tests/test_activeprocessinfo.py (+3/-3)
tags: | added: fix-it-friday |
Changed in landscape-client: | |
status: | In Progress → Fix Committed |
Changed in landscape-client: | |
status: | Fix Committed → Fix Released |
Note that I set the CLIENT_API to 3.3, because marks 3.3 the point since the client accepts the "binaries" field in the "change-packages". The server will have to check if Computer. current_ api is greater or equal than 3.3 when deciding whether to send "change-packages" messages containing the "binaries" field (like for applying package profiles).