nebraska: Create a lightweight Omaha mock server that can be used to install and update DLCs |
|||
Issue descriptionIn order to facilitate DLC testing and development, we need a small server that we can use to install and update DLCs on a DUT.
,
Oct 23
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab commit 726cdbb4b69c2fe4b0b334a061293dcaf5a628ab Author: Colin Howes <chowes@google.com> Date: Tue Oct 23 20:01:47 2018 nebraska: A lightweight mock of the Omaha server Simple server that responds to POST requests with an error message and echos the request body. BUG= chromium:892450 TEST=Manual, unittesting Change-Id: I1ab5f27eeae32f0da92f3d781897e4f5b1d4d89f Reviewed-on: https://chromium-review.googlesource.com/1279130 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [add] https://crrev.com/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab/nebraska/nebraska_unittest.py [modify] https://crrev.com/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab/run_unittests [add] https://crrev.com/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab/nebraska/nebraska.py
,
Oct 23
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab commit 726cdbb4b69c2fe4b0b334a061293dcaf5a628ab Author: Colin Howes <chowes@google.com> Date: Tue Oct 23 20:01:47 2018 nebraska: A lightweight mock of the Omaha server Simple server that responds to POST requests with an error message and echos the request body. BUG= chromium:892450 TEST=Manual, unittesting Change-Id: I1ab5f27eeae32f0da92f3d781897e4f5b1d4d89f Reviewed-on: https://chromium-review.googlesource.com/1279130 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [add] https://crrev.com/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab/nebraska/nebraska_unittest.py [modify] https://crrev.com/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab/run_unittests [add] https://crrev.com/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab/nebraska/nebraska.py
,
Oct 23
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab commit 726cdbb4b69c2fe4b0b334a061293dcaf5a628ab Author: Colin Howes <chowes@google.com> Date: Tue Oct 23 20:01:47 2018 nebraska: A lightweight mock of the Omaha server Simple server that responds to POST requests with an error message and echos the request body. BUG= chromium:892450 TEST=Manual, unittesting Change-Id: I1ab5f27eeae32f0da92f3d781897e4f5b1d4d89f Reviewed-on: https://chromium-review.googlesource.com/1279130 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [add] https://crrev.com/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab/nebraska/nebraska_unittest.py [modify] https://crrev.com/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab/run_unittests [add] https://crrev.com/726cdbb4b69c2fe4b0b334a061293dcaf5a628ab/nebraska/nebraska.py
,
Oct 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/83bc43095799b60a3cc7d332e8bfe9d8ae965e7f commit 83bc43095799b60a3cc7d332e8bfe9d8ae965e7f Author: Colin Howes <chowes@google.com> Date: Wed Oct 31 19:42:27 2018 nebraska: Parse XML requests XML-formatted update and install requests are now parsed and logged. On receiving a request, the server parses each app request and determines its type based on its content and whether there is an update request associated with the platform appid. Each request is logged and the server responds with an error. BUG= chromium:892450 TEST=Manual, unittesting Change-Id: Iec81c5e01a0d296bf399d5f6e5d67c7db8a25c23 Reviewed-on: https://chromium-review.googlesource.com/1281245 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [add] https://crrev.com/83bc43095799b60a3cc7d332e8bfe9d8ae965e7f/nebraska/unittest_common.py [modify] https://crrev.com/83bc43095799b60a3cc7d332e8bfe9d8ae965e7f/nebraska/nebraska_unittest.py [modify] https://crrev.com/83bc43095799b60a3cc7d332e8bfe9d8ae965e7f/nebraska/nebraska.py [add] https://crrev.com/83bc43095799b60a3cc7d332e8bfe9d8ae965e7f/nebraska/request_unittest.py
,
Oct 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/d9a7ed516d983ea03091a7d90807afdfdf76881c commit d9a7ed516d983ea03091a7d90807afdfdf76881c Author: Colin Howes <chowes@google.com> Date: Wed Oct 31 19:42:27 2018 nebraska: Index source and target payload data Scan source and target directories for information describing installation and update payloads, respectively. This information should be JSON encoded, and should describe payloads hosted on a separate server. BUG= chromium:892450 TEST=Manual, unittesting Change-Id: Iadea889b67568818b16dece4c89c41e407691944 Reviewed-on: https://chromium-review.googlesource.com/1281871 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [modify] https://crrev.com/d9a7ed516d983ea03091a7d90807afdfdf76881c/nebraska/unittest_common.py [modify] https://crrev.com/d9a7ed516d983ea03091a7d90807afdfdf76881c/nebraska/nebraska.py [add] https://crrev.com/d9a7ed516d983ea03091a7d90807afdfdf76881c/nebraska/appindex_unittest.py [modify] https://crrev.com/d9a7ed516d983ea03091a7d90807afdfdf76881c/nebraska/nebraska_unittest.py
,
Nov 1
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/c0634d34bb3e1600f096a91f058335668487d46e commit c0634d34bb3e1600f096a91f058335668487d46e Author: Colin Howes <chowes@google.com> Date: Thu Nov 01 04:59:40 2018 nebraska: Implement payload search Target and source directories can now be searched for payloads matching an update or install request. Update and install requests are matched based on request type, appid, and delta payload information. Matches for a given request are logged, but no response is generated. BUG= chromium:892450 TEST=Manual, unittesting Change-Id: I80af2b5463f8e59608c917179020a6b7b15eb85c Reviewed-on: https://chromium-review.googlesource.com/1282308 Commit-Ready: Colin Howes <chowes@google.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [modify] https://crrev.com/c0634d34bb3e1600f096a91f058335668487d46e/nebraska/nebraska.py [modify] https://crrev.com/c0634d34bb3e1600f096a91f058335668487d46e/nebraska/appindex_unittest.py
,
Nov 9
Can we have a complete sample json metadata file in the nebraska folder so I can start working on the tools to create them? Thanks :)
,
Nov 14
It's not urgent but it would be useful to add a README.md at some point.
,
Nov 14
,
Nov 18
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/0098b46b3e0b72368952e4235b199aff27d4fdd8 commit 0098b46b3e0b72368952e4235b199aff27d4fdd8 Author: Colin Howes <chowes@google.com> Date: Sun Nov 18 15:11:05 2018 nebraska: Respond to update and install requests Respond to app install/update requests with a set of matching payload descriptions built from metadata stored in the source/target directories passed at startup. BUG= chromium:892450 TEST=Manual, unittesting Change-Id: Ib6029f99fa57073e65a32fcd8577b3a39a40a473 Reviewed-on: https://chromium-review.googlesource.com/1292239 Commit-Ready: Colin Howes <chowes@google.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [modify] https://crrev.com/0098b46b3e0b72368952e4235b199aff27d4fdd8/nebraska/nebraska.py [modify] https://crrev.com/0098b46b3e0b72368952e4235b199aff27d4fdd8/nebraska/request_unittest.py [modify] https://crrev.com/0098b46b3e0b72368952e4235b199aff27d4fdd8/nebraska/appindex_unittest.py [modify] https://crrev.com/0098b46b3e0b72368952e4235b199aff27d4fdd8/nebraska/unittest_common.py [modify] https://crrev.com/0098b46b3e0b72368952e4235b199aff27d4fdd8/nebraska/nebraska_unittest.py [add] https://crrev.com/0098b46b3e0b72368952e4235b199aff27d4fdd8/nebraska/response_unittest.py
,
Nov 18
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/c2d0dd8f41ed07bb8da0d434f492f9c83b0abe25 commit c2d0dd8f41ed07bb8da0d434f492f9c83b0abe25 Author: Colin Howes <chowes@google.com> Date: Sun Nov 18 15:11:05 2018 nebraska: Sample JSON file. This sample JSON file can be used as a reference when automating build tools to create similar files to describe payloads that nebraska should serve. BUG= chromium:892450 TEST=Have nebraska read in this file and check that it responds correctly to a matching request. Change-Id: I0f116653a19c90eebc1f5334aff040c2a1584023 Reviewed-on: https://chromium-review.googlesource.com/1329996 Commit-Ready: Colin Howes <chowes@google.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [add] https://crrev.com/c2d0dd8f41ed07bb8da0d434f492f9c83b0abe25/nebraska/sample.json
,
Nov 18
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/8fdfaa15e528c43ac6e3e5156ec72d4933d8331f commit 8fdfaa15e528c43ac6e3e5156ec72d4933d8331f Author: Colin Howes <chowes@google.com> Date: Sun Nov 18 15:11:05 2018 nebraska: Remove unused hashes from app response. Removes unused md5 and sha1 hashes. Also removes the base64 sha256 hash that is unused by the client. BUG= chromium:892450 TEST=Checked that hashes in response match a similar response from Omaha, modified a unittest to check that hashes are set correctly. Change-Id: I89f3e670e908b7cee8278bdaf4775fa34290bd03 Reviewed-on: https://chromium-review.googlesource.com/1330670 Commit-Ready: Colin Howes <chowes@google.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [modify] https://crrev.com/8fdfaa15e528c43ac6e3e5156ec72d4933d8331f/nebraska/unittest_common.py [modify] https://crrev.com/8fdfaa15e528c43ac6e3e5156ec72d4933d8331f/nebraska/nebraska.py [modify] https://crrev.com/8fdfaa15e528c43ac6e3e5156ec72d4933d8331f/nebraska/appindex_unittest.py [modify] https://crrev.com/8fdfaa15e528c43ac6e3e5156ec72d4933d8331f/nebraska/response_unittest.py
,
Nov 18
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/f153cefd62e939d2bf1904a095320a4f0c9c5e20 commit f153cefd62e939d2bf1904a095320a4f0c9c5e20 Author: Colin Howes <chowes@google.com> Date: Sun Nov 18 15:11:05 2018 nebraska: Set noupdate status correctly. I was setting noupdate in the wrong place. nebraska now responds correctly to update requests for which no update is available. BUG= chromium:892450 TEST=Attempt an update with no payloads more recent than the current installed version on a test device. Change-Id: If8c3bc9f2d68c69b6700c242f578ddeebd2e59fa Reviewed-on: https://chromium-review.googlesource.com/1333935 Commit-Ready: Colin Howes <chowes@google.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [modify] https://crrev.com/f153cefd62e939d2bf1904a095320a4f0c9c5e20/nebraska/nebraska.py
,
Nov 18
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/17722372430cc2248a61ee4d3d9999abf70824f8 commit 17722372430cc2248a61ee4d3d9999abf70824f8 Author: Colin Howes <chowes@google.com> Date: Sun Nov 18 15:11:06 2018 nebraska: Detect update/install operation. An install request is distinguished from an update request based on whether or not the platform app includes an update_check tag. Currently, we don't have any reliable way of detecting whether an appid is for the platform app, since update engine does not distinguish between DLCs and the platform app when constructing a request. Since update requests are never mixed with events or pings, we make the assumption that if the update_check tag is omitted from any app request, it is the platform app and the request is for an install. BUG= chromium:892450 TEST=Unittests still pass, manual testing. Change-Id: I14cfe82395fdaf6e9f1e7853e077facf73d48dcf Reviewed-on: https://chromium-review.googlesource.com/1336774 Commit-Ready: Colin Howes <chowes@google.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [modify] https://crrev.com/17722372430cc2248a61ee4d3d9999abf70824f8/nebraska/nebraska.py [modify] https://crrev.com/17722372430cc2248a61ee4d3d9999abf70824f8/nebraska/request_unittest.py
,
Nov 18
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/5bd8bdbd24dc2b05fff23b196e49a3d64ede65fd commit 5bd8bdbd24dc2b05fff23b196e49a3d64ede65fd Author: Colin Howes <chowes@google.com> Date: Sun Nov 18 15:11:06 2018 nebraska: Add README and clean up help output. Add a README and clean up help output. BUG= chromium:892450 TEST=N/A Change-Id: Ie2cf0e474a432d1ceda42e7edc9462c0ad0d4415 Reviewed-on: https://chromium-review.googlesource.com/1337519 Commit-Ready: Colin Howes <chowes@google.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org> [modify] https://crrev.com/5bd8bdbd24dc2b05fff23b196e49a3d64ede65fd/nebraska/nebraska.py [add] https://crrev.com/5bd8bdbd24dc2b05fff23b196e49a3d64ede65fd/nebraska/README.md [modify] https://crrev.com/5bd8bdbd24dc2b05fff23b196e49a3d64ede65fd/nebraska/appindex_unittest.py [modify] https://crrev.com/5bd8bdbd24dc2b05fff23b196e49a3d64ede65fd/nebraska/response_unittest.py [modify] https://crrev.com/5bd8bdbd24dc2b05fff23b196e49a3d64ede65fd/nebraska/nebraska_unittest.py
,
Dec 6
|
|||
►
Sign in to add a comment |
|||
Comment 1 by estaab@chromium.org
, Oct 12