Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
aaabd49
feat: release workflow
Blindspot22 Mar 17, 2025
51c768a
Merge remote-tracking branch 'origin' into 340-release-update
Blindspot22 Mar 17, 2025
3296ab3
fix: update changes from review
Blindspot22 Mar 18, 2025
aae4d07
fix: added cron_script, add a check to ensure changes before release
Blindspot22 Mar 19, 2025
076aa8a
feat: adjusted functional release workflow
Blindspot22 Mar 20, 2025
0d6cdf2
feat: adjusted functional release workflow
Blindspot22 Mar 20, 2025
6644d1d
fix: switch action to maintained version
Blindspot22 Mar 20, 2025
f63283a
fix: switch action to maintained version
Blindspot22 Mar 20, 2025
6e4aeb7
branch switch
Blindspot22 Mar 20, 2025
220e3ae
fix: nix downgrade
Blindspot22 Mar 20, 2025
cd538b6
fix: nix update
Blindspot22 Mar 20, 2025
008768c
fix: nix update
Blindspot22 Mar 20, 2025
40e1eb5
fix: removed windows for pipeline success as it's not required for now
Blindspot22 Mar 20, 2025
4656c4d
new fixes
Blindspot22 Mar 20, 2025
34a286b
new fixes
Blindspot22 Mar 20, 2025
597a464
new fixes
Blindspot22 Mar 20, 2025
74660aa
fix: removed windows test for pipeline success as it's not required f…
Blindspot22 Mar 20, 2025
f99ab9f
fix: adjust tag and versioning
Blindspot22 Mar 21, 2025
b1a9f13
fix: adjust tag and versioning
Blindspot22 Mar 21, 2025
ce38748
feat: new update in version
Blindspot22 Mar 25, 2025
faf67d4
Merge remote-tracking branch 'origin' into 340-release-update
Blindspot22 Mar 25, 2025
023b64c
fix: resolving conflicts
Blindspot22 Mar 25, 2025
febce4d
feat: final adjustment and test
Blindspot22 Apr 4, 2025
c40e83e
fix: overindentation
Blindspot22 Apr 4, 2025
0e66574
fix: over indentation
Blindspot22 Apr 7, 2025
84b4994
Merge remote-tracking branch 'origin' into 340-release-update
Blindspot22 Apr 7, 2025
3cd0161
fix: over indentation
Blindspot22 Apr 7, 2025
afd1444
Update actions/upload-artifact to v4
Blindspot22 Apr 9, 2025
297bcd2
fix: unused imports
Blindspot22 Apr 10, 2025
8dba6cd
fix: unused imports
Blindspot22 Apr 10, 2025
dd9d121
fix: code format
Blindspot22 Apr 10, 2025
1362ded
removed unused import mongodb
Blindspot22 Apr 10, 2025
31e648c
adjust binary path
Blindspot22 Apr 10, 2025
955f4f0
adjust binary path
Blindspot22 Apr 10, 2025
2023935
Adding write permissions
Blindspot22 Apr 11, 2025
c1e66f2
feat: changes from review
Blindspot22 Apr 11, 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
104 changes: 104 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Release Workflow

on:
push:
tags:
- 'v*' # Trigger on tag push like v0.1.0
workflow_dispatch:
inputs:
dry_run:
description: 'Dry run (true/false)'
required: true
default: 'true'
skip_tests:
description: 'Skip tests (true/false)'
required: true
default: 'false'

permissions:
contents: write

env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- name: Cache Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/index
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build Project
run: cargo build --release --verbose

- name: Run Tests
if: ${{ github.event.inputs.skip_tests != 'true' }}
run: cargo test --verbose

- name: Save Release Binary
if: startsWith(github.ref, 'refs/tags/v')
run: |
mkdir -p release-artifacts
cp target/release/didcomm-mediator release-artifacts/
chmod +x release-artifacts/didcomm-mediator

- name: Upload Binary Artifact
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v4
with:
name: didcomm-mediator-binary
path: release-artifacts/

create_release:
name: Create Release
runs-on: ubuntu-latest
needs: build_and_test
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Binary Artifact
uses: actions/download-artifact@v4.1.8
with:
name: didcomm-mediator-binary
path: release-assets

- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2.1.0
with:
name: Release ${{ github.ref_name }}
draft: false
prerelease: ${{ contains(github.ref_name, 'rc') }}
files: |
release-assets/didcomm-mediator
body: |
## Release ${{ github.ref_name }}

This is the release of **didcomm-mediator-rs**, a Rust implementation of a mediator for the DIDComm v2 protocol.

### Key Features
- Basic Mediation Support for DIDComm v2
- Routing and Keylist Management
- Interoperability with existing SSI infrastructure
- Modular and extensible architecture
- Advanced error handling and transport-layer compliance development

### Getting Started
See the [README](https://github.com/adorsys/didcomm-mediator-rs#readme) for setup and usage instructions.

_This release was automatically generated from tag `${{ github.ref_name }}`._
44 changes: 13 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "didcomm-mediator"
version = "0.1.0"
version = "0.1.1"
authors = ["adorsys GmbH Co. KG"]
license = "Apache-2.0"
description = "A Rust Mediator for DIDComm messaging, supporting secure and decentralized communication."
Expand Down Expand Up @@ -73,9 +73,9 @@ anyhow = "1"
subtle = "2.6.1"
regex = "1.11.1"
mongodb = "3.1.1"
nix = "0.29.0"
once_cell = "1.20.2"
tower = "0.5"
nix = "0.29.0"
uuid = "1.11.0"
axum = "0.7.9"
tokio = "1.42.0"
Expand Down Expand Up @@ -105,7 +105,6 @@ aws-sdk-kms = "1.49"
base64ct = { version = "1.6.0", default-features = false }
zeroize = { version = "1.8.1", default-features = false }


[dependencies]
plugin-api.workspace = true

Expand Down
3 changes: 2 additions & 1 deletion crates/web-plugins/did-endpoint/src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ use did_utils::{
proof::{CryptoProof, EdDsaJcs2022, Proof, PROOF_TYPE_DATA_INTEGRITY_PROOF},
vc::{VerifiableCredential, VerifiablePresentation},
};

#[allow(unused_imports)]
use hyper::StatusCode;
use mongodb::bson::doc;
use multibase::Base;
use serde_json::{json, Value};
use std::{collections::HashMap, path::Path, sync::Arc};
Expand Down
36 changes: 18 additions & 18 deletions crates/web-plugins/didcomm-messaging/shared/src/breaker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@ use tokio::time::Sleep;
/// This struct implements a circuit breaker pattern, which helps prevent cascading failures when interacting with unreliable services.
/// It monitors the success and failure of operations and transitions between three states:
///
/// * **Closed:** The circuit is operating normally, and operations are allowed to proceed.
/// * **Open:** Operations are immediately rejected without being executed. This prevents overloading the failing service.
/// * **Half-Open:** After a timeout period, the circuit enters a half-open state, allowing a limited number of operations to be executed.
/// If the probe succeeds, the circuit closes; otherwise, it returns to the open state.
/// * **Closed:** The circuit is operating normally, and operations are allowed to proceed.
/// * **Open:** Operations are immediately rejected without being executed. This prevents overloading the failing service.
/// * **Half-Open:** After a timeout period, the circuit enters a half-open state, allowing a limited number of operations to be executed.
/// If the probe succeeds, the circuit closes; otherwise, it returns to the open state.
///
/// By default, the circuit breaker is configured with the following:
///
/// * No retry attempt after a failure.
/// * A default reset timeout of 30 seconds.
/// * One retry attempt in half-open state.
/// * No delay between retries.
/// * No retry attempt after a failure.
/// * A default reset timeout of 30 seconds.
/// * One retry attempt in half-open state.
/// * No delay between retries.
///
/// # Configuration
///
/// The behavior of the circuit breaker can be customized using the following builder methods:
///
/// * [`CircuitBreaker::retries(self, max_retries: usize)`]: Sets the maximum number of consecutive failures allowed before the circuit opens.
/// A value of 0 means the circuit will open on the first failure.
/// * [`CircuitBreaker::half_open_max_failures(self, max_retries: usize)`]: Sets the maximum number of attempts in half-open state
/// before reopening the circuit.
/// * [`CircuitBreaker::reset_timeout(self, reset_timeout: Duration)`]: Sets the duration the circuit remains open after tripping.
/// After this timeout, the circuit transitions to the half-open state.
/// * [`CircuitBreaker::exponential_backoff(self, initial_delay: Duration)`]: Configures an exponential backoff strategy for retries.
/// The delay between retries increases exponentially. This overrides any previously set backoff.
/// * [`CircuitBreaker::constant_backoff(self, delay: Duration)`]: Configures a constant backoff strategy for retries.
/// The delay between retries remains constant. This overrides any previously set backoff.
/// * [`CircuitBreaker::retries(self, max_retries: usize)`]: Sets the maximum number of consecutive failures allowed before the circuit opens.
/// A value of 0 means the circuit will open on the first failure.
/// * [`CircuitBreaker::half_open_max_failures(self, max_retries: usize)`]: Sets the maximum number of attempts in half-open state
/// before reopening the circuit.
/// * [`CircuitBreaker::reset_timeout(self, reset_timeout: Duration)`]: Sets the duration the circuit remains open after tripping.
/// After this timeout, the circuit transitions to the half-open state.
/// * [`CircuitBreaker::exponential_backoff(self, initial_delay: Duration)`]: Configures an exponential backoff strategy for retries.
/// The delay between retries increases exponentially. This overrides any previously set backoff.
/// * [`CircuitBreaker::constant_backoff(self, delay: Duration)`]: Configures a constant backoff strategy for retries.
/// The delay between retries remains constant. This overrides any previously set backoff.
///
/// # Example
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::doc_overindented_list_items)]
use super::*;

use std::sync::atomic::{AtomicUsize, Ordering};
Expand Down
Loading