Commit Graph

2817 Commits

Author SHA1 Message Date
Ali Zhang
75ab80a23a pw_software_update: Import keys from a pem file
Adds support for importing ECDSA (NIST-P256) public keys from standard
pem files as KeyMapping objects.

Also refactors key generation to persist keys in standard pem formats
instead of customized JSON format. The pem formats are much more
recognizable in general and also removes the need for the
securesystemslib module.

No-Docs-Update-Reason: module in early development

Change-Id: Ie06808728137e70e35afdceb5254cf6abf20f1ea
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/62441
Commit-Queue: Ali Zhang <alizhang@google.com>
Reviewed-by: Joe Ethier <jethier@google.com>
2021-10-19 17:31:42 +00:00
Ali Zhang
e059107b73 pw_software_update: Add root metadata to a bundle
Adds support for including a root metadata when creating a bundle.

No-Docs-Update-Reason: module in early development.

Change-Id: Ibdced04fd355e8f520d0d3ba6e5cf25276929d72
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/63640
Commit-Queue: Ali Zhang <alizhang@google.com>
Reviewed-by: Joe Ethier <jethier@google.com>
2021-10-19 07:13:43 +00:00
Ali Zhang
8990f7fad0 pw_software_update: Specify targets metadata version
Specifies the targets metadata version when creating an update bundle.

No-Docs-Update-Reason: module in early development

Change-Id: If070da38f7a48b94c282d360ba4af3d8c905f99b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/63166
Reviewed-by: Joe Ethier <jethier@google.com>
Commit-Queue: Ali Zhang <alizhang@google.com>
2021-10-19 06:10:02 +00:00
Anthony DiGirolamo
cd40577e7f pw_build: No pip build isolation
Since Pigweed already uses virtualenvs for all projects this default
pip feature isn't required. This greatly reduces pip install and thus
bootstrap run times.

Bootstrap Python setup times on a Linux host (three samples):
  Before: 3m45s average
    3m58.7s
    3m40.5s
    3m38.3s
  After: 1m42s average
    1m31.3s
    1m48.1s
    1m47.6s

No-Docs-Update-Reason: Small Python pip install change.
Change-Id: I0f862a29b4d38aae923021880e99a8696add9b0a
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65940
Pigweed-Auto-Submit: Anthony DiGirolamo <tonymd@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-10-19 02:04:22 +00:00
Wyatt Hepler
a07e664953 pw_stream: Improve SocketStream logging
- Log errors when attempting to connect.
- Remap "localhost" to the loopback address.
- Add log when the system RPC server starts.

Change-Id: Iffa10fb1ce6a7f8e1e81d32cb955d7549b39146c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65747
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
2021-10-18 21:36:13 +00:00
Wyatt Hepler
f4bac5072c pw_function: Error message for bad instantiations
Display a clear error message when pw::Function is instantiated with
anything other than a function type.

Change-Id: I658b28118c927e38a7ed523b0884ed7131856a32
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65746
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
2021-10-18 20:12:20 +00:00
Ewout van Bekkum
f05c6b188a pw_thread_freertos/util: Don't skip the priority=0 ready tasks
Unlike FreeRTOS upstream's uxTaskGetSystemState implementation,
we'd like to be able to report on the state of the IDLE task and
any of the user's tasks at that same priority level in case
configIDLE_SHOULD_YIELD is used.

Ergo the thread iteration is changed to include reporting active
threads at priority 0.

No-Docs-Update-Reason: No API change.
Change-Id: I7485457d4dfafb19bd495f31658429acbbd36e9f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65860
Reviewed-by: Kevin Zeng <zengk@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
2021-10-18 19:11:25 +00:00
Paul Mathieu
853cc7902c TS: Allow embedding into downstream packages
pw_hdlc and pw_web_ui can now be embedded into downstream apps.

How to do it:

- craft a downstream WORKSPACE with `local_repository` pointing to
pigweed, and the following `yarn_install` rule:
```
yarn_install(
    # Name this npm so that Bazel Label references look like @npm//package
    name = "npm",
    package_json = "//:package.json",
    yarn_lock = "//:yarn.lock",
    generate_local_modules_build_files = False,
)
```
You may need (many) more thinggies in your WORKSPACE file.

- add the modules you want in your package.json:
```
yarn link path/to/pigweed/pw_hdlc/ts
```

- in `BUILD.bazel`, add dependencies to your `ts_project` rule:

```
ts_project(
    name = "lib",
    tsconfig = ":tsconfig",

    source_map = True,
    declaration = True,

    srcs = [
        "index.tsx",
        ],

    deps = [
        "@npm//:node_modules",
        "@pigweed//pw_hdlc/ts:pw_hdlc",
        ],
    )
```
No-Docs-Update-Reason: build system change

Change-Id: I027f01f5eb79d198e94a04580fbf9904b10b75da
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65600
Reviewed-by: Jared Weinstein <jaredweinstein@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Paul Mathieu <paulmathieu@google.com>
2021-10-17 16:34:58 +00:00
pigweed-roller
908ee7a6ae roll: kythe
From: version:1.0.2
To: version:1.0.3

CQ-Do-Not-Cancel-Tryjobs: true
Roller-URL: https://ci.chromium.org/b/8833115968397137665
Cq-Cl-Tag: roller-builder:kythe-roller
Cq-Cl-Tag: roller-bid:8833115968397137665
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Id8e6d381e3f1222690adb080e8fa8a00f06d032f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64803
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-10-17 15:33:08 +00:00
pigweed-roller
ec77dc0bef roll: Update Python package versions
Roller-URL: https://ci.chromium.org/b/8833170895309078417
Cq-Cl-Tag: roller-builder:pigweed-update-python-versions
Cq-Cl-Tag: roller-bid:8833170895309078417
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Ia9f1848ad0c8d7f11314f7bec37ed1e3a11e37e8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65726
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-10-17 01:05:18 +00:00
Yuanyao (YY) Zhong
f0e9205b41 pw_trace_tokenized: Modify CMakeLists.txt for build
No-Docs-Update-Reason: build file change
Change-Id: Ic74158966a1f2d03b3996c0adbfa24d47cf74c98
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65722
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Yuanyao Zhong <yyzhong@google.com>
2021-10-16 15:40:58 +00:00
Yuanyao (YY) Zhong
ab4d77c9fb pw_ring_buffer: Add CMakeLists.txt for pw_ring_buffer
No-Docs-Update-Reason: Add cmake file
Change-Id: I22ceb0ddd5a7ba1cb1082c744cbe2997feda64b5
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65721
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Yuanyao Zhong <yyzhong@google.com>
2021-10-16 01:08:36 +00:00
Ted Pudlik
09cd59eb48 docs: Display only titles in module guide
Before this change, the autogenerated TOC also included the top-level
headings within the module documents if they were at the same heading
level as the document title.  Example section:

[snip]
*  pw_bloat
*  pw_blob_store
*  Usage
*  FileSystem RPC integration
*  Size report
*  pw_bluetooth_hci
*  pw_boot
[snip]

The "Usage" (etc) are subsections of pw_blob_store docs. Arguably we
should not have any headings in the docs at the same level as the title,
but the simplest and most robust fix is just not to display them here.

Change-Id: Ic32843d7572b11edc14af382e893ee4bef6ea946
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65724
Reviewed-by: Anthony DiGirolamo <tonymd@google.com>
Commit-Queue: Ted Pudlik <tpudlik@google.com>
2021-10-15 23:02:46 +00:00
Rob Mohr
ab90ea89b9 pw_env_setup: Stop using PW_CHECKOUT_ROOT
This variable is no longer set by recipe code (pwrev/65640).

Change-Id: Id63d6f33dfffb9dcb406251b39a7770d676fecc2
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65740
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
2021-10-15 17:36:48 +00:00
Wyatt Hepler
b5aeefc41d pw_rpc: Rework the FakeChannelOutput classes
- Update Raw/NanopbFakeChannelOutput so it can be used for both client
  and service testing. Record all packets sent and support iterating
  over payloads by RPC. Store payloads in a single buffer rather than a
  list of fixed-size buffers to support different payload sizes with
  less memory.
- Allow encoding/decoding individual proto methods with NanopbSerde.
- Update tests to use the new FakeChannelOutput API.
- Adapt the test method contexts to use the new FakeChannelOutput. A
  test server class with improved functionality (and no macros) will be
  created in the future.

Requires: pigweed-internal:16580
Change-Id: I10eb11cdf8e7a3ee656d2a00d5a6517bc0179281
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64962
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-10-14 19:13:57 +00:00
Wyatt Hepler
b4c6bb5533 pw_base64: Fix variable style; reduce tests
- Rename constexpr variables to use constant style.
- Reduce the number of randomly generated tests. There is plenty of
  with the reduced number of tests.

Change-Id: Ifa3179427872fc38921417992080d50972ffa281
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65500
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
2021-10-14 03:34:02 +00:00
Anthony DiGirolamo
69285347b4 pw_console: Keep main menu open on theme change
No-Docs-Update-Reason: Small UI fix
Change-Id: If44c1716db759de795e69bf33cf7a34839c6d5d6
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65462
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
2021-10-14 02:13:32 +00:00
Joe Ethier
6fe3045f7d pw_software_update: Add user_manifest bundle arg
This change adds a user-defined "user_manifest" option to the GN
template for creating update bundles. The user manifest is treated like
any other target payload for the purpose of bundle creation, but has a
unique API on the GN side because it will be treated differently in the
update client on the firmware side.

Tested: Built downtream with and without user_manifest
Change-Id: Id15d8138e17e4a85808ae04b3c014be5f6e3ea18
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65360
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Joe Ethier <jethier@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
2021-10-13 22:14:59 +00:00
Ewout van Bekkum
12ea8d02bc pw_software_update: Use a user_manifest target file
Instead of embedding user metadata in the TargetsMetadata, a
reserved "user_manifest" target file is used to pass the user's
metadata as an opaque blob.

During verification this blob is handed to the backend to verify
when desired.

Requires: pigweed-internal:16500
Change-Id: I111d8cbbfb2a43b68baea0c4b0545e6005a0a9de
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65361
Reviewed-by: David Rogers <davidrogers@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
2021-10-13 20:26:09 +00:00
Wyatt Hepler
4cafcda09f build: Run clang-tidy in default build
- Add the "static_analysis" group that runs clang-tidy to the default
  build.
- Remove the "clang_tidy" presubmit step. Instead, have the
  "static_analysis" step run clang-tidy and python.lint from GN.
- Fix a few clang-tidy warnings.
- Exclude mbedtls headers from checks.

Change-Id: Ied832e48c9ba46efaebb911ddb82ab0592944ee7
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64624
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2021-10-13 17:27:59 +00:00
David Rogers
eb05d88e81 pw_kvs::flash: Update logs for flash operations
Update flash-related log messages to use the PW_LOG_MODULE_NAME of
"PW_FLASH" instead of "KVS". Update the error log in
FlashPartition::CheckBounds() to be more clear what the error is.

Change-Id: If35a914162a45aaec1fd029dc4ec09bc05c5ea37
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65340
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: David Rogers <davidrogers@google.com>
2021-10-13 15:45:07 +00:00
Yuval Peress
e4dd0d71f0 pw_rpc: Add missing pw_log dependency for CMake
When trying to build a simple CMake project with pw_rpc I found that
I was getting errors importing "pw_log/log.h". This change fixes the
error. It seems that this dependency is included in the BUILD.gn files
and was missing in the CMakeLists.txt

Change-Id: Ica05a7f6004a63a8526f27ff9255456151105695
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65380
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
Commit-Queue: Yuval Peress <peress@google.com>
2021-10-13 15:33:36 +00:00
Wyatt Hepler
08956abf0d pw_transfer: Support seeking in reads; standardize statuses
- Attempt to seek on read transfers if an out-of-order offset is
  requested.
- Remap prepare status codes to standard codes for pw_transfer.
- Update status documentation.

Change-Id: I708c8598fee7d87d5badb1ffa0aff8f46596107b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65080
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
2021-10-12 21:45:54 +00:00
Wyatt Hepler
5e9f7a691a pw_toolchain: Header filtering for clang-tidy
clang-tidy does not have a simple way to filter specific headers from
checks. This change adds a build arg that filters include paths, rather
than individual header files, from checks. This is done by replacing -I
with -isystem for these paths in the clang-tidy invocation.

Change-Id: Ib0e8739e67fdf57f1dccf23843011f7d85886368
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64980
Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Adam MacBeth <amacbeth@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
2021-10-12 21:12:34 +00:00
Wyatt Hepler
7d3391646e pw_polyfill: Remove -included language_features.h
The language_features.h header was expected to be included in all source
files with the -include option. It was only adding support for one
feature, static_assert with no message, which is easy to avoid when
required. Removing language_features.h simplifies building Pigweed,
particularly when integrating it with an existing build system, and
avoids some hidden "magic" functionality.

Change-Id: Ibb87ed7da6bbbc1bfc3438b8547a14ede9bcce9a
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65241
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-10-12 20:14:13 +00:00
Joe Ethier
0111407b7c pw_software_update: pw_update_bundle GN template
This change adds a new GN template called pw_update_bundle that can be
used to easily serialize update bundles as part of a GN build.

In addition, the API for bundle generation is adjusted so that normal
usage is to explicitly state a full mapping of target names to paths
containing payloads rather than giving a directory and masking out
excludes. The directory-ingesting tooling is left in place as a utility
function that can be used to feed into the new API if desired.

Testing: Includes baseline unit test coverage
Requires: pigweed-internal:16380
Change-Id: Ib8f873c436e00acbab5c84c12eaec56ca33ffdce
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64201
Reviewed-by: Armando Montanez <amontanez@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Joe Ethier <jethier@google.com>
2021-10-12 19:59:33 +00:00
Wyatt Hepler
0132da5c74 pw_polyfill: Remove code related to C++11 support
C++14 is now required for all Pigweed modules.

- Add a section to the style guide about the C++ standard.
- Remove the tokenizer and polyfill C++11 tests.
- Remove the cpp11 GN config.
- Remove unnecessary features and workarounds for C++11.
- Update C++14 tests to use EXPECT_EQ, EXPECT_NE, etc. since these are
  supported by C++14, but not C++11.

Change-Id: I6082ff01b4410db8a322cf8cefee60d3787443ff
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65240
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2021-10-12 18:47:44 +00:00
Wyatt Hepler
fff3c7cbd7 pw_polyfill: Move std::to_array to pw::containers::to_array
Avoid polyfilling C++20 library features.

Change-Id: Ibd006177cfa00972509e14037d2ece4329997dab
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64021
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-10-12 18:06:53 +00:00
Wyatt Hepler
bfb9887e16 pw_containers: WrappedIterator class
WrappedIterator makes it simple to create an iterator that yields items
derived from items in another iterator.

Change-Id: I6146da5fba60866265081905fea6753d328ddefe
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64961
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2021-10-12 18:01:32 +00:00
Scott James Remnant
f03bed132d mcuxpresso: GN template to create pw_source_set for MCUXpresso targets
Provides a GN template to use mcuxpresso_builder to generate a
pw_source_set` for a target using an NXP MCUXpresso SDK.

No-Docs-Update-Reason: docs in $dir_pw_build_mcuxpresso

Change-Id: Ibc97a92f3ed2ec54299bc2c9b2201aedb5d781f9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/61801
Commit-Queue: Scott James Remnant <keybuk@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-10-12 14:26:54 +00:00
pigweed-roller
9588ad05d7 roll: Update Python package versions
Roller-URL: https://ci.chromium.org/b/8833576901273356209
Cq-Cl-Tag: roller-builder:pigweed-update-python-versions
Cq-Cl-Tag: roller-bid:8833576901273356209
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I585f12dfdf95238c5d11fa310413c349d9aee0ca
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65120
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-10-12 13:29:53 +00:00
Scott James Remnant
7a3ff51f68 pw_build_mcuxpresso: Generate pw_source_set for MCUXpresso SDK targets
Provides a utility that parses the manifest XML files shipped inside
NXP MCUXpresso SDK packages detailing the SDK components and outputs
the list of sources, headers, etc. corresponding to an included and
excluded list of components.

Change-Id: I0e41cc046fe327860170e48bb561434730ebab55
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/61800
Commit-Queue: Scott James Remnant <keybuk@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-10-12 12:26:22 +00:00
Wyatt Hepler
100a1603b5 pw_containers: FilteredView class
- The FilteredView class applies a filter to a container, allowing
  iteration over only matching elements.
- Prevent copying an IntrusiveList::Item, since this would break the
  intrusive list the item is in.

Change-Id: Ifefb95c421e057e746440532f0af6505fb2dc32d
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64960
Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-10-11 23:45:29 +00:00
pigweed-roller
c410445bcb roll: Update Python package versions
Roller-URL: https://ci.chromium.org/b/8833633253332741137
Cq-Cl-Tag: roller-builder:pigweed-update-python-versions
Cq-Cl-Tag: roller-bid:8833633253332741137
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Ifdb247af2aca8476bef120d82396151a8b265e00
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/65040
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-10-11 22:07:59 +00:00
Ashley Coleman
b8882451e3 pw_watch: Exit cleanly on max inotify instances
Watching for changes can fail when the max number of instances is
reached. Catch the error and print instructions on how to increase the
max value. This is different from inotify watches which can also fail in
the same way for the same reason.

No-Docs-Update-Reason: bugfix
Change-Id: Ia9df0c21ffcd118b99679476ee8bcebefa91f9ce
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64802
Commit-Queue: Keir Mierle <keir@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-10-11 21:30:59 +00:00
Wyatt Hepler
982b005ae1 pw_transfer: Reorganize Python client code
Move the Manager to client.py and keep the transfer classes in
transfer.py. Have pw_transfer itself provide the public interface.

Change-Id: I9825139c0009747f444f687ba16ba10c3d0b63ad
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64628
Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-10-11 18:00:18 +00:00
pigweed-roller
ce98c4d4cd roll: host_tools
From: git_revision:0e8aff899bfcac9e77b6452b0819578be17d1ebe
To: git_revision:3b7e5d53c1a945c5e1e0ab3e454c7c3937ed8031

CQ-Do-Not-Cancel-Tryjobs: true
Roller-URL: https://ci.chromium.org/b/8833681948802535121
Cq-Cl-Tag: roller-builder:host-tools-roller
Cq-Cl-Tag: roller-bid:8833681948802535121
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I091267abdae6e80da11e86cc57ef2b20caa1c04d
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64921
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-10-11 09:35:48 +00:00
pigweed-roller
7515150efb roll: gn
From: git_revision:0153d369bbccc908f4da4993b1ba82728055926a
To: git_revision:693f9fb87e4febdd4299db9f73d8d2c958e63148

CQ-Do-Not-Cancel-Tryjobs: true
Roller-URL: https://ci.chromium.org/b/8833717809860566353
Cq-Cl-Tag: roller-builder:gn-roller
Cq-Cl-Tag: roller-bid:8833717809860566353
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I04f284bc612645391b8c2b7aec2bd5b171cbacd4
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64805
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-10-11 00:05:28 +00:00
pigweed-roller
6858c997a5 roll: buildifier
From: version:2@4.2.1
To: version:2@4.2.2

CQ-Do-Not-Cancel-Tryjobs: true
Roller-URL: https://ci.chromium.org/b/8833735489556319473
Cq-Cl-Tag: roller-builder:buildifier-roller
Cq-Cl-Tag: roller-bid:8833735489556319473
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I587b17a1f6b3554ac67cea2b2e869c36ccd89a44
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64821
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-10-10 19:54:57 +00:00
Wyatt Hepler
3b7e5d53c1 pw_transfer: Expose ProgressCallback in pw_transfer
Change-Id: I283899394d14987cd481e4e19b4864208764f18e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64627
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-10-10 19:07:08 +00:00
pigweed-roller
c9e3a66ff7 roll: go
From: version:2@1.17.1
To: version:2@1.17.2

CQ-Do-Not-Cancel-Tryjobs: true
Roller-URL: https://ci.chromium.org/b/8833747380720631073
Cq-Cl-Tag: roller-builder:go-roller
Cq-Cl-Tag: roller-bid:8833747380720631073
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I950a4da892f0ecf628dfb4a7492b2d3fd5ac493e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64804
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-10-10 16:16:37 +00:00
pigweed-roller
aaaac547be roll: Update Python package versions
Roller-URL: https://ci.chromium.org/b/8833805071792259553
Cq-Cl-Tag: roller-builder:pigweed-update-python-versions
Cq-Cl-Tag: roller-bid:8833805071792259553
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Ib872885ba9e2718ae5363b8b012bfa2013e527f2
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64801
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-10-10 01:47:36 +00:00
pigweed-roller
a5ee645498 roll: clang
From: git_revision:92904cc68fbc1d000387b30accc8b05b3fe95daa
To: git_revision:f37e8b0b831e61d3b6033829fff05d6d193ab735

CQ-Do-Not-Cancel-Tryjobs: true
Roller-URL: https://ci.chromium.org/b/8833804886639388497
Cq-Cl-Tag: roller-builder:clang-roller
Cq-Cl-Tag: roller-bid:8833804886639388497
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I8c74dd47cf92d20054d991333b1110377ce0d4b9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64820
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-10-10 01:02:27 +00:00
Ewout van Bekkum
be8e994d83 pw_software_update: Relax NotifyTransferSucceeded precondition
Removes the TRANSFERRING state precondition from
NotifyTransferSucceeded, given that the software update service
state may go out of sync with the transfer state in case the
transfer is aborted after the software update state is aborted.

Change-Id: Iff557fd74f949897b55aa3d6f594aba4113bb6fd
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64625
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
2021-10-09 01:00:26 +00:00
Ewout van Bekkum
8b21fff08c pw_software_update: Require strict transferred transitions
Removes the temporary state transitions which permitted
TRANSFERRING state when entering verify and/or apply, instead the
TRANSFERRED state is now required in those places.

Requires: pigweed-internal:16200
Change-Id: I13ad8cd63313e44c79c4e851f80f603a1e9936a4
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64581
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: David Rogers <davidrogers@google.com>
2021-10-08 22:33:40 +00:00
Jared Weinstein
dd716f9e9e pw_rpc: Add open call to every RPC method type
Open() allows an RPC to be created without failing due to early errors.
This is useful when starting a logging RPC at boot, for example.

Bug: b/194329554
Change-Id: I68a0282a6bd5bbe9715444b28b12afd1476e5faa
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/63292
Pigweed-Auto-Submit: Jared Weinstein <jaredweinstein@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Paul Mathieu <paulmathieu@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-10-08 20:48:12 +00:00
Ewout van Bekkum
711e400447 pw_software_update: redo the TRANSFERRED hook
Refactors the NotifyTransferFinished() hook to instead only be
called on success as NotifyTransferSucceeded().

In addition the method is updated to disable the transfer handler
after transferring is done.

Change-Id: I831a787f48566375cf4d095d5c0a866bc189b59e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64580
Reviewed-by: David Rogers <davidrogers@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
2021-10-08 19:34:00 +00:00
Rob Mohr
5d6d66c404 python: Change pylint "whitelist" to "allowlist"
Fixed: 280
Change-Id: I6da3fe72cf0430c06003b99aea9712e35e43b62c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64621
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-10-08 19:24:20 +00:00
Jared Weinstein
8dc2215779 pw_rpc: Unary call supports returning response promise
Using call() rather than invoke() will force users to await a response
promise.

Future work is planned to avoid allowing simultaneously using the
callback and promise methods; see b/201680506.

Bug: b/194329554
Change-Id: Ia8529303d227b22f8060a07e9880835c7cc70827
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/63161
Pigweed-Auto-Submit: Jared Weinstein <jaredweinstein@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Paul Mathieu <paulmathieu@google.com>
2021-10-08 19:03:50 +00:00
Paul Mathieu
29f5e73b5a pw_web_ui: Refactor to use ts_project
Testing done:
- bazel run //pw_web_ui:devserver

No-Docs-Update-Reason: infra change with no downstream impact
Change-Id: Ib1a9b9e684bedc803ccf4a43251bcf30cec98899
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/64023
Reviewed-by: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Paul Mathieu <paulmathieu@google.com>
2021-10-08 18:11:59 +00:00