Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Ci fix #496

Merged
merged 29 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
89000cd
Modified condition to create default sample shadow directory
Oct 17, 2024
43159e9
Merge branch 'awslabs:main' into main
ig15 Nov 6, 2024
bbeb386
Updated versions in build.yml for aws credential fetch
ig15 Nov 6, 2024
f995850
Merge pull request #1 from ig15/ig15-update-version-for-aws-credentials
ig15 Nov 6, 2024
219900d
Updated build.yml to revert version of configure-aws-credentials to v1
ig15 Nov 6, 2024
01630a7
Updated aws-credentials fetching mechanism version in build.yml
ig15 Nov 6, 2024
8adb376
Merge branch 'awslabs:main' into main
ig15 Nov 6, 2024
047be94
Merge branch 'main' of https://github.com/awslabs/aws-iot-device-client
Nov 11, 2024
ddc87c6
Add job document comparator to ignore pre-signed difference in s3 url
Nov 11, 2024
8235bd3
Merge branch 'main' of https://github.com/ig15/ishangg-aws-iot-device…
Nov 11, 2024
8fad21a
Remove unit test for the compareJobsDocument and make it private
Nov 12, 2024
31044e7
Merge branch 'main' of https://github.com/awslabs/aws-iot-device-client
Nov 14, 2024
412a0da
Refactor compareJobDocuments comments
Nov 14, 2024
9b266d6
Merge branch 'awslabs:main' into main
ig15 Nov 14, 2024
4b587d6
Merge branch 'awslabs:main' into main
ig15 Nov 15, 2024
0942527
Fix clang-format in multiple files
Nov 20, 2024
0772be2
Merge branch 'main' of https://github.com/ig15/ishangg-aws-iot-device…
Nov 20, 2024
06f7fc7
Merge branch 'main' of https://github.com/ig15/ishangg-aws-iot-device…
Nov 20, 2024
0358776
Merge branch 'main' of https://github.com/awslabs/aws-iot-device-client
Nov 21, 2024
7abec1c
Merge branch 'main' of https://github.com/awslabs/aws-iot-device-client
Nov 26, 2024
abd2d5c
Merge branch 'main' of https://github.com/ig15/ishangg-aws-iot-device…
Mar 3, 2025
2070848
Send data from local service to the IOT tunnel in chunks
Mar 5, 2025
bbd61bd
Merge branch 'main' of https://github.com/awslabs/aws-iot-device-client
Mar 18, 2025
ebe72d5
Merge branch 'awslabs:main' into main
ig15 Mar 19, 2025
ae5e926
Merge branch 'main' of https://github.com/ig15/ishangg-aws-iot-device…
Mar 19, 2025
0acb956
Add new field in Config test
Mar 19, 2025
dd61e3d
Fix Lint CI workflow
Mar 19, 2025
b13d3f4
Fix cpp-check CI
Mar 19, 2025
97d30d3
Modify artifact names to support actions/upload-artifact@v4
Mar 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ jobs:
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.ubuntu.x64.${{ env.PACKAGE_NAME }}.static"
name: "DC.ubuntu.x64.${{ env.PACKAGE_NAME }}.build.static"
path: |
./build/${{ env.PACKAGE_NAME }}
- name: Archive setup files
uses: actions/upload-artifact@v4
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.ubuntu.x64.${{ env.PACKAGE_NAME }}.static"
name: "DC.ubuntu.x64.${{ env.PACKAGE_NAME }}.setup.static"
path: |
./setup/

Expand Down Expand Up @@ -81,15 +81,15 @@ jobs:
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.amazonlinux.x64.${{ env.PACKAGE_NAME }}.static"
name: "DC.amazonlinux.x64.${{ env.PACKAGE_NAME }}.build.static"
path: |
./build/${{ env.PACKAGE_NAME }}
- name: Archive setup files
uses: actions/upload-artifact@v4
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.amazonlinux.x64.${{ env.PACKAGE_NAME }}.static"
name: "DC.amazonlinux.x64.${{ env.PACKAGE_NAME }}.setup.static"
path: |
./setup/

Expand Down Expand Up @@ -121,15 +121,15 @@ jobs:
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.rhel.x64.${{ env.PACKAGE_NAME }}.static"
name: "DC.rhel.x64.${{ env.PACKAGE_NAME }}.build.static"
path: |
./build/${{ env.PACKAGE_NAME }}
- name: Archive setup files
uses: actions/upload-artifact@v4
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.rhel.x64.${{ env.PACKAGE_NAME }}.static"
name: "DC.rhel.x64.${{ env.PACKAGE_NAME }}.setup.static"
path: |
./setup/

Expand Down Expand Up @@ -215,15 +215,15 @@ jobs:
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.linux.armhf.${{ env.PACKAGE_NAME }}.static"
name: "DC.linux.armhf.${{ env.PACKAGE_NAME }}.build.static"
path: |
./build/${{ env.PACKAGE_NAME }}
- name: Archive setup files
uses: actions/upload-artifact@v4
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.linux.armhf.${{ env.PACKAGE_NAME }}.static"
name: "DC.linux.armhf.${{ env.PACKAGE_NAME }}.setup.static"
path: |
./setup/

Expand Down Expand Up @@ -255,15 +255,15 @@ jobs:
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.linux.mips.${{ env.PACKAGE_NAME }}.static"
name: "DC.linux.mips.${{ env.PACKAGE_NAME }}.build.static"
path: |
./build/${{ env.PACKAGE_NAME }}
- name: Archive setup files
uses: actions/upload-artifact@v4
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.linux.mips.${{ env.PACKAGE_NAME }}.static"
name: "DC.linux.mips.${{ env.PACKAGE_NAME }}.setup.static"
path: |
./setup/

Expand Down Expand Up @@ -295,15 +295,15 @@ jobs:
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.linux.aarch64.${{ env.PACKAGE_NAME }}.static"
name: "DC.linux.aarch64.${{ env.PACKAGE_NAME }}.build.static"
path: |
./build/${{ env.PACKAGE_NAME }}
- name: Archive setup files
uses: actions/upload-artifact@v4
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.linux.aarch64.${{ env.PACKAGE_NAME }}.static"
name: "DC.linux.aarch64.${{ env.PACKAGE_NAME }}.setup.static"
path: |
./setup/

Expand Down Expand Up @@ -335,15 +335,15 @@ jobs:
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.linux.ppc64.${{ env.PACKAGE_NAME }}.static"
name: "DC.linux.ppc64.${{ env.PACKAGE_NAME }}.build.static"
path: |
./build/${{ env.PACKAGE_NAME }}
- name: Archive setup files
uses: actions/upload-artifact@v4
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.linux.ppc64.${{ env.PACKAGE_NAME }}.static"
name: "DC.linux.ppc64.${{ env.PACKAGE_NAME }}.setup.static"
path: |
./setup/

Expand Down Expand Up @@ -375,15 +375,15 @@ jobs:
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.linux.ppc64le.${{ env.PACKAGE_NAME }}.static"
name: "DC.linux.ppc64le.${{ env.PACKAGE_NAME }}.build.static"
path: |
./build/${{ env.PACKAGE_NAME }}
- name: Archive setup files
uses: actions/upload-artifact@v4
# Run for main branch only
if: github.ref == 'refs/heads/main'
with:
name: "DC.linux.ppc64le.${{ env.PACKAGE_NAME }}.static"
name: "DC.linux.ppc64le.${{ env.PACKAGE_NAME }}.setup.static"
path: |
./setup/

Expand Down
8 changes: 4 additions & 4 deletions source/SharedCrtResourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ int SharedCrtResourceManager::buildClient(const PlainConfig &config)
"logging::enable-sdk-logging in your configuration file");
}

eventLoopGroup = unique_ptr<EventLoopGroup>(new EventLoopGroup(
1 // The number of threads used depends on your use-case. IF you have a maximum of less than
// a few hundred connections 1 thread is the ideal threadCount.
));
eventLoopGroup = unique_ptr<EventLoopGroup>(
new EventLoopGroup(1 // The number of threads used depends on your use-case. IF you have a maximum of less than
// a few hundred connections 1 thread is the ideal threadCount.
));
if (!eventLoopGroup)
{
// cppcheck-suppress nullPointerRedundantCheck
Expand Down
9 changes: 6 additions & 3 deletions source/shadow/ConfigShadow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ constexpr char ConfigShadow::TAG[];
constexpr char ConfigShadow::DEFAULT_CONFIG_SHADOW_NAME[];
constexpr int ConfigShadow::DEFAULT_WAIT_TIME_SECONDS;

void ConfigShadow::updateLocalConfigFile(PlainConfig &config, const char *configFilePath) const
void ConfigShadow::updateLocalConfigFile(const PlainConfig &config, const char *configFilePath) const
{
ofstream configFile(configFilePath);
JsonObject jsonObj;
Expand Down Expand Up @@ -411,7 +411,7 @@ void ConfigShadow::resetClientConfigWithJSON(
{
LOGM_WARN(TAG, "User-level config file does not exist: %s", userConfig.c_str());
}

// Check and update system-level config file
if (FileUtils::FileExists(Config::DEFAULT_SYSTEM_CONFIG_FILE))
{
Expand All @@ -420,7 +420,10 @@ void ConfigShadow::resetClientConfigWithJSON(
}
else
{
LOGM_WARN(TAG, "System-level config file does not exist or permission denied to open: %s", Config::DEFAULT_SYSTEM_CONFIG_FILE);
LOGM_WARN(
TAG,
"System-level config file does not exist or permission denied to open: %s",
Config::DEFAULT_SYSTEM_CONFIG_FILE);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/shadow/ConfigShadow.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ namespace Aws
* @param config device client local configuration
* @param configFilePath absolute file path of device client configuration
*/
void updateLocalConfigFile(PlainConfig &config, const char *configFilePath) const;
void updateLocalConfigFile(const PlainConfig &config, const char *configFilePath) const;
};
} // namespace Shadow
} // namespace DeviceClient
Expand Down
15 changes: 10 additions & 5 deletions source/tunneling/SecureTunnelingContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,25 +197,30 @@ namespace Aws
}

LOGM_DEBUG(TAG, "SecureTunnelingContext::OnTcpForwardDataReceive data.len=%zu", data.len);
const size_t MAX_CHUNK_SIZE = 32768;
const size_t MAX_CHUNK_SIZE = 32768;
size_t offset = 0;
size_t total_sent = 0;

while (offset < data.len)
{
size_t chunk_size = std::min(MAX_CHUNK_SIZE, data.len - offset);
Aws::Crt::ByteCursor chunk = aws_byte_cursor_from_array(data.buffer + offset, chunk_size);
int result = mSecureTunnel->SendData(chunk);
if (result != AWS_OP_SUCCESS)
{
LOGM_ERROR(TAG, "Failed to send data block to secure tunnel. Block size: %zu, Total bytes sent: %zu, Total size: %zu",
chunk_size, total_sent, data.len);
LOGM_ERROR(
TAG,
"Failed to send data block to secure tunnel. Block size: %zu, Total bytes sent: %zu, "
"Total size: %zu",
chunk_size,
total_sent,
data.len);
break;
}
offset += chunk_size;
total_sent += chunk_size;
}

if (total_sent == data.len)
{
LOGM_INFO(TAG, "Successfully sent data block. Total bytes sent: %zu", total_sent);
Expand Down
6 changes: 4 additions & 2 deletions test/config/TestConfigSerialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ TEST(SerializeConfigTestFixture, SerializeCompleteConfigTest)
}
},
"config-shadow": {
"enabled": true
"enabled": true,
"persistent-update": false
},
"sample-shadow": {
"enabled": true,
Expand Down Expand Up @@ -168,7 +169,8 @@ TEST(SerializeConfigTestFixture, SerializeBasicConfigTest)
}
},
"config-shadow": {
"enabled": true
"enabled": true,
"persistent-update": false
},
"sample-shadow": {
"enabled": true
Expand Down
5 changes: 2 additions & 3 deletions test/jobs/TestJobsFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,8 @@ TEST_F(TestJobsFeature, InvalidJobDocument)
*jobsMock,
publishUpdateJobExecutionStatusWithRetry(
JobExecutionEq(job),
StatusInfoEq(
JobsFeature::JobExecutionStatusInfo(
Iotjobs::JobStatus::REJECTED, "Unable to execute job, invalid job document provided!", "", "")),
StatusInfoEq(JobsFeature::JobExecutionStatusInfo(
Iotjobs::JobStatus::REJECTED, "Unable to execute job, invalid job document provided!", "", "")),
_,
_))
.Times(1);
Expand Down
10 changes: 4 additions & 6 deletions test/logging/TestLogQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ class LogQueueTest : public ::testing::Test
void SetUp() override
{
logQueue = unique_ptr<LogQueue>(new LogQueue);
logQueue->addLog(
unique_ptr<LogMessage>(
new LogMessage(LogLevel::DEBUG, "TAG", std::chrono::system_clock::now(), "Message 1")));
logQueue->addLog(
unique_ptr<LogMessage>(
new LogMessage(LogLevel::DEBUG, "TAG", std::chrono::system_clock::now(), "Message 2")));
logQueue->addLog(unique_ptr<LogMessage>(
new LogMessage(LogLevel::DEBUG, "TAG", std::chrono::system_clock::now(), "Message 1")));
logQueue->addLog(unique_ptr<LogMessage>(
new LogMessage(LogLevel::DEBUG, "TAG", std::chrono::system_clock::now(), "Message 2")));
}

public:
Expand Down
5 changes: 2 additions & 3 deletions test/util/TestFileUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@ TEST(FileUtils, handlesEmptyPathForStoreValueInFile)

TEST(FileUtils, testStoreValueInFile)
{
ASSERT_TRUE(
FileUtils::StoreValueInFile(
"This file was created as part of testStoreValueInFile unit test.", "/tmp/testStoreValueInFile.txt"));
ASSERT_TRUE(FileUtils::StoreValueInFile(
"This file was created as part of testStoreValueInFile unit test.", "/tmp/testStoreValueInFile.txt"));
}

TEST(FileUtils, assertsCorrectFilePermissions)
Expand Down
Loading