From 7ec617971dcc4a209ca390c7c6b293388b8e0aa5 Mon Sep 17 00:00:00 2001 From: pinodeca Date: Thu, 28 May 2026 08:00:32 -0500 Subject: [PATCH 1/2] docs: add public repository guidance --- CODE_OF_CONDUCT.md | 10 ++++++++++ CONTRIBUTING.md | 30 ++++++++++++++++++++++++++++++ README.md | 20 ++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..89fa0cc --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,10 @@ +# Microsoft Open Source Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). + +Resources: + +- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) +- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support) \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..34190dc --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,30 @@ +# Contributing + +This project welcomes contributions and suggestions. Most contributions require you to +agree to a Contributor License Agreement (CLA) declaring that you have the right to, +and actually do, grant us the rights to use your contribution. For details, visit +https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need +to provide a CLA and decorate the PR appropriately (for example, label or comment). +Simply follow the instructions provided by the bot. You will only need to do this once +across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +## Reporting security issues + +Please do not report security vulnerabilities through public GitHub issues. Follow the instructions in [SECURITY.md](SECURITY.md). + +## Development workflow + +Before opening a pull request, run the checks relevant to your change: + +```bash +cargo nextest run +cargo clippy --all-targets +``` + +If `cargo-nextest` is not available, use `cargo test` as a fallback. PostgreSQL-backed tests require `DATABASE_URL` to point to a test database. \ No newline at end of file diff --git a/README.md b/README.md index 88f56ac..c7d4c82 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,26 @@ Two test layers cover the Entra integration: - Fix: add `native-tls` feature to the `reqwest` dependency so HTTPS calls compiled into the crate (including AAD token acquisition for `connectWithEntra` / `connectWithSchemaAndEntra`) work end-to-end. Prior 0.1.32 binaries failed with `error sending request` / `invalid URL, scheme is not http` whenever Entra auth was used. +## Support + +Use GitHub Issues for bug reports and feature requests. Do not report security vulnerabilities through public GitHub issues; follow the instructions in [SECURITY.md](SECURITY.md) instead. + +## Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or comments. + +## Security + +Microsoft takes the security of our software products and services seriously. Please do not report security vulnerabilities through public GitHub issues. See [SECURITY.md](SECURITY.md) for security reporting instructions. + +## Privacy and Telemetry + +duroxide-pg does not send telemetry to Microsoft. Applications may configure their own database, logging, or metrics collection; those signals are controlled by the application owner. + +## Trademarks + +This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos is subject to those third-party policies. + ## License MIT License - see [LICENSE](LICENSE) for details. From 8415198a735edf6231d698b6a1d933839b339c66 Mon Sep 17 00:00:00 2001 From: pinodeca Date: Thu, 28 May 2026 08:21:21 -0500 Subject: [PATCH 2/2] docs: add copyright headers --- migrations/0001_initial_schema.sql | 3 +++ migrations/0002_create_stored_procedures.sql | 3 +++ migrations/0003_add_attempt_count.sql | 3 +++ migrations/0004_update_stored_procedures_for_attempt_count.sql | 3 +++ migrations/0005_add_visible_at_to_worker_queue.sql | 3 +++ migrations/0006_use_rust_timestamps.sql | 3 +++ migrations/0007_add_execution_state_support.sql | 3 +++ migrations/0008_remove_execution_state.sql | 3 +++ migrations/0009_add_activity_cancellation_support.sql | 3 +++ migrations/0010_add_deletion_and_pruning_support.sql | 3 +++ migrations/0011_fix_cancellation_ordering.sql | 3 +++ migrations/0012_require_timestamps.sql | 3 +++ migrations/0013_add_capability_filtering.sql | 3 +++ migrations/0014_add_session_support.sql | 3 +++ migrations/0015_add_custom_status.sql | 3 +++ migrations/0016_add_activity_tags.sql | 3 +++ migrations/0017_retry_orchestration_fetch_on_contention.sql | 3 +++ migrations/0018_add_kv_store.sql | 3 +++ migrations/0019_add_kv_last_updated.sql | 3 +++ migrations/0020_add_kv_delta.sql | 3 +++ migrations/0021_add_get_instance_stats.sql | 3 +++ pg-stress/src/bin/pg-stress.rs | 3 +++ pg-stress/src/lib.rs | 3 +++ scripts/cleanup_test_schemas.sh | 3 +++ scripts/generate_migration_diff.py | 3 +++ scripts/generate_migration_diff.sh | 3 +++ scripts/measure-server-performance.sh | 3 +++ scripts/provision_entra_ci_pg.sh | 3 +++ scripts/provision_entra_test_pg.sh | 3 +++ scripts/start-measurement.sh | 3 +++ scripts/stop-measurement.sh | 3 +++ scripts/teardown_entra_ci_pg.sh | 3 +++ scripts/teardown_entra_test_pg.sh | 3 +++ src/entra.rs | 3 +++ src/lib.rs | 3 +++ src/migrations.rs | 3 +++ src/provider.rs | 3 +++ tests/basic_tests.rs | 3 +++ tests/cached_plan_retryable_test.rs | 3 +++ tests/common/mod.rs | 3 +++ tests/concurrent_migration_tests.rs | 3 +++ tests/continue_as_new_stress_tests.rs | 3 +++ tests/e2e_samples.rs | 3 +++ tests/entra_live_test.rs | 3 +++ tests/migration_policy_tests.rs | 3 +++ tests/native_tls_regression.rs | 3 +++ tests/postgres_provider_test.rs | 3 +++ tests/regression_tests.rs | 3 +++ tests/session_e2e_tests.rs | 3 +++ tests/stress_tests.rs | 3 +++ 50 files changed, 150 insertions(+) diff --git a/migrations/0001_initial_schema.sql b/migrations/0001_initial_schema.sql index 766b9b5..290125a 100644 --- a/migrations/0001_initial_schema.sql +++ b/migrations/0001_initial_schema.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0001_initial_schema.sql -- Description: Creates initial schema for Duroxide PostgreSQL provider -- This migration will be executed with schema-qualified names via the migration runner diff --git a/migrations/0002_create_stored_procedures.sql b/migrations/0002_create_stored_procedures.sql index c3427ba..3bcf509 100644 --- a/migrations/0002_create_stored_procedures.sql +++ b/migrations/0002_create_stored_procedures.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration 0002: Create stored procedures for PostgreSQL provider -- This migration creates schema-qualified stored procedures to replace inline SQL queries -- Note: This migration runs with SET LOCAL search_path TO {schema_name}, so procedures diff --git a/migrations/0003_add_attempt_count.sql b/migrations/0003_add_attempt_count.sql index 446621b..a61746b 100644 --- a/migrations/0003_add_attempt_count.sql +++ b/migrations/0003_add_attempt_count.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0003_add_attempt_count.sql -- Description: Adds attempt_count column for poison message detection (duroxide 0.1.2) -- This column tracks how many times a message has been fetched for processing diff --git a/migrations/0004_update_stored_procedures_for_attempt_count.sql b/migrations/0004_update_stored_procedures_for_attempt_count.sql index 0737662..9886fb8 100644 --- a/migrations/0004_update_stored_procedures_for_attempt_count.sql +++ b/migrations/0004_update_stored_procedures_for_attempt_count.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0004_update_stored_procedures_for_attempt_count.sql -- Description: Updates stored procedures to support attempt_count for poison message detection -- This migration updates procedures that were created in 0002 to work with the attempt_count diff --git a/migrations/0005_add_visible_at_to_worker_queue.sql b/migrations/0005_add_visible_at_to_worker_queue.sql index 80c10a0..adeda44 100644 --- a/migrations/0005_add_visible_at_to_worker_queue.sql +++ b/migrations/0005_add_visible_at_to_worker_queue.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0005_add_visible_at_to_worker_queue.sql -- Description: Adds visible_at column to worker_queue for delayed visibility (duroxide 0.1.5) -- This provides consistent visibility semantics between orchestrator_queue and worker_queue. diff --git a/migrations/0006_use_rust_timestamps.sql b/migrations/0006_use_rust_timestamps.sql index 7ba6ee1..88fd32c 100644 --- a/migrations/0006_use_rust_timestamps.sql +++ b/migrations/0006_use_rust_timestamps.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0006_use_rust_timestamps.sql -- Description: Updates all stored procedures to use Rust-provided timestamps (p_now_ms) -- instead of database NOW(). This ensures consistent time handling between the application diff --git a/migrations/0007_add_execution_state_support.sql b/migrations/0007_add_execution_state_support.sql index 988e55e..1ff4fe1 100644 --- a/migrations/0007_add_execution_state_support.sql +++ b/migrations/0007_add_execution_state_support.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0007_add_execution_state_support.sql -- Description: Updates fetch_work_item and renew_work_item_lock to return ExecutionState -- Required for duroxide 0.1.7 activity cancellation support diff --git a/migrations/0008_remove_execution_state.sql b/migrations/0008_remove_execution_state.sql index 48f8d31..a3a5e1d 100644 --- a/migrations/0008_remove_execution_state.sql +++ b/migrations/0008_remove_execution_state.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0008_remove_execution_state.sql -- Description: Removes ExecutionState from fetch_work_item and renew_work_item_lock -- Required for duroxide main branch which removed ExecutionState from provider API diff --git a/migrations/0009_add_activity_cancellation_support.sql b/migrations/0009_add_activity_cancellation_support.sql index e267137..d156d80 100644 --- a/migrations/0009_add_activity_cancellation_support.sql +++ b/migrations/0009_add_activity_cancellation_support.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0009_add_activity_cancellation_support.sql -- Description: Adds support for activity cancellation via lock stealing -- Required for duroxide main branch which adds cancelled_activities to ack_orchestration_item diff --git a/migrations/0010_add_deletion_and_pruning_support.sql b/migrations/0010_add_deletion_and_pruning_support.sql index 4395c88..c2696f0 100644 --- a/migrations/0010_add_deletion_and_pruning_support.sql +++ b/migrations/0010_add_deletion_and_pruning_support.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration 0010: Add deletion and pruning support -- This migration adds: -- 1. parent_instance_id column to instances table (for cascade deletion) diff --git a/migrations/0011_fix_cancellation_ordering.sql b/migrations/0011_fix_cancellation_ordering.sql index 2af6a5c..251cb7c 100644 --- a/migrations/0011_fix_cancellation_ordering.sql +++ b/migrations/0011_fix_cancellation_ordering.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0011_fix_cancellation_ordering.sql -- Description: Fixes the ordering of operations in ack_orchestration_item -- Required for duroxide 0.1.15 test: test_same_activity_in_worker_items_and_cancelled_is_noop diff --git a/migrations/0012_require_timestamps.sql b/migrations/0012_require_timestamps.sql index 9187e90..4a3b130 100644 --- a/migrations/0012_require_timestamps.sql +++ b/migrations/0012_require_timestamps.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0012_require_timestamps.sql -- Description: Aligns timestamp handling with duroxide-pg-opt. -- Stored procedure now accepts p_now_ms from Rust (app-server clock) diff --git a/migrations/0013_add_capability_filtering.sql b/migrations/0013_add_capability_filtering.sql index 0016493..b0889a9 100644 --- a/migrations/0013_add_capability_filtering.sql +++ b/migrations/0013_add_capability_filtering.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0013_add_capability_filtering.sql -- Description: Adds capability filtering support for provider-level version matching. -- Adds duroxide_version columns to executions table, updates fetch_orchestration_item diff --git a/migrations/0014_add_session_support.sql b/migrations/0014_add_session_support.sql index 3577301..7287a87 100644 --- a/migrations/0014_add_session_support.sql +++ b/migrations/0014_add_session_support.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0014_add_session_support.sql -- Description: Adds session affinity support for worker queue items. -- Creates sessions table, adds session_id column to worker_queue, diff --git a/migrations/0015_add_custom_status.sql b/migrations/0015_add_custom_status.sql index 854e0f5..a9a9abc 100644 --- a/migrations/0015_add_custom_status.sql +++ b/migrations/0015_add_custom_status.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0015_add_custom_status.sql -- Description: Adds custom status support for orchestration instances. -- Adds custom_status and custom_status_version columns to instances table, diff --git a/migrations/0016_add_activity_tags.sql b/migrations/0016_add_activity_tags.sql index 1b83539..44a4f5b 100644 --- a/migrations/0016_add_activity_tags.sql +++ b/migrations/0016_add_activity_tags.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration: 0016_add_activity_tags.sql -- Description: Adds activity tag routing support for worker queue items. -- Adds tag column to worker_queue, updates enqueue_worker_work to accept tag, diff --git a/migrations/0017_retry_orchestration_fetch_on_contention.sql b/migrations/0017_retry_orchestration_fetch_on_contention.sql index 6831158..35d6c3c 100644 --- a/migrations/0017_retry_orchestration_fetch_on_contention.sql +++ b/migrations/0017_retry_orchestration_fetch_on_contention.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration 0017: Retry orchestration fetch on contention -- Description: Updates fetch_orchestration_item to continue searching for -- another eligible instance when the initially selected instance becomes locked diff --git a/migrations/0018_add_kv_store.sql b/migrations/0018_add_kv_store.sql index 8e5dde6..fdd38b3 100644 --- a/migrations/0018_add_kv_store.sql +++ b/migrations/0018_add_kv_store.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration 0018: Add KV store support -- Description: Adds a durable per-instance KV store, returns KV snapshots during orchestration fetch, -- materializes KV mutations during ack, and cleans up KV state during deletion/pruning. diff --git a/migrations/0019_add_kv_last_updated.sql b/migrations/0019_add_kv_last_updated.sql index 57fed14..ddb0c64 100644 --- a/migrations/0019_add_kv_last_updated.sql +++ b/migrations/0019_add_kv_last_updated.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration 0019: Add KV last-updated timestamps -- Description: Adds per-key last_updated_at_ms tracking, returns timestamped KV snapshots, -- materializes KV timestamps during ack, and preserves KV state across execution pruning. diff --git a/migrations/0020_add_kv_delta.sql b/migrations/0020_add_kv_delta.sql index e65cb1d..494d280 100644 --- a/migrations/0020_add_kv_delta.sql +++ b/migrations/0020_add_kv_delta.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration 0020: Add KV delta table -- Description: Captures current-execution KV mutations in kv_delta, merges them into -- kv_store only at execution completion boundaries, and cleans up delta rows on deletion. diff --git a/migrations/0021_add_get_instance_stats.sql b/migrations/0021_add_get_instance_stats.sql index 17ffb2a..3f967ba 100644 --- a/migrations/0021_add_get_instance_stats.sql +++ b/migrations/0021_add_get_instance_stats.sql @@ -1,3 +1,6 @@ +-- Copyright (c) Microsoft Corporation. +-- Licensed under the MIT License. + -- Migration 0021: Add get_instance_stats stored procedure -- Description: Moves the inline get_instance_stats queries into a single stored procedure, -- consolidating four round trips into one and correctly merging kv_delta + kv_store counts. diff --git a/pg-stress/src/bin/pg-stress.rs b/pg-stress/src/bin/pg-stress.rs index b4c7504..ca4eec3 100644 --- a/pg-stress/src/bin/pg-stress.rs +++ b/pg-stress/src/bin/pg-stress.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use clap::Parser; use duroxide_pg_stress::run_test_suite; use tracing_subscriber::EnvFilter; diff --git a/pg-stress/src/lib.rs b/pg-stress/src/lib.rs index 60d783e..a680dcd 100644 --- a/pg-stress/src/lib.rs +++ b/pg-stress/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! PostgreSQL Provider Stress Tests for Duroxide //! //! This library provides PostgreSQL-specific stress test implementations for Duroxide, diff --git a/scripts/cleanup_test_schemas.sh b/scripts/cleanup_test_schemas.sh index eff96f0..5032f8b 100755 --- a/scripts/cleanup_test_schemas.sh +++ b/scripts/cleanup_test_schemas.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Clean up all test schemas from the PostgreSQL database # Usage: ./scripts/cleanup_test_schemas.sh diff --git a/scripts/generate_migration_diff.py b/scripts/generate_migration_diff.py index 6ccdefc..62804dd 100755 --- a/scripts/generate_migration_diff.py +++ b/scripts/generate_migration_diff.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """Generate per-function migration diff with full context.""" import subprocess, sys, os, tempfile, textwrap diff --git a/scripts/generate_migration_diff.sh b/scripts/generate_migration_diff.sh index ff1649f..fa3f818 100755 --- a/scripts/generate_migration_diff.sh +++ b/scripts/generate_migration_diff.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Generate a per-function diff markdown file for a specific migration. # Usage: ./scripts/generate_migration_diff.sh # Example: ./scripts/generate_migration_diff.sh 9 diff --git a/scripts/measure-server-performance.sh b/scripts/measure-server-performance.sh index f9f9148..76316a6 100755 --- a/scripts/measure-server-performance.sh +++ b/scripts/measure-server-performance.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Measure server-side performance using pg_stat_statements # This script runs stress tests and compares server execution time vs network RTT diff --git a/scripts/provision_entra_ci_pg.sh b/scripts/provision_entra_ci_pg.sh index d6b138c..6913b34 100755 --- a/scripts/provision_entra_ci_pg.sh +++ b/scripts/provision_entra_ci_pg.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # One-time provisioning for the Entra-auth live test in GitHub Actions CI. # # What this creates (idempotent — safe to re-run): diff --git a/scripts/provision_entra_test_pg.sh b/scripts/provision_entra_test_pg.sh index 41021d1..7a4444e 100644 --- a/scripts/provision_entra_test_pg.sh +++ b/scripts/provision_entra_test_pg.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Provision an Azure Database for PostgreSQL Flexible Server suitable for # running `tests/entra_live_test.rs`. # diff --git a/scripts/start-measurement.sh b/scripts/start-measurement.sh index 268e0f3..ef3f3ad 100755 --- a/scripts/start-measurement.sh +++ b/scripts/start-measurement.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Start performance measurement by resetting pg_stat_statements set -e diff --git a/scripts/stop-measurement.sh b/scripts/stop-measurement.sh index 1f7af22..7c4b9ff 100755 --- a/scripts/stop-measurement.sh +++ b/scripts/stop-measurement.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Stop performance measurement and display pg_stat_statements results set -e diff --git a/scripts/teardown_entra_ci_pg.sh b/scripts/teardown_entra_ci_pg.sh index 95ad654..ebae85a 100755 --- a/scripts/teardown_entra_ci_pg.sh +++ b/scripts/teardown_entra_ci_pg.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Tear down the resources created by `provision_entra_ci_pg.sh`. # # Deletes: diff --git a/scripts/teardown_entra_test_pg.sh b/scripts/teardown_entra_test_pg.sh index 8f33b9e..1d80f0c 100644 --- a/scripts/teardown_entra_test_pg.sh +++ b/scripts/teardown_entra_test_pg.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Tear down the resource group created by `provision_entra_test_pg.sh`. # # Uses the same naming convention as the provision script. Override diff --git a/src/entra.rs b/src/entra.rs index fc680ff..cd10cf2 100644 --- a/src/entra.rs +++ b/src/entra.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! Microsoft Entra ID (formerly Azure Active Directory) authentication support //! for [`PostgresProvider`](crate::PostgresProvider). //! diff --git a/src/lib.rs b/src/lib.rs index 42a0642..7549f3a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! # Duroxide PostgreSQL Provider //! //! A PostgreSQL-based provider implementation for [Duroxide](https://crates.io/crates/duroxide), diff --git a/src/migrations.rs b/src/migrations.rs index eb3b6d3..2b03436 100644 --- a/src/migrations.rs +++ b/src/migrations.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use anyhow::Result; use include_dir::{include_dir, Dir}; use sqlx::Connection; diff --git a/src/provider.rs b/src/provider.rs index 9a33895..f6f69f9 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use anyhow::{Context, Result}; use chrono::{TimeZone, Utc}; use duroxide::providers::{ diff --git a/tests/basic_tests.rs b/tests/basic_tests.rs index 655de71..391be54 100644 --- a/tests/basic_tests.rs +++ b/tests/basic_tests.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use duroxide::providers::{ExecutionMetadata, Provider, TagFilter, WorkItem}; use duroxide::{Event, EventKind, INITIAL_EVENT_ID, INITIAL_EXECUTION_ID}; use duroxide_pg::PostgresProvider; diff --git a/tests/cached_plan_retryable_test.rs b/tests/cached_plan_retryable_test.rs index 0b007f9..b5dfa93 100644 --- a/tests/cached_plan_retryable_test.rs +++ b/tests/cached_plan_retryable_test.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! Tests that `cached plan must not change result type` (SQLSTATE 0A000) is //! handled as a retryable error, allowing transparent recovery when a stored //! procedure is replaced by a concurrent migration. diff --git a/tests/common/mod.rs b/tests/common/mod.rs index c2a4037..45fd660 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use duroxide::providers::{ExecutionMetadata, Provider, WorkItem}; use duroxide::{Event, EventKind}; use duroxide_pg::PostgresProvider; diff --git a/tests/concurrent_migration_tests.rs b/tests/concurrent_migration_tests.rs index 2c7d8d0..7f77180 100644 --- a/tests/concurrent_migration_tests.rs +++ b/tests/concurrent_migration_tests.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! Repro for https://github.com/microsoft/duroxide/issues/10 //! //! When multiple workers start simultaneously against a fresh database, diff --git a/tests/continue_as_new_stress_tests.rs b/tests/continue_as_new_stress_tests.rs index 1d4d482..9b454ff 100644 --- a/tests/continue_as_new_stress_tests.rs +++ b/tests/continue_as_new_stress_tests.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! Stress tests for continue-as-new functionality with PostgreSQL provider //! //! These tests verify that long-running orchestrations using continue-as-new diff --git a/tests/e2e_samples.rs b/tests/e2e_samples.rs index 4f69153..f045914 100644 --- a/tests/e2e_samples.rs +++ b/tests/e2e_samples.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! End-to-end samples: start here to learn the API by example. //! //! Each test demonstrates a common orchestration pattern using diff --git a/tests/entra_live_test.rs b/tests/entra_live_test.rs index afd34a2..56b3aa9 100644 --- a/tests/entra_live_test.rs +++ b/tests/entra_live_test.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! Live Entra ID smoke test against a real Azure Database for PostgreSQL. //! //! This test is `#[ignore]` by default and is opt-in via the diff --git a/tests/migration_policy_tests.rs b/tests/migration_policy_tests.rs index 2005dee..e619660 100644 --- a/tests/migration_policy_tests.rs +++ b/tests/migration_policy_tests.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! Tests for [`MigrationPolicy`] / [`ProviderConfig`] / `new_with_config`. //! //! These tests verify that: diff --git a/tests/native_tls_regression.rs b/tests/native_tls_regression.rs index 6f23e39..e96caec 100644 --- a/tests/native_tls_regression.rs +++ b/tests/native_tls_regression.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + // Regression test for the missing-TLS-backend bug in the resolved reqwest build. // // Background: `azure_core 0.35`'s `reqwest` feature activates diff --git a/tests/postgres_provider_test.rs b/tests/postgres_provider_test.rs index 94d727d..73be146 100644 --- a/tests/postgres_provider_test.rs +++ b/tests/postgres_provider_test.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use std::sync::{Arc, Once}; use duroxide::provider_validation::{ diff --git a/tests/regression_tests.rs b/tests/regression_tests.rs index 6679194..e0c82f3 100644 --- a/tests/regression_tests.rs +++ b/tests/regression_tests.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! Regression tests for duroxide-pg bugs. //! //! Each test in this file reproduces a specific bug that was reported and fixed. diff --git a/tests/session_e2e_tests.rs b/tests/session_e2e_tests.rs index 62cd878..e374a37 100644 --- a/tests/session_e2e_tests.rs +++ b/tests/session_e2e_tests.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + //! End-to-end tests for the activity session feature on PostgreSQL. //! //! Adapted from upstream duroxide `tests/session_e2e_tests.rs` and diff --git a/tests/stress_tests.rs b/tests/stress_tests.rs index 938279b..a34d24f 100644 --- a/tests/stress_tests.rs +++ b/tests/stress_tests.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use duroxide::provider_stress_tests::parallel_orchestrations::run_parallel_orchestrations_test_with_config; use duroxide::provider_stress_tests::StressTestConfig; use duroxide_pg_stress::PostgresStressFactory;