Skip to content

feat(hydro_aws): add AWS crate, SQS integration#2746

Open
MingweiSamuel wants to merge 3 commits into
mainfrom
mingwei/sqs-rebase
Open

feat(hydro_aws): add AWS crate, SQS integration#2746
MingweiSamuel wants to merge 3 commits into
mainfrom
mingwei/sqs-rebase

Conversation

@MingweiSamuel

@MingweiSamuel MingweiSamuel commented Apr 15, 2026

Copy link
Copy Markdown
Member

Not sure if this should land in hydro_std or a new e.g. hydro_aws (or even finer grain hydro_sqs) crate

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 15, 2026

Copy link
Copy Markdown

Deploying hydro with  Cloudflare Pages  Cloudflare Pages

Latest commit: c581e9d
Status: ✅  Deploy successful!
Preview URL: https://628c4b35.hydroflow.pages.dev
Branch Preview URL: https://mingwei-sqs-rebase.hydroflow.pages.dev

View logs

@MingweiSamuel MingweiSamuel force-pushed the mingwei/sqs-rebase branch 3 times, most recently from 0f2fc28 to 780922c Compare April 20, 2026 18:39
@MingweiSamuel MingweiSamuel changed the title feat(dfir_lang): sqs rebase wip feat(hydro_test): add example of AQS + SQS support Apr 20, 2026
@MingweiSamuel MingweiSamuel changed the title feat(hydro_test): add example of AQS + SQS support feat(hydro_test): add example of AWS + SQS support Apr 20, 2026
@MingweiSamuel MingweiSamuel marked this pull request as ready for review April 20, 2026 19:43
@MingweiSamuel MingweiSamuel requested review from a team and Copilot April 20, 2026 19:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an AWS + SQS integration example to hydro_test, gated behind new Cargo features, to demonstrate sourcing from and writing to SQS within Hydro flows.

Changes:

  • Introduce hydro_test::aws module with helpers to load AWS SDK config and build an SQS client.
  • Add SQS source/sink utilities and a runnable aws_sqs example.
  • Add feature flags (aws, aws_sqs) and wire the example to required-features.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
hydro_test/src/lib.rs Gate new aws module behind feature = "aws".
hydro_test/src/aws/mod.rs Add AWS SDK config source helper and stageleft rewrite mappings.
hydro_test/src/aws/sqs.rs Add SQS client/source/dest utilities.
hydro_test/examples/aws_sqs.rs Add deployment-backed example using the new SQS helpers.
hydro_test/Cargo.toml Add aws/aws_sqs features, optional AWS deps, and example feature gating.
Cargo.lock Pull in AWS SDK dependency graph.
.vscode/settings.json Enable aws_sqs feature for rust-analyzer by default.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread hydro_test/examples/aws_sqs.rs Outdated
Comment thread hydro_aws/examples/aws_sqs.rs
Comment thread hydro_test/src/aws/sqs.rs Outdated
Comment thread hydro_aws/src/sqs.rs
Comment thread hydro_aws/src/sqs.rs
Comment thread hydro_test/src/aws/sqs.rs Outdated
Comment thread hydro_aws/src/sqs.rs
Comment thread hydro_aws/src/sqs.rs
Comment thread hydro_aws/src/sqs.rs
Comment thread .vscode/settings.json Outdated
MingweiSamuel added a commit that referenced this pull request Apr 21, 2026
Changes made:
- Fix typo: `chaning` → `changing` in sqs.rs comment
- Replace concrete AWS account ID/queue URL with placeholders in example
- Weaken `source_sqs_fifo` guarantees from `TotalOrder`/`ExactlyOnce` to
  `NoOrder`/`AtLeastOnce` since SQS FIFO only guarantees ordering within a
  single message group; removed `NonDet` parameter; added detailed doc comment
- Add doc comment to `dest_sqs` noting it's for standard queues only (no
  `message_group_id` set)
- Add `features = ["alloc"]` to `futures-util` dependency for stream module
- Remove `aws_sqs` from `.vscode/settings.json` cargo features
- Improve `nondet!` justification comments in example
- Remove unused `TotalOrder` import from sqs.rs

Comments dismissed as incorrect/not actionable:
- EC2 hardcoded region/AMI: acceptable for an example
- Delete-before-return: already has TODO, AtLeastOnce marker is accurate
- `?` terminates stream on empty poll: intentional design (same as resolved)
- flat_map yields Vec not Message: wrong (Option iterates over inner Vec)

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
Comment thread .vscode/settings.json Outdated
Comment thread hydro_aws/src/sqs.rs
.map(q!(|(message, client)| self::sqs_send(
&client, queue_url, message
)))
.resolve_futures_blocking();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably split out APIs for side effecting resolve vs non side effecting.

MingweiSamuel added a commit that referenced this pull request Apr 22, 2026
Changes made:
- Fix typo: `chaning` → `changing` in sqs.rs comment
- Replace concrete AWS account ID/queue URL with placeholders in example
- Weaken `source_sqs_fifo` guarantees from `TotalOrder`/`ExactlyOnce` to
  `NoOrder`/`AtLeastOnce` since SQS FIFO only guarantees ordering within a
  single message group; removed `NonDet` parameter; added detailed doc comment
- Add doc comment to `dest_sqs` noting it's for standard queues only (no
  `message_group_id` set)
- Add `features = ["alloc"]` to `futures-util` dependency for stream module
- Remove `aws_sqs` from `.vscode/settings.json` cargo features
- Improve `nondet!` justification comments in example
- Remove unused `TotalOrder` import from sqs.rs

Comments dismissed as incorrect/not actionable:
- EC2 hardcoded region/AMI: acceptable for an example
- Delete-before-return: already has TODO, AtLeastOnce marker is accurate
- `?` terminates stream on empty poll: intentional design (same as resolved)
- flat_map yields Vec not Message: wrong (Option iterates over inner Vec)

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
akainth015 added a commit to akainth015/hydro that referenced this pull request Apr 27, 2026
- Add hydro_test/src/kafka/mod.rs with kafka_producer, kafka_consumer,
  dest_kafka, and setup_topic helpers following the SQS PR hydro-project#2746 pattern
- Complete hydro_test/examples/kafka.rs: leader produces 1M financial
  transactions, consumer cluster computes per-account balances
- Add 'kafka' feature flag gating rdkafka and futures-util as optional
  deps
- Add llvm-tools component to rust-toolchain.toml for rust-lld
akainth015 added a commit to akainth015/hydro that referenced this pull request Apr 27, 2026
- Add hydro_test/src/kafka/mod.rs with kafka_producer, kafka_consumer,
  dest_kafka, and setup_topic helpers following the SQS PR hydro-project#2746 pattern
- Complete hydro_test/examples/kafka.rs: leader produces 1M financial
  transactions, consumer cluster computes per-account balances
- Add 'kafka' feature flag gating rdkafka and futures-util as optional
  deps
- Add llvm-tools component to rust-toolchain.toml for rust-lld
akainth015 added a commit to akainth015/hydro that referenced this pull request Apr 27, 2026
- Add hydro_test/src/kafka/mod.rs with kafka_producer, kafka_consumer,
  dest_kafka, and setup_topic helpers following the SQS PR hydro-project#2746 pattern
- Complete hydro_test/examples/kafka.rs: leader produces 1M financial
  transactions, consumer cluster computes per-account balances
- Add 'kafka' feature flag gating rdkafka and futures-util as optional
  deps
- Add llvm-tools component to rust-toolchain.toml for rust-lld
akainth015 added a commit to akainth015/hydro that referenced this pull request Apr 27, 2026
- Add hydro_test/src/kafka/mod.rs with kafka_producer, kafka_consumer,
  dest_kafka, and setup_topic helpers following the SQS PR hydro-project#2746 pattern
- Complete hydro_test/examples/kafka.rs: leader produces 1M financial
  transactions, consumer cluster computes per-account balances
- Add 'kafka' feature flag gating rdkafka and futures-util as optional
  deps
- Add llvm-tools component to rust-toolchain.toml for rust-lld
akainth015 added a commit to akainth015/hydro that referenced this pull request Apr 27, 2026
- Add hydro_test/src/kafka/mod.rs with kafka_producer, kafka_consumer,
  dest_kafka, and setup_topic helpers following the SQS PR hydro-project#2746 pattern
- Complete hydro_test/examples/kafka.rs: leader produces 1M financial
  transactions, consumer cluster computes per-account balances
- Add 'kafka' feature flag gating rdkafka and futures-util as optional
  deps
- Add llvm-tools component to rust-toolchain.toml for rust-lld
MingweiSamuel added a commit that referenced this pull request Apr 28, 2026
MingweiSamuel added a commit that referenced this pull request Apr 28, 2026
MingweiSamuel added a commit that referenced this pull request Apr 28, 2026
MingweiSamuel added a commit that referenced this pull request Apr 28, 2026
- hydro_test/src/aws/sqs.rs: Replace redundant closures `|vec| futures_util::stream::iter(vec)` 
  with direct function reference `futures_util::stream::iter` (lines 45 and 70)
- hydro_test/examples/aws_sqs.rs: Replace explicit auto-deref `&*args.queue_url` with 
  `&args.queue_url` (lines 63 and 80)

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2746
akainth015 added a commit to akainth015/hydro that referenced this pull request May 1, 2026
- Add hydro_test/src/kafka/mod.rs with kafka_producer, kafka_consumer,
  dest_kafka, and setup_topic helpers following the SQS PR hydro-project#2746 pattern
- Complete hydro_test/examples/kafka.rs: leader produces 1M financial
  transactions, consumer cluster computes per-account balances
- Add 'kafka' feature flag gating rdkafka and futures-util as optional
  deps
- Add llvm-tools component to rust-toolchain.toml for rust-lld
akainth015 added a commit to akainth015/hydro that referenced this pull request May 1, 2026
- Add hydro_test/src/kafka/mod.rs with kafka_producer, kafka_consumer,
  dest_kafka, and setup_topic helpers following the SQS PR hydro-project#2746 pattern
- Complete hydro_test/examples/kafka.rs: leader produces 1M financial
  transactions, consumer cluster computes per-account balances
- Add 'kafka' feature flag gating rdkafka and futures-util as optional
  deps
- Add llvm-tools component to rust-toolchain.toml for rust-lld
akainth015 added a commit to akainth015/hydro that referenced this pull request May 1, 2026
- Add hydro_test/src/kafka/mod.rs with kafka_producer, kafka_consumer,
  dest_kafka, and setup_topic helpers following the SQS PR hydro-project#2746 pattern
- Complete hydro_test/examples/kafka.rs: leader produces 1M financial
  transactions, consumer cluster computes per-account balances
- Add 'kafka' feature flag gating rdkafka and futures-util as optional
  deps
- Add llvm-tools component to rust-toolchain.toml for rust-lld
MingweiSamuel added a commit that referenced this pull request May 2, 2026
MingweiSamuel added a commit that referenced this pull request May 2, 2026
MingweiSamuel added a commit that referenced this pull request May 2, 2026
MingweiSamuel added a commit that referenced this pull request May 2, 2026
- hydro_test/src/aws/sqs.rs: Replace redundant closures `|vec| futures_util::stream::iter(vec)` 
  with direct function reference `futures_util::stream::iter` (lines 45 and 70)
- hydro_test/examples/aws_sqs.rs: Replace explicit auto-deref `&*args.queue_url` with 
  `&args.queue_url` (lines 63 and 80)

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2746
MingweiSamuel added a commit that referenced this pull request May 2, 2026
MingweiSamuel added a commit that referenced this pull request May 2, 2026
Changes made:
- Fix typo: `chaning` → `changing` in sqs.rs comment
- Replace concrete AWS account ID/queue URL with placeholders in example
- Weaken `source_sqs_fifo` guarantees from `TotalOrder`/`ExactlyOnce` to
  `NoOrder`/`AtLeastOnce` since SQS FIFO only guarantees ordering within a
  single message group; removed `NonDet` parameter; added detailed doc comment
- Add doc comment to `dest_sqs` noting it's for standard queues only (no
  `message_group_id` set)
- Add `features = ["alloc"]` to `futures-util` dependency for stream module
- Remove `aws_sqs` from `.vscode/settings.json` cargo features
- Improve `nondet!` justification comments in example
- Remove unused `TotalOrder` import from sqs.rs

Comments dismissed as incorrect/not actionable:
- EC2 hardcoded region/AMI: acceptable for an example
- Delete-before-return: already has TODO, AtLeastOnce marker is accurate
- `?` terminates stream on empty poll: intentional design (same as resolved)
- flat_map yields Vec not Message: wrong (Option iterates over inner Vec)

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2746
akainth015 added a commit to akainth015/hydro that referenced this pull request May 4, 2026
- Add hydro_test/src/kafka/mod.rs with kafka_producer, kafka_consumer,
  dest_kafka, and setup_topic helpers following the SQS PR hydro-project#2746 pattern
- Complete hydro_test/examples/kafka.rs: leader produces 1M financial
  transactions, consumer cluster computes per-account balances
- Add 'kafka' feature flag gating rdkafka and futures-util as optional
  deps
- Add llvm-tools component to rust-toolchain.toml for rust-lld
MingweiSamuel added a commit that referenced this pull request May 5, 2026
Changes made:
- Fix typo: `chaning` → `changing` in sqs.rs comment
- Replace concrete AWS account ID/queue URL with placeholders in example
- Weaken `source_sqs_fifo` guarantees from `TotalOrder`/`ExactlyOnce` to
  `NoOrder`/`AtLeastOnce` since SQS FIFO only guarantees ordering within a
  single message group; removed `NonDet` parameter; added detailed doc comment
- Add doc comment to `dest_sqs` noting it's for standard queues only (no
  `message_group_id` set)
- Add `features = ["alloc"]` to `futures-util` dependency for stream module
- Remove `aws_sqs` from `.vscode/settings.json` cargo features
- Improve `nondet!` justification comments in example
- Remove unused `TotalOrder` import from sqs.rs

Comments dismissed as incorrect/not actionable:
- EC2 hardcoded region/AMI: acceptable for an example
- Delete-before-return: already has TODO, AtLeastOnce marker is accurate
- `?` terminates stream on empty poll: intentional design (same as resolved)
- flat_map yields Vec not Message: wrong (Option iterates over inner Vec)

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2746
MingweiSamuel added a commit that referenced this pull request May 8, 2026
MingweiSamuel added a commit that referenced this pull request May 8, 2026
MingweiSamuel added a commit that referenced this pull request May 8, 2026
MingweiSamuel added a commit that referenced this pull request May 8, 2026
- hydro_test/src/aws/sqs.rs: Replace redundant closures `|vec| futures_util::stream::iter(vec)` 
  with direct function reference `futures_util::stream::iter` (lines 45 and 70)
- hydro_test/examples/aws_sqs.rs: Replace explicit auto-deref `&*args.queue_url` with 
  `&args.queue_url` (lines 63 and 80)

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2746
MingweiSamuel added a commit that referenced this pull request May 8, 2026
MingweiSamuel added a commit that referenced this pull request May 8, 2026
Changes made:
- Fix typo: `chaning` → `changing` in sqs.rs comment
- Replace concrete AWS account ID/queue URL with placeholders in example
- Weaken `source_sqs_fifo` guarantees from `TotalOrder`/`ExactlyOnce` to
  `NoOrder`/`AtLeastOnce` since SQS FIFO only guarantees ordering within a
  single message group; removed `NonDet` parameter; added detailed doc comment
- Add doc comment to `dest_sqs` noting it's for standard queues only (no
  `message_group_id` set)
- Add `features = ["alloc"]` to `futures-util` dependency for stream module
- Remove `aws_sqs` from `.vscode/settings.json` cargo features
- Improve `nondet!` justification comments in example
- Remove unused `TotalOrder` import from sqs.rs

Comments dismissed as incorrect/not actionable:
- EC2 hardcoded region/AMI: acceptable for an example
- Delete-before-return: already has TODO, AtLeastOnce marker is accurate
- `?` terminates stream on empty poll: intentional design (same as resolved)
- flat_map yields Vec not Message: wrong (Option iterates over inner Vec)

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2746
MingweiSamuel added a commit that referenced this pull request May 12, 2026
MingweiSamuel added a commit that referenced this pull request May 12, 2026
MingweiSamuel added a commit that referenced this pull request May 12, 2026
MingweiSamuel and others added 3 commits June 18, 2026 21:37
PR: #2746

SQS working!

PR: #2746

cleanup sqs one-write code

PR: #2746

enable credentials-login feature for getting login from `aws` cli

PR: #2746

enable credentials-login feature for getting login from `aws` cli

PR: #2746

Fix clippy warnings in hydro_test SQS module

- hydro_test/src/aws/sqs.rs: Replace redundant closures `|vec| futures_util::stream::iter(vec)` 
  with direct function reference `futures_util::stream::iter` (lines 45 and 70)
- hydro_test/examples/aws_sqs.rs: Replace explicit auto-deref `&*args.queue_url` with 
  `&args.queue_url` (lines 63 and 80)

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2746

re-enable aws feature gating

PR: #2746

address PR #2746 review comments for AWS SQS support

Changes made:
- Fix typo: `chaning` → `changing` in sqs.rs comment
- Replace concrete AWS account ID/queue URL with placeholders in example
- Weaken `source_sqs_fifo` guarantees from `TotalOrder`/`ExactlyOnce` to
  `NoOrder`/`AtLeastOnce` since SQS FIFO only guarantees ordering within a
  single message group; removed `NonDet` parameter; added detailed doc comment
- Add doc comment to `dest_sqs` noting it's for standard queues only (no
  `message_group_id` set)
- Add `features = ["alloc"]` to `futures-util` dependency for stream module
- Remove `aws_sqs` from `.vscode/settings.json` cargo features
- Improve `nondet!` justification comments in example
- Remove unused `TotalOrder` import from sqs.rs

Comments dismissed as incorrect/not actionable:
- EC2 hardcoded region/AMI: acceptable for an example
- Delete-before-return: already has TODO, AtLeastOnce marker is accurate
- `?` terminates stream on empty poll: intentional design (same as resolved)
- flat_map yields Vec not Message: wrong (Option iterates over inner Vec)

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2746
- Populated the hydro_aws crate with code from hydro_test/src/aws/ (mod.rs
  and sqs.rs), adding #[cfg(stageleft_runtime)] hydro_lang::setup!() and
  renaming the feature gate from "aws_sqs" to "sqs".
- Configured hydro_aws/Cargo.toml as a published crate: publish = true,
  proper metadata (description, documentation, license, repository),
  features (sqs, stageleft_macro_entrypoint), dependencies (aws-config,
  aws-sdk-sqs, futures-util, ctor, hydro_lang, stageleft), build.rs with
  stageleft_tool::gen_final!(), and empty CHANGELOG.md.
- Moved hydro_test/examples/aws_sqs.rs to hydro_aws/examples/aws_sqs.rs,
  updated imports to use hydro_aws directly, and changed TrybuildHost
  features to ["sqs"].
- Removed hydro_test/src/aws/ directory, all AWS features/dependencies
  from hydro_test/Cargo.toml, and the pub mod aws declaration from lib.rs.
- Added hydro_aws to .github/workflows/release.yml explicit crate list
  and RELEASING.md example command.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2746
In aws-config 1.8.14, the `sso` feature (enabled by default) depended on
`dep:ring`. Starting from 1.8.16, this was replaced with `dep:sha1`,
eliminating the ring dependency entirely. Updated the version requirement
from "1" to "1.8.16" to ensure ring is never pulled in.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2746
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants