Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 2 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,6 @@ jobs:
run: rustup default ${{ matrix.toolchain }}
- name: Test no run
run: cargo test --offline --verbose --profile ${{ matrix.configuration }} --no-run
- name: Azure Login
uses: azure/login@v2
with:
client-id: ${{ secrets.DATAMOLE_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.DATAMOLE_AZURE_TENANT_ID }}
allow-no-subscriptions: true
- name: Test
run: cargo test --offline --verbose --profile ${{ matrix.configuration }}
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
Expand All @@ -296,6 +290,7 @@ jobs:
SPOTFLOW_DEVICE_SDK_TEST_INSTANCE: ${{ secrets.TEST_INSTANCE }}
SPOTFLOW_DEVICE_SDK_TEST_PROVISIONING_TOKEN: ${{ secrets.TEST_PROVISIONING_TOKEN }}
SPOTFLOW_DEVICE_SDK_TEST_WORKSPACE_ID: ${{ secrets.TEST_WORKSPACE_ID }}
SPOTFLOW_DEVICE_SDK_TEST_API_TOKEN: ${{ secrets.TEST_API_TOKEN }}
- name: Allow failures for nightly
run: true

Expand Down Expand Up @@ -753,3 +748,4 @@ jobs:
SPOTFLOW_DEVICE_SDK_TEST_INSTANCE: ${{ secrets.TEST_INSTANCE }}
SPOTFLOW_DEVICE_SDK_TEST_PROVISIONING_TOKEN: ${{ secrets.TEST_PROVISIONING_TOKEN }}
SPOTFLOW_DEVICE_SDK_TEST_WORKSPACE_ID: ${{ secrets.TEST_WORKSPACE_ID }}
SPOTFLOW_DEVICE_SDK_TEST_API_TOKEN: ${{ secrets.TEST_API_TOKEN }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ By contributing to `Device SDK for Spotflow IoT Platform`, you declare that:

## Contribution process

Please, always create an [Issue](https://github.com/spotflow-io/device-sdk/issues/new) before starting to work on a new feature or bug fix. This way, we can discuss the best approach and avoid duplicated or lost work. Without discussing the issue first, there is a risk that your PR will not be accepted because e.g.:
Please, always create an [Issue](https://github.com/spotflow-io/iot-platform-device-sdk/issues/new) before starting to work on a new feature or bug fix. This way, we can discuss the best approach and avoid duplicated or lost work. Without discussing the issue first, there is a risk that your PR will not be accepted because e.g.:

* It does not fit the project's goals.
* It is not implemented in the way that we would like to see.
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,9 @@ The script you ran before displays the values of the first three variables.
See the [documentation](https://docs.iot.spotflow.io/api/#authentication).

> **Note:** The API access token is short-term, so we recommend updating it before running the integration tests.
> This also means that you can't easily run the tests in a CI/CD pipeline (you'd need to update it before each run or approve all the Devices manually).
> The GitHub Actions of this repository use a different authentication mechanism which isn't publicly available (not even in the forks).
> We're working on a solution for this.
>
> Simple examples allow you to approve the Device manually.
>
> If you want to run the tests in a CI/CD pipeline, [create a service account](https://docs.iot.spotflow.io/api/reference/create-service-account), [assign the role](https://docs.iot.spotflow.io/api/reference/assign-role) of [`/workspaces/contributor`](https://docs.iot.spotflow.io/manage-access/roles#roles-reference) to the account, [add an API key](https://docs.iot.spotflow.io/api/reference/add-api-key) to the account, and use the returned secret as the value of `SPOTFLOW_DEVICE_SDK_TEST_API_TOKEN`.

### OpenSSL Compilation

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Reporting a Vulnerability

If a newly discovered vulnerability or security issue is discovered, we kindly ask our users and security researchers to disclose it privately and securely via the [GitHub Security Advisories (GHSA)](https://github.com/spotflow-io/device-sdk/security/advisories/new) feature on this repository. Please do not report vulnerabilities via GitHub issues or other public channels. Disclosing a vulnerability publicly might lead to a situation where a vulnerability is widely known, but no fix is yet available, thus harming other users.
If a newly discovered vulnerability or security issue is discovered, we kindly ask our users and security researchers to disclose it privately and securely via the [GitHub Security Advisories (GHSA)](https://github.com/spotflow-io/iot-platform-device-sdk/security/advisories/new) feature on this repository. Please do not report vulnerabilities via GitHub issues or other public channels. Disclosing a vulnerability publicly might lead to a situation where a vulnerability is widely known, but no fix is yet available, thus harming other users.

Alternatively, the report can be sent via email to `security@spotflow.io`. However, we prefer GHSA for security reasons.

Expand Down
2 changes: 1 addition & 1 deletion spotflow-c/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.2.1] - 2025-06-02
## [2.2.1] - 2025-09-03

### Changed

Expand Down
4 changes: 2 additions & 2 deletions spotflow-py/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.1.1] - 2025-06-02
## [2.1.1] - 2025-09-03

### Changed

- Updated links to documentation.
- Updated links to documentation and repository.

## [2.1.0] - 2025-04-09

Expand Down
2 changes: 1 addition & 1 deletion spotflow-py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ classifiers = [
[project.urls]
Homepage = "https://iot.spotflow.io/platform"
Documentation = "https://docs.iot.spotflow.io/device-sdk/python/"
Changelog = "https://github.com/spotflow-io/device-sdk/blob/main/spotflow-py/CHANGELOG.md"
Changelog = "https://github.com/spotflow-io/iot-platform-device-sdk/blob/main/spotflow-py/CHANGELOG.md"

[build-system]
requires = ["maturin>=1.0,<2.0"]
Expand Down
2 changes: 1 addition & 1 deletion spotflow/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.8.1] - 2025-06-02
## [0.8.1] - 2025-09-03

### Changed

Expand Down
6 changes: 1 addition & 5 deletions spotflow/src/iothub/eventloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,7 @@ impl EventLoop {
// Else we got PUBACK for stuff like reported properties update -- we can ignore these here
}
Packet::SubAck(ack) => {
if ack
.return_codes
.iter()
.any(|r| *r == SubscribeReasonCode::Failure)
{
if ack.return_codes.contains(&SubscribeReasonCode::Failure) {
// We just log here but we ignore the subscription failure. Worst case we do not receive C2D or other messages but the rest of SDK will continue working
log::warn!("Unable to subscribe to some topics");
}
Expand Down
8 changes: 0 additions & 8 deletions spotflow/src/persistence/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ use super::{

const DB_VERSION: &str = "1.2.0";

#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error(transparent)]
Sqlite(#[from] sqlx::Error),
#[error(transparent)]
Io(#[from] std::io::Error),
}

#[derive(Debug, Clone)]
pub struct SqliteStore {
conn: Arc<Mutex<SqliteConnection>>,
Expand Down
10 changes: 5 additions & 5 deletions spotflow/src/remote_access/connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub enum ConnectionError {
#[error("Failed to connect to the target port: {0}")]
TargetPortConnectionFailed(#[from] std::io::Error),
#[error("Failed to connect to the remote server: {0}")]
ServerConnectionFailed(#[from] tokio_tungstenite::tungstenite::Error),
ServerConnectionFailed(Box<tokio_tungstenite::tungstenite::Error>),
}

impl ConnectionManager {
Expand Down Expand Up @@ -301,14 +301,14 @@ async fn init_connection(
tokio::time::timeout(WEBSOCKET_CONNECTION_TIMEOUT, connect_async(request_builder))
.await
.map_err(|_| {
ConnectionError::ServerConnectionFailed(tokio_tungstenite::tungstenite::Error::Io(
std::io::Error::new(
ConnectionError::ServerConnectionFailed(Box::new(
tokio_tungstenite::tungstenite::Error::Io(std::io::Error::new(
std::io::ErrorKind::TimedOut,
"Connection to WebSocket timed out.",
),
)),
))
})?
.map_err(ConnectionError::ServerConnectionFailed)?;
.map_err(|e| ConnectionError::ServerConnectionFailed(Box::new(e)))?;

log::debug!("Connected to WebSocket for port {}", details.target_port);

Expand Down
1 change: 1 addition & 0 deletions spotflow/tests/remote_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use spotflow::DeviceClientBuilder;
mod common;

#[test]
#[ignore = "Authorization of service accounts is currently not supported for remote access endpoints"]
fn remote_access() {
env_logger::Builder::from_env(
env_logger::Env::default().default_filter_or("sqlx=warn,ureq=warn,rumqtt=warn,info"),
Expand Down
Loading