feat(hydro_aws): add AWS crate, SQS integration#2746
Open
MingweiSamuel wants to merge 3 commits into
Open
Conversation
74306c4 to
2fc30e0
Compare
Deploying hydro with
|
| Latest commit: |
c581e9d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://628c4b35.hydroflow.pages.dev |
| Branch Preview URL: | https://mingwei-sqs-rebase.hydroflow.pages.dev |
0f2fc28 to
780922c
Compare
ad30558 to
2ada126
Compare
2ada126 to
67c7bb3
Compare
Contributor
There was a problem hiding this comment.
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::awsmodule with helpers to load AWS SDK config and build an SQS client. - Add SQS source/sink utilities and a runnable
aws_sqsexample. - Add feature flags (
aws,aws_sqs) and wire the example torequired-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.
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>
shadaj
approved these changes
Apr 22, 2026
| .map(q!(|(message, client)| self::sqs_send( | ||
| &client, queue_url, message | ||
| ))) | ||
| .resolve_futures_blocking(); |
Member
There was a problem hiding this comment.
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>
c1c9479 to
636a8b4
Compare
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
636a8b4 to
2befe7c
Compare
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
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
2df53f5 to
273f1f7
Compare
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
273f1f7 to
8d8dd59
Compare
MingweiSamuel
added a commit
that referenced
this pull request
May 8, 2026
MingweiSamuel
added a commit
that referenced
this pull request
May 8, 2026
8d8dd59 to
2a3bae6
Compare
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not sure if this should land in hydro_std or a new e.g.
hydro_aws(or even finer grainhydro_sqs) crate