From 70cf43204d70d4f3ad509ab279210c7888a1c50d Mon Sep 17 00:00:00 2001 From: Mykhailo Lohvynenko Date: Wed, 10 Sep 2025 14:38:13 +0300 Subject: [PATCH 1/7] ci: use aos-core-build image aos-core-build-base image is deprecated, and does not exist anymore in the registry. Signed-off-by: Mykhailo Lohvynenko Reviewed-by: Mykola Kobets Reviewed-by: Oleksandr Grytsov --- .github/workflows/build_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yaml b/.github/workflows/build_test.yaml index 137edb77..fe5c507d 100644 --- a/.github/workflows/build_test.yaml +++ b/.github/workflows/build_test.yaml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all container: - image: ghcr.io/aosedge/aos-core-build-base:latest + image: ghcr.io/aosedge/aos-core-build:latest options: "--entrypoint /usr/bin/bash" credentials: username: ${{ github.actor }} From ed1163d9a353d0164549b00705c28f796cfceb4c Mon Sep 17 00:00:00 2001 From: Mykhailo Lohvynenko Date: Wed, 10 Sep 2025 15:46:36 +0300 Subject: [PATCH 2/7] ci: remove workaround for home override in container This patch removes preserve home step as it is no longer needed. The latest build image has fixed the issue. Signed-off-by: Mykhailo Lohvynenko Reviewed-by: Mykola Kobets Reviewed-by: Oleksandr Grytsov --- .github/workflows/build_test.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build_test.yaml b/.github/workflows/build_test.yaml index fe5c507d..fa24cb84 100644 --- a/.github/workflows/build_test.yaml +++ b/.github/workflows/build_test.yaml @@ -33,10 +33,6 @@ jobs: BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory steps: - # Apply solution to "HOME is overridden for containers" problem: https://github.com/actions/runner/issues/863 - - name: Preserve $HOME set in the container - run: echo HOME=/root >> "$GITHUB_ENV" - - name: Checkout uses: actions/checkout@v4 with: From 5656bb190ad18ba3cff5f4e04787ee0b9f659e8e Mon Sep 17 00:00:00 2001 From: Mykhailo Lohvynenko Date: Wed, 10 Sep 2025 14:25:03 +0300 Subject: [PATCH 3/7] external: update submodules Signed-off-by: Mykhailo Lohvynenko Reviewed-by: Mykola Kobets Reviewed-by: Mykola Solianko Reviewed-by: Oleksandr Grytsov --- external/aos_core_lib_cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/aos_core_lib_cpp b/external/aos_core_lib_cpp index 2ddba726..9ea1bbef 160000 --- a/external/aos_core_lib_cpp +++ b/external/aos_core_lib_cpp @@ -1 +1 @@ -Subproject commit 2ddba726723cf9240611b653f856f534133757a5 +Subproject commit 9ea1bbefe83d86f07b9f273081d18721a29e64dc From 2f6cf28ee8455c53b8bb5111ff3b90b51896b36d Mon Sep 17 00:00:00 2001 From: Mykhailo Lohvynenko Date: Wed, 10 Sep 2025 14:32:17 +0300 Subject: [PATCH 4/7] downloader: sync with core lib interface changes Signed-off-by: Mykhailo Lohvynenko Reviewed-by: Mykola Kobets Reviewed-by: Mykola Solianko Reviewed-by: Oleksandr Grytsov --- include/downloader/downloader.hpp | 7 +++++-- src/downloader/downloader.cpp | 8 ++++++-- tests/downloader/downloader_test.cpp | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/include/downloader/downloader.hpp b/include/downloader/downloader.hpp index 65698911..a601f49b 100644 --- a/include/downloader/downloader.hpp +++ b/include/downloader/downloader.hpp @@ -33,10 +33,13 @@ class Downloader : public aos::downloader::DownloaderItf { * * @param url URL. * @param path path to file. - * @param contentType content type. + * @param targetType target type. + * @param targetID target ID. + * @param version version. * @return Error. */ - Error Download(const String& url, const String& path, aos::downloader::DownloadContent contentType) override; + Error Download(const String& url, const String& path, cloudprotocol::DownloadTarget targetType, + const String& targetID = "", const String& version = "") override; private: constexpr static std::chrono::milliseconds cDelay {1000}; diff --git a/src/downloader/downloader.cpp b/src/downloader/downloader.cpp index c9e1428f..7d6b739c 100644 --- a/src/downloader/downloader.cpp +++ b/src/downloader/downloader.cpp @@ -28,9 +28,13 @@ Downloader::~Downloader() mCondVar.notify_all(); } -Error Downloader::Download(const String& url, const String& path, aos::downloader::DownloadContent contentType) +Error Downloader::Download(const String& url, const String& path, cloudprotocol::DownloadTarget targetType, + const String& targetID, const String& version) { - LOG_DBG() << "Start download: url=" << url << ", path=" << path << ", contentType=" << contentType; + (void)targetID; + (void)version; + + LOG_DBG() << "Start download: url=" << url << ", path=" << path << ", contentType=" << targetType; return RetryDownload(url, path); } diff --git a/tests/downloader/downloader_test.cpp b/tests/downloader/downloader_test.cpp index 304d79b5..a96bfebc 100644 --- a/tests/downloader/downloader_test.cpp +++ b/tests/downloader/downloader_test.cpp @@ -63,7 +63,7 @@ TEST_F(DownloaderTest, Download) StartServer(); auto err = mDownloader.Download( - "http://localhost:8000/test_file.dat", mFilePath.c_str(), aos::downloader::DownloadContentEnum::eService); + "http://localhost:8000/test_file.dat", mFilePath.c_str(), aos::cloudprotocol::DownloadTargetEnum::eService); EXPECT_EQ(err, aos::ErrorEnum::eNone); EXPECT_TRUE(std::filesystem::exists(mFilePath)); @@ -79,7 +79,7 @@ TEST_F(DownloaderTest, Download) TEST_F(DownloaderTest, DownloadFileScheme) { auto err = mDownloader.Download( - "file://test_file.dat", mFilePath.c_str(), aos::downloader::DownloadContentEnum::eService); + "file://test_file.dat", mFilePath.c_str(), aos::cloudprotocol::DownloadTargetEnum::eService); EXPECT_EQ(err, aos::ErrorEnum::eNone); EXPECT_TRUE(std::filesystem::exists(mFilePath)); From 95fb8b0ac625876ba6ee99be256720dd00316878 Mon Sep 17 00:00:00 2001 From: Mykola Solianko Date: Thu, 18 Sep 2025 11:19:55 +0300 Subject: [PATCH 5/7] network: use vector instead static array for routing Signed-off-by: Mykola Solianko Reviewed-by: Oleksandr Grytsov Reviewed-by: Mykhailo Lohvynenko --- include/network/interfacemanager.hpp | 5 ++--- src/network/interfacemanager.cpp | 8 +++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/include/network/interfacemanager.hpp b/include/network/interfacemanager.hpp index 422edec8..0abeab5a 100644 --- a/include/network/interfacemanager.hpp +++ b/include/network/interfacemanager.hpp @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -203,7 +204,7 @@ class InterfaceManager : public sm::networkmanager::InterfaceManagerItf, * @param[out] routes routes. * @return Error. */ - Error GetRouteList(Array& routes) const; + Error GetRouteList(std::vector& routes) const; /** * Adds link. @@ -248,8 +249,6 @@ class InterfaceManager : public sm::networkmanager::InterfaceManagerItf, using LinkDeleter = std::function; using UniqueLink = std::unique_ptr; - static constexpr size_t cMaxRouteCount = 20; - RetWithError GetMasterInterfaceIndex() const; RetWithError CreateNetlinkSocket() const; RetWithError CreateLink() const; diff --git a/src/network/interfacemanager.cpp b/src/network/interfacemanager.cpp index 14e41baf..5408555e 100644 --- a/src/network/interfacemanager.cpp +++ b/src/network/interfacemanager.cpp @@ -437,7 +437,7 @@ Error InterfaceManager::SetMasterLink(const String& ifname, const String& master return ErrorEnum::eNone; } -Error InterfaceManager::GetRouteList(Array& routes) const +Error InterfaceManager::GetRouteList(std::vector& routes) const { LOG_DBG() << "List routes"; @@ -475,9 +475,7 @@ Error InterfaceManager::GetRouteList(Array& routes) const } } - if (err = routes.PushBack(info); !err.IsNone()) { - return AOS_ERROR_WRAP(err); - } + routes.push_back(std::move(info)); } return ErrorEnum::eNone; @@ -574,7 +572,7 @@ RetWithError InterfaceManager::GetMasterInterfaceIndex() const { LOG_DBG() << "Get master interface index"; - StaticArray routes; + std::vector routes; if (auto err = GetRouteList(routes); !err.IsNone()) { return {-1, err}; From 1ebc35d71d71731fc2333a4d500fab631a74cd5f Mon Sep 17 00:00:00 2001 From: Mykhailo Lohvynenko Date: Fri, 19 Sep 2025 18:41:53 +0300 Subject: [PATCH 6/7] external: update submodules Signed-off-by: Mykhailo Lohvynenko Reviewed-by: Mykola Kobets Reviewed-by: Oleksandr Grytsov --- external/aos_core_lib_cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/aos_core_lib_cpp b/external/aos_core_lib_cpp index 9ea1bbef..a489ba95 160000 --- a/external/aos_core_lib_cpp +++ b/external/aos_core_lib_cpp @@ -1 +1 @@ -Subproject commit 9ea1bbefe83d86f07b9f273081d18721a29e64dc +Subproject commit a489ba9507bd5784ddcd8b3b31e959dda153e17a From c72bcca606e8c4352cbd150600c07ecca62bad79 Mon Sep 17 00:00:00 2001 From: Mykhailo Lohvynenko Date: Fri, 3 Oct 2025 14:17:30 +0300 Subject: [PATCH 7/7] external: update submodules Signed-off-by: Mykhailo Lohvynenko Reviewed-by: Mykola Solianko Reviewed-by: Oleksandr Grytsov --- external/aos_core_lib_cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/aos_core_lib_cpp b/external/aos_core_lib_cpp index a489ba95..2f48d804 160000 --- a/external/aos_core_lib_cpp +++ b/external/aos_core_lib_cpp @@ -1 +1 @@ -Subproject commit a489ba9507bd5784ddcd8b3b31e959dda153e17a +Subproject commit 2f48d804f2c37f0ae521e0ae4ebd7964498d64c8