557 Commits

Author SHA1 Message Date
J. Nick Koston 8898b94af4 Avoid infinite loop when cached mirror redirect keeps failing (#5435)
* Avoid infinite loop when cached mirror redirect keeps failing

The registry mirror iterator caches the HEAD redirect for one hour,
but the cache hit path never advanced _visited_mirrors, and the
cached payload did not include X-PIO-Mirror. When a prior run cached
a redirect to a mirror that now fails (for example an SSL error on
the download), subsequent iterations kept hitting the same cache key
and returning the same failing mirror forever, so tool installs
looped until interrupted.

Store X-PIO-Mirror in the cached payload, and on cache hit only
reuse the entry if it names a mirror not already tried; otherwise
fall through to a fresh HEAD with bypass set. Stale cache entries
written before this change lack X-PIO-Mirror and fall through
naturally, so the fix self heals without a manual cache clear.

* Add unit tests for registry mirror iterator cache handling

Cover the cache hit path advancing _visited_mirrors, stale cache
entries without X-PIO-Mirror falling through to a fresh HEAD, and
new HEAD responses persisting X-PIO-Mirror so later runs can tell
whether the cached redirect still names an untried mirror. Each
test fails against the previous iterator implementation.

* Add type annotations to mirror iterator tests

* Use typing.X annotations for 3.6 compatibility

* Satisfy pylint and black on mirror iterator tests
2026-06-11 14:27:47 +03:00
Ivan Kravets 23a19a8c31 Fix library test 2026-03-27 19:54:52 +02:00
Ivan Kravets c4e2a87ca1 Fix test 2026-03-27 19:17:18 +02:00
Ivan Kravets e530145bfa Fix test 2026-03-26 17:01:53 +02:00
Ivan Kravets ef3f05a327 Extend test for passed/failed suites // Issue #5183 2026-02-03 17:54:35 +02:00
Ivan Kravets 2d67536a05 Apply formatter 2026-02-02 14:08:44 +02:00
valeros 3af99e4bbb Updated tests for check command to catch additional whitespace issues
PR #5351
2026-01-15 16:03:14 +02:00
Ivan Kravets c950d6d366 CI: Disable cleaning of ubuntu instance 2025-02-08 21:51:50 +02:00
Ivan Kravets 29cd2d2bdb Update GH actions 2025-02-08 21:24:54 +02:00
Christian Clauss 4dc7ea5bd0 Fix typos discovered by codespell (#5078)
* Fix typos discovered by codespell

* codespell-project/actions-codespell@v2
2025-02-08 17:21:12 +02:00
Ivan Kravets 1be6e10f99 Introduced the PLATFORMIO_RUN_JOBS environment variable // Resolve #5077 2025-02-08 17:15:34 +02:00
Ivan Kravets fe2fd5e880 Sync docs 2024-12-02 21:32:10 +02:00
Ivan Kravets 3e20abec90 Disable temporary "test_custom_testing_command" 2024-10-17 11:10:58 +03:00
Ivan Kravets 2d4a87238a Add support for Python 3.13 2024-09-23 23:25:46 +03:00
Ivan Kravets 4230b223d2 Update bottle to 0.13.* 2024-09-16 20:45:30 +03:00
Ivan Kravets cf497e8829 Update tests 2024-08-29 15:58:12 +03:00
Ivan Kravets 28bd200cd6 Move core/pip dependencies to the separate "dependencies" module 2024-03-18 13:14:22 +02:00
Ivan Kravets 32991356f3 Enhanced Static Code Analysis to accommodate scenarios where custom src_dir or include_dir are located outside the project folder // Issue #4874 2024-03-16 14:07:01 +02:00
adrianstephens dbe58b49bf paths fix for check tool (#4874)
* paths fix for check tool

* Minor changes

- Handle an edge case on Windows when sources and the project are located on different drives
- Cover edge cases with tests

---------

Co-authored-by: Valerii Koval <valeros@users.noreply.github.com>
2024-03-16 14:00:30 +02:00
Ivan Kravets c28740cfb1 Update tests 2024-03-16 13:43:44 +02:00
Ivan Kravets 0f3dbe623d Update tests 2024-03-16 12:30:51 +02:00
Ivan Kravets 353f440335 Addressed an issue where passing a relative path to the pio project init // Resolve #4847 2024-02-07 13:36:21 +02:00
Ivan Kravets f31f9fa616 Expanded support for SCons variables declared in the legacy format `${SCONS_VARNAME}` // Resolve #4828 2024-01-11 21:33:01 +02:00
Ivan Kravets adab425c6d Expanded support for SCons variables declared in the legacy format `${SCONS_VARNAME}` // Resolve #4828 2024-01-11 19:23:26 +02:00
Ivan Kravets 77e6d1b099 PyLint fix for Python 3.12 2023-12-09 13:51:51 +02:00
Ivan Kravets 51bf17515e Revert back normalizing platformio.*_dir option 2023-12-09 13:18:03 +02:00
Ivan Kravets 204a60dd52 Parse only $PROJECT_HASH legacy built-in variable 2023-12-09 13:06:20 +02:00
Ivan Kravets 127b422d25 Rectified an issue where ${platformio.name} erroneously represented None as the default project name // Resolve #4717 2023-12-08 19:38:50 +02:00
Ivan Kravets 8c61f0f6b6 Enhanced the handling of built-in variables during interpolation // Resolve #4695 2023-12-08 19:12:00 +02:00
Ivan Kravets 11df021750 Resolve an issue where running pio project metadata resulted in duplicated include entries // Resolve #4723 2023-12-01 19:38:25 +02:00
valeros 961ab6b35e Properly handle the check_src_filters option per environment
Resolves #4788
2023-11-17 13:12:40 +02:00
Ivan Kravets e1f34c7ea0 Drastically enhanced the speed of project building when operating in verbose mode // Resolve #4783 2023-11-16 20:05:44 +02:00
Ivan Kravets 9c61ef544d Fix test 2023-10-16 00:01:05 +03:00
valeros 7229e1cce4 Add missing Zephyr project files in tests for PIO Check 2023-09-30 12:09:36 +03:00
Ivan Kravets f1c445be15 Bump version to 6.1.11 2023-08-31 17:54:11 +03:00
Ivan Kravets 99224d7d4e Remove CLion from tests 2023-08-11 13:49:03 +03:00
Ivan Kravets a983075dac Update deps 2023-07-27 15:04:09 +03:00
valeros 5c9b373b65 Update Cppcheck to v2.11 2023-07-17 14:12:52 +03:00
Ivan Kravets a423a4dde4 Rename "PackageMetaData" class to "PackageMetadata" 2023-07-11 20:12:20 +03:00
Ivan Kravets 9585e2a3e3 Fixed handling of `-include` flag // Resolve #4683 2023-07-06 13:42:19 +03:00
Ivan Kravets 109c537d86 Fixed handling of `-include` flag // Resolve #4683 2023-07-06 11:40:30 +03:00
Ivan Kravets 01ab1fa4c0 Resolved a critical issue related to the usage of the `-include` flag // Resolve #4682 2023-07-03 18:37:57 +03:00
Ivan Kravets e78efff33b Allow the use of the underscore symbol in the "keywords" field 2023-06-22 20:41:44 +03:00
Ivan Kravets f219f35ac8 Updated the "pio project metadata" command to return C/C++ flags as parsed Unix shell arguments 2023-06-20 20:55:00 +03:00
Ivan Kravets e9cf551101 Added a new --lint option to the pio project config command // Resolve #4644 2023-06-20 14:25:30 +03:00
Ivan Kravets c9235a5276 Use UTC-based timestamp 2023-06-09 15:18:07 +03:00
Ivan Kravets 6ea7ded483 Run tests against API v3 2023-06-05 18:15:30 +03:00
Ivan Kravets 21c4f091e2 Skip mbed legacy examples from PIO Core CI 2023-04-27 15:12:01 +03:00
Ivan Kravets 82d380d895 Improve docs for "build_flags" 2023-04-21 11:40:54 +03:00
Ivan Kravets 743fc8e636 Improved support for projects located on Windows network drives // Resolve #3417 2023-04-20 18:57:22 +03:00