Skip to content

feat(firehose) firehose client#6850

Merged
ekjotmultani merged 29 commits intofeat/amplify-firehose-client-featurefrom
feat/firehose-client-v2
Apr 15, 2026
Merged

feat(firehose) firehose client#6850
ekjotmultani merged 29 commits intofeat/amplify-firehose-client-featurefrom
feat/firehose-client-v2

Conversation

@ekjotmultani
Copy link
Copy Markdown
Member

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…structure (#6826)

feat(firehose): scaffold amplify_firehose_dart package

Create the Dart-only Firehose client package with:
- pubspec.yaml (SDK ^3.9.0, matching KDS dependency set)
- sdk.yaml for PutRecordBatch operation
- Generated Smithy SDK client (firehose_client, models, serializers)
- Firehose API limits (500 records, 1000 KB/record, 4 MB/batch)
- version.dart, analysis_options, dart_test.yaml, .gitignore
- Skeleton barrel export (amplify_firehose_dart.dart)
- Register Firehose component in root pubspec.yaml

No business logic yet
…che_dart

Create amplify_record_cache_dart package with shared caching infrastructure:
- RecordCacheException hierarchy (const constructors)
- Record/RecordInput models (partitionKey optional, dataSize caller-computed)
- RecordStorage base + SqliteRecordStorage, InMemoryRecordStorage, IndexedDbRecordStorage
- RecordCacheDatabase (Drift, parameterized dbPrefix)
- Sender interface + SendResult (replaces KDS-specific PutRecordsResult)
- RecordClient, AutoFlushScheduler, FlushStrategy, FlushData, RecordData, ClearCacheData
- Platform resolution (VM/web/stub conditional exports)

Update amplify_kinesis_dart to depend on shared package:
- KinesisSender implements Sender interface (sendBatch replaces putRecords)
- Partition key validation moved from RecordStorage to AmplifyKinesisClient
- createKinesisRecordInputNow computes dataSize with partition key
- All test imports updated, zero behavioral change
The aft generate workflows command regenerated the entire dependabot.yaml
with entries for many unrelated packages. Reverting to keep this PR scoped
to the record cache extraction only.
…lation

The barrel file was unconditionally exporting record_storage_indexeddb.dart
which imports dart:js_interop. This caused VM tests to fail with
"Dart library 'dart:js_interop' is not available on this platform".

IndexedDB storage is only reachable through the platform conditional
export (record_storage_platform_web.dart), not the barrel.
… validation test

Drift warns when multiple RecordCacheDatabase instances exist simultaneously.
Close the default client first, then reassign so tearDown handles cleanup.
The 10 MiB test record exceeded the 5 MiB batch limit, causing
getRecordsByStream to filter it out. Bumped to 20 MiB to match
the cache size.
All test files were using 5 MiB for maxBytesPerBatch, but the KDS
default was 10 MiB (matching maxRecordSizeBytes). This mismatch
caused getRecordsByStream to filter out records at the max size limit.
…ache

- AmplifyFirehoseException sealed hierarchy with .from() mapper
- FirehoseStorageException, FirehoseValidationException,
  FirehoseLimitExceededException, FirehoseUnknownException,
  FirehoseClientClosedException
- Depend on amplify_record_cache_dart for storage/caching infrastructure
- Re-export shared FlushStrategy, FlushData, RecordData, ClearCacheData
- Export Firehose SDK escape hatch types
- Exception mapping tests
- Slim pubspec: removed direct drift/web/db deps (now transitive via shared pkg)
… options

- FirehoseSender implements shared Sender interface (calls PutRecordBatch)
- AmplifyFirehoseClient with create(), record(), flush(), clearCache(),
  enable(), disable(), close() — mirrors KDS client structure
- AmplifyFirehoseClientOptions (cacheMaxBytes, maxRetries, flushStrategy)
- record() computes dataSize as data.length (no partition key)
- Uses shared RecordClient, AutoFlushScheduler, platform storage
- SDK escape hatch via firehoseClient getter
- withRecordClient constructor for testing
@ekjotmultani ekjotmultani changed the base branch from main to feat/record-cache-extraction-v2 April 7, 2026 16:41
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.22%. Comparing base (7664b1c) to head (e6ddd58).

Additional details and impacted files
@@                          Coverage Diff                          @@
##           feat/amplify-firehose-client-feature    #6850   +/-   ##
=====================================================================
  Coverage                                 43.22%   43.22%           
=====================================================================
  Files                                        99       99           
  Lines                                      7769     7769           
  Branches                                   3400     3400           
=====================================================================
  Hits                                       3358     3358           
  Misses                                     4411     4411           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…overySuggestion

- AmplifyFirehoseClient tests: initialization, record(), flush(),
  clearCache(), enable/disable, close, closed-state errors
- FirehoseSender tests: request building, response categorization
  (success/retryable/failed), empty records handling
- Remove unused defaultRecoverySuggestion from exception file
- Clean up pubspec_overrides (remove stale amplify_kinesis_dart override)
@ekjotmultani ekjotmultani changed the title featfirehose client v2 feat(firehose) firehose client v2 Apr 7, 2026
@ekjotmultani ekjotmultani changed the title feat(firehose) firehose client v2 feat(firehose) firehose client Apr 7, 2026
Restore detailed dartdoc comments on AmplifyKinesisClient methods
(create, kinesisClient, record, flush, clearCache, disable, close,
_wrapError) and the error code comment in KinesisSender that were
accidentally removed during the extraction rewrite.
…ing to empty string

KDS always provides a partition key. Using ?? '' silently hides bugs.
Use ! to assert non-null since KDS records always have partitionKey set.
…internal, document drift dev dep

- Export defaultRecoverySuggestion from shared barrel (remove hide clause)
- KDS exception file now uses the shared constant instead of its own
- Mark amplify_record_cache_dart as internal (publish_to: none)
- Add comment explaining why drift is a dev dependency in KDS
…g change

The table name in SQLite is derived from the Drift class name.
Renaming from KinesisRecords to CachedRecords would change the table
from 'kinesis_records' to 'cached_records', breaking existing users.

Firehose is in the Kinesis family so the name is semantically fine.
Regenerated .g.dart and updated all references.
…ache

- AmplifyFirehoseException sealed hierarchy with .from() mapper
- FirehoseStorageException, FirehoseValidationException,
  FirehoseLimitExceededException, FirehoseUnknownException,
  FirehoseClientClosedException
- Depend on amplify_record_cache_dart for storage/caching infrastructure
- Re-export shared FlushStrategy, FlushData, RecordData, ClearCacheData
- Export Firehose SDK escape hatch types
- Exception mapping tests
- Slim pubspec: removed direct drift/web/db deps (now transitive via shared pkg)
… options

- FirehoseSender implements shared Sender interface (calls PutRecordBatch)
- AmplifyFirehoseClient with create(), record(), flush(), clearCache(),
  enable(), disable(), close() — mirrors KDS client structure
- AmplifyFirehoseClientOptions (cacheMaxBytes, maxRetries, flushStrategy)
- record() computes dataSize as data.length (no partition key)
- Uses shared RecordClient, AutoFlushScheduler, platform storage
- SDK escape hatch via firehoseClient getter
- withRecordClient constructor for testing
…overySuggestion

- AmplifyFirehoseClient tests: initialization, record(), flush(),
  clearCache(), enable/disable, close, closed-state errors
- FirehoseSender tests: request building, response categorization
  (success/retryable/failed), empty records handling
- Remove unused defaultRecoverySuggestion from exception file
- Clean up pubspec_overrides (remove stale amplify_kinesis_dart override)
@ekjotmultani ekjotmultani force-pushed the feat/firehose-client-v2 branch from e1eec5f to 6e85034 Compare April 13, 2026 15:08
@ekjotmultani ekjotmultani marked this pull request as ready for review April 13, 2026 15:39
@ekjotmultani ekjotmultani requested a review from a team as a code owner April 13, 2026 15:39
@ekjotmultani ekjotmultani changed the base branch from feat/record-cache-extraction-v2 to feat/amplify-firehose-client-feature April 13, 2026 15:42
…ture' into feat/firehose-client-v2

# Conflicts:
#	packages/kinesis/amplify_firehose_dart/lib/amplify_firehose_dart.dart
#	packages/kinesis/amplify_firehose_dart/pubspec.yaml
Comment thread packages/kinesis/amplify_firehose_dart/lib/src/impl/firehose_sender.dart Outdated
…ameter

Both params always had the same value. Simplified to one storageName
used for both the SQLite database file name and IndexedDB store name.
Both KDS and Firehose senders had identical logic to split batch
responses into success/retryable/failed buckets. Extracted into
a shared splitResults() function in the record cache package,
matching the Android implementation pattern.
KDS uses different naming for SQLite (kinesis_records_$id) vs IndexedDB
(amplify_kinesis_$id). Updated dbPrefix to 'amplify_kinesis' and
storeName to 'kinesis_records' to match the released client. SQLite
database now uses storeName for file naming, dbPrefix for IndexedDB.
Firehose follows same pattern: amplify_firehose / firehose_records.
Remove generated and ephemeral files from aws_kinesis_datastreams/example/
and amplify_kinesis/example/ that were accidentally included in a
previous commit. These files (CDK outputs, Flutter ephemeral files,
iOS/macOS generated plugin registrants) should not be tracked.
The released KDS client on main uses 'amplify_kinesis_$identifier' for
the IndexedDB database name. The shared package concatenates
'$dbPrefix$identifier', so dbPrefix must include the trailing
underscore to produce the same name and avoid breaking existing
customers' cached data.

KDS: 'amplify_kinesis' → 'amplify_kinesis_'
Firehose: 'amplify_firehose' → 'amplify_firehose_'
@ekjotmultani ekjotmultani merged commit a756f48 into feat/amplify-firehose-client-feature Apr 15, 2026
20 of 21 checks passed
ekjotmultani added a commit that referenced this pull request Apr 16, 2026
* feat(firehose): amplify firehose client sdk generation and directory structure (#6826)

feat(firehose): scaffold amplify_firehose_dart package

Create the Dart-only Firehose client package with:
- pubspec.yaml (SDK ^3.9.0, matching KDS dependency set)
- sdk.yaml for PutRecordBatch operation
- Generated Smithy SDK client (firehose_client, models, serializers)
- Firehose API limits (500 records, 1000 KB/record, 4 MB/batch)
- version.dart, analysis_options, dart_test.yaml, .gitignore
- Skeleton barrel export (amplify_firehose_dart.dart)
- Register Firehose component in root pubspec.yaml

No business logic yet

* refactor(kinesis): extract shared record cache into amplify_record_cache_dart

Create amplify_record_cache_dart package with shared caching infrastructure:
- RecordCacheException hierarchy (const constructors)
- Record/RecordInput models (partitionKey optional, dataSize caller-computed)
- RecordStorage base + SqliteRecordStorage, InMemoryRecordStorage, IndexedDbRecordStorage
- RecordCacheDatabase (Drift, parameterized dbPrefix)
- Sender interface + SendResult (replaces KDS-specific PutRecordsResult)
- RecordClient, AutoFlushScheduler, FlushStrategy, FlushData, RecordData, ClearCacheData
- Platform resolution (VM/web/stub conditional exports)

Update amplify_kinesis_dart to depend on shared package:
- KinesisSender implements Sender interface (sendBatch replaces putRecords)
- Partition key validation moved from RecordStorage to AmplifyKinesisClient
- createKinesisRecordInputNow computes dataSize with partition key
- All test imports updated, zero behavioral change

* chore: revert dependabot.yaml changes from aft generate

The aft generate workflows command regenerated the entire dependabot.yaml
with entries for many unrelated packages. Reverting to keep this PR scoped
to the record cache extraction only.

* fix: remove IndexedDB storage from barrel export to fix VM test compilation

The barrel file was unconditionally exporting record_storage_indexeddb.dart
which imports dart:js_interop. This caused VM tests to fail with
"Dart library 'dart:js_interop' is not available on this platform".

IndexedDB storage is only reachable through the platform conditional
export (record_storage_platform_web.dart), not the barrel.

* fix(test): close default client before creating large-cache client in validation test

Drift warns when multiple RecordCacheDatabase instances exist simultaneously.
Close the default client first, then reassign so tearDown handles cleanup.

* fix(test): increase maxBytesPerBatch in large-cache validation test

The 10 MiB test record exceeded the 5 MiB batch limit, causing
getRecordsByStream to filter it out. Bumped to 20 MiB to match
the cache size.

* fix(test): use correct KDS maxBytesPerBatch (10 MiB) in all test files

All test files were using 5 MiB for maxBytesPerBatch, but the KDS
default was 10 MiB (matching maxRecordSizeBytes). This mismatch
caused getRecordsByStream to filter out records at the max size limit.

* feat(firehose): add exception hierarchy and depend on shared record cache

- AmplifyFirehoseException sealed hierarchy with .from() mapper
- FirehoseStorageException, FirehoseValidationException,
  FirehoseLimitExceededException, FirehoseUnknownException,
  FirehoseClientClosedException
- Depend on amplify_record_cache_dart for storage/caching infrastructure
- Re-export shared FlushStrategy, FlushData, RecordData, ClearCacheData
- Export Firehose SDK escape hatch types
- Exception mapping tests
- Slim pubspec: removed direct drift/web/db deps (now transitive via shared pkg)

* feat(firehose): add FirehoseSender, AmplifyFirehoseClient, and client options

- FirehoseSender implements shared Sender interface (calls PutRecordBatch)
- AmplifyFirehoseClient with create(), record(), flush(), clearCache(),
  enable(), disable(), close() — mirrors KDS client structure
- AmplifyFirehoseClientOptions (cacheMaxBytes, maxRetries, flushStrategy)
- record() computes dataSize as data.length (no partition key)
- Uses shared RecordClient, AutoFlushScheduler, platform storage
- SDK escape hatch via firehoseClient getter
- withRecordClient constructor for testing

* test(firehose): add client and sender tests, remove unused defaultRecoverySuggestion

- AmplifyFirehoseClient tests: initialization, record(), flush(),
  clearCache(), enable/disable, close, closed-state errors
- FirehoseSender tests: request building, response categorization
  (success/retryable/failed), empty records handling
- Remove unused defaultRecoverySuggestion from exception file
- Clean up pubspec_overrides (remove stale amplify_kinesis_dart override)

* docs: restore stripped doc comments and error code comment in KDS client

Restore detailed dartdoc comments on AmplifyKinesisClient methods
(create, kinesisClient, record, flush, clearCache, disable, close,
_wrapError) and the error code comment in KinesisSender that were
accidentally removed during the extraction rewrite.

* fix: assert non-null partitionKey in KinesisSender instead of defaulting to empty string

KDS always provides a partition key. Using ?? '' silently hides bugs.
Use ! to assert non-null since KDS records always have partitionKey set.

* chore: export defaultRecoverySuggestion from shared package, mark as internal, document drift dev dep

- Export defaultRecoverySuggestion from shared barrel (remove hide clause)
- KDS exception file now uses the shared constant instead of its own
- Mark amplify_record_cache_dart as internal (publish_to: none)
- Add comment explaining why drift is a dev dependency in KDS

* fix: rename Drift table class back to KinesisRecords to avoid breaking change

The table name in SQLite is derived from the Drift class name.
Renaming from KinesisRecords to CachedRecords would change the table
from 'kinesis_records' to 'cached_records', breaking existing users.

Firehose is in the Kinesis family so the name is semantically fine.
Regenerated .g.dart and updated all references.

* feat(firehose): add exception hierarchy and depend on shared record cache

- AmplifyFirehoseException sealed hierarchy with .from() mapper
- FirehoseStorageException, FirehoseValidationException,
  FirehoseLimitExceededException, FirehoseUnknownException,
  FirehoseClientClosedException
- Depend on amplify_record_cache_dart for storage/caching infrastructure
- Re-export shared FlushStrategy, FlushData, RecordData, ClearCacheData
- Export Firehose SDK escape hatch types
- Exception mapping tests
- Slim pubspec: removed direct drift/web/db deps (now transitive via shared pkg)

* feat(firehose): add FirehoseSender, AmplifyFirehoseClient, and client options

- FirehoseSender implements shared Sender interface (calls PutRecordBatch)
- AmplifyFirehoseClient with create(), record(), flush(), clearCache(),
  enable(), disable(), close() — mirrors KDS client structure
- AmplifyFirehoseClientOptions (cacheMaxBytes, maxRetries, flushStrategy)
- record() computes dataSize as data.length (no partition key)
- Uses shared RecordClient, AutoFlushScheduler, platform storage
- SDK escape hatch via firehoseClient getter
- withRecordClient constructor for testing

* test(firehose): add client and sender tests, remove unused defaultRecoverySuggestion

- AmplifyFirehoseClient tests: initialization, record(), flush(),
  clearCache(), enable/disable, close, closed-state errors
- FirehoseSender tests: request building, response categorization
  (success/retryable/failed), empty records handling
- Remove unused defaultRecoverySuggestion from exception file
- Clean up pubspec_overrides (remove stale amplify_kinesis_dart override)

* refactor: collapse dbPrefix and storeName into single storageName parameter

Both params always had the same value. Simplified to one storageName
used for both the SQLite database file name and IndexedDB store name.

* refactor: extract shared splitResults helper for response categorization

Both KDS and Firehose senders had identical logic to split batch
responses into success/retryable/failed buckets. Extracted into
a shared splitResults() function in the record cache package,
matching the Android implementation pattern.

* chore: format sender files

* Revert "chore: format sender files"

This reverts commit 566a03b.

* Reapply "chore: format sender files"

This reverts commit 9dadf7b.

* Revert "refactor: collapse dbPrefix and storeName into single storageName parameter"

This reverts commit 24a5655.

* fix: correct KDS storage names to match released client

KDS uses different naming for SQLite (kinesis_records_$id) vs IndexedDB
(amplify_kinesis_$id). Updated dbPrefix to 'amplify_kinesis' and
storeName to 'kinesis_records' to match the released client. SQLite
database now uses storeName for file naming, dbPrefix for IndexedDB.
Firehose follows same pattern: amplify_firehose / firehose_records.

* chore: remove accidentally committed untracked/ephemeral files

Remove generated and ephemeral files from aws_kinesis_datastreams/example/
and amplify_kinesis/example/ that were accidentally included in a
previous commit. These files (CDK outputs, Flutter ephemeral files,
iOS/macOS generated plugin registrants) should not be tracked.

* fix: add trailing underscore to dbPrefix for IndexedDB compatibility

The released KDS client on main uses 'amplify_kinesis_$identifier' for
the IndexedDB database name. The shared package concatenates
'$dbPrefix$identifier', so dbPrefix must include the trailing
underscore to produce the same name and avoid breaking existing
customers' cached data.

KDS: 'amplify_kinesis' → 'amplify_kinesis_'
Firehose: 'amplify_firehose' → 'amplify_firehose_'
ekjotmultani added a commit that referenced this pull request Apr 17, 2026
* feat(firehose): amplify firehose client sdk generation and directory structure (#6826)

feat(firehose): scaffold amplify_firehose_dart package

Create the Dart-only Firehose client package with:
- pubspec.yaml (SDK ^3.9.0, matching KDS dependency set)
- sdk.yaml for PutRecordBatch operation
- Generated Smithy SDK client (firehose_client, models, serializers)
- Firehose API limits (500 records, 1000 KB/record, 4 MB/batch)
- version.dart, analysis_options, dart_test.yaml, .gitignore
- Skeleton barrel export (amplify_firehose_dart.dart)
- Register Firehose component in root pubspec.yaml

No business logic yet

* refactor(kinesis): extract shared record cache into amplify_record_cache_dart

Create amplify_record_cache_dart package with shared caching infrastructure:
- RecordCacheException hierarchy (const constructors)
- Record/RecordInput models (partitionKey optional, dataSize caller-computed)
- RecordStorage base + SqliteRecordStorage, InMemoryRecordStorage, IndexedDbRecordStorage
- RecordCacheDatabase (Drift, parameterized dbPrefix)
- Sender interface + SendResult (replaces KDS-specific PutRecordsResult)
- RecordClient, AutoFlushScheduler, FlushStrategy, FlushData, RecordData, ClearCacheData
- Platform resolution (VM/web/stub conditional exports)

Update amplify_kinesis_dart to depend on shared package:
- KinesisSender implements Sender interface (sendBatch replaces putRecords)
- Partition key validation moved from RecordStorage to AmplifyKinesisClient
- createKinesisRecordInputNow computes dataSize with partition key
- All test imports updated, zero behavioral change

* chore: revert dependabot.yaml changes from aft generate

The aft generate workflows command regenerated the entire dependabot.yaml
with entries for many unrelated packages. Reverting to keep this PR scoped
to the record cache extraction only.

* fix: remove IndexedDB storage from barrel export to fix VM test compilation

The barrel file was unconditionally exporting record_storage_indexeddb.dart
which imports dart:js_interop. This caused VM tests to fail with
"Dart library 'dart:js_interop' is not available on this platform".

IndexedDB storage is only reachable through the platform conditional
export (record_storage_platform_web.dart), not the barrel.

* fix(test): close default client before creating large-cache client in validation test

Drift warns when multiple RecordCacheDatabase instances exist simultaneously.
Close the default client first, then reassign so tearDown handles cleanup.

* fix(test): increase maxBytesPerBatch in large-cache validation test

The 10 MiB test record exceeded the 5 MiB batch limit, causing
getRecordsByStream to filter it out. Bumped to 20 MiB to match
the cache size.

* fix(test): use correct KDS maxBytesPerBatch (10 MiB) in all test files

All test files were using 5 MiB for maxBytesPerBatch, but the KDS
default was 10 MiB (matching maxRecordSizeBytes). This mismatch
caused getRecordsByStream to filter out records at the max size limit.

* feat(firehose): add exception hierarchy and depend on shared record cache

- AmplifyFirehoseException sealed hierarchy with .from() mapper
- FirehoseStorageException, FirehoseValidationException,
  FirehoseLimitExceededException, FirehoseUnknownException,
  FirehoseClientClosedException
- Depend on amplify_record_cache_dart for storage/caching infrastructure
- Re-export shared FlushStrategy, FlushData, RecordData, ClearCacheData
- Export Firehose SDK escape hatch types
- Exception mapping tests
- Slim pubspec: removed direct drift/web/db deps (now transitive via shared pkg)

* feat(firehose): add FirehoseSender, AmplifyFirehoseClient, and client options

- FirehoseSender implements shared Sender interface (calls PutRecordBatch)
- AmplifyFirehoseClient with create(), record(), flush(), clearCache(),
  enable(), disable(), close() — mirrors KDS client structure
- AmplifyFirehoseClientOptions (cacheMaxBytes, maxRetries, flushStrategy)
- record() computes dataSize as data.length (no partition key)
- Uses shared RecordClient, AutoFlushScheduler, platform storage
- SDK escape hatch via firehoseClient getter
- withRecordClient constructor for testing

* test(firehose): add client and sender tests, remove unused defaultRecoverySuggestion

- AmplifyFirehoseClient tests: initialization, record(), flush(),
  clearCache(), enable/disable, close, closed-state errors
- FirehoseSender tests: request building, response categorization
  (success/retryable/failed), empty records handling
- Remove unused defaultRecoverySuggestion from exception file
- Clean up pubspec_overrides (remove stale amplify_kinesis_dart override)

* docs: restore stripped doc comments and error code comment in KDS client

Restore detailed dartdoc comments on AmplifyKinesisClient methods
(create, kinesisClient, record, flush, clearCache, disable, close,
_wrapError) and the error code comment in KinesisSender that were
accidentally removed during the extraction rewrite.

* fix: assert non-null partitionKey in KinesisSender instead of defaulting to empty string

KDS always provides a partition key. Using ?? '' silently hides bugs.
Use ! to assert non-null since KDS records always have partitionKey set.

* chore: export defaultRecoverySuggestion from shared package, mark as internal, document drift dev dep

- Export defaultRecoverySuggestion from shared barrel (remove hide clause)
- KDS exception file now uses the shared constant instead of its own
- Mark amplify_record_cache_dart as internal (publish_to: none)
- Add comment explaining why drift is a dev dependency in KDS

* fix: rename Drift table class back to KinesisRecords to avoid breaking change

The table name in SQLite is derived from the Drift class name.
Renaming from KinesisRecords to CachedRecords would change the table
from 'kinesis_records' to 'cached_records', breaking existing users.

Firehose is in the Kinesis family so the name is semantically fine.
Regenerated .g.dart and updated all references.

* feat(firehose): add exception hierarchy and depend on shared record cache

- AmplifyFirehoseException sealed hierarchy with .from() mapper
- FirehoseStorageException, FirehoseValidationException,
  FirehoseLimitExceededException, FirehoseUnknownException,
  FirehoseClientClosedException
- Depend on amplify_record_cache_dart for storage/caching infrastructure
- Re-export shared FlushStrategy, FlushData, RecordData, ClearCacheData
- Export Firehose SDK escape hatch types
- Exception mapping tests
- Slim pubspec: removed direct drift/web/db deps (now transitive via shared pkg)

* feat(firehose): add FirehoseSender, AmplifyFirehoseClient, and client options

- FirehoseSender implements shared Sender interface (calls PutRecordBatch)
- AmplifyFirehoseClient with create(), record(), flush(), clearCache(),
  enable(), disable(), close() — mirrors KDS client structure
- AmplifyFirehoseClientOptions (cacheMaxBytes, maxRetries, flushStrategy)
- record() computes dataSize as data.length (no partition key)
- Uses shared RecordClient, AutoFlushScheduler, platform storage
- SDK escape hatch via firehoseClient getter
- withRecordClient constructor for testing

* test(firehose): add client and sender tests, remove unused defaultRecoverySuggestion

- AmplifyFirehoseClient tests: initialization, record(), flush(),
  clearCache(), enable/disable, close, closed-state errors
- FirehoseSender tests: request building, response categorization
  (success/retryable/failed), empty records handling
- Remove unused defaultRecoverySuggestion from exception file
- Clean up pubspec_overrides (remove stale amplify_kinesis_dart override)

* refactor: collapse dbPrefix and storeName into single storageName parameter

Both params always had the same value. Simplified to one storageName
used for both the SQLite database file name and IndexedDB store name.

* refactor: extract shared splitResults helper for response categorization

Both KDS and Firehose senders had identical logic to split batch
responses into success/retryable/failed buckets. Extracted into
a shared splitResults() function in the record cache package,
matching the Android implementation pattern.

* chore: format sender files

* Revert "chore: format sender files"

This reverts commit 566a03b.

* Reapply "chore: format sender files"

This reverts commit 9dadf7b.

* Revert "refactor: collapse dbPrefix and storeName into single storageName parameter"

This reverts commit 24a5655.

* fix: correct KDS storage names to match released client

KDS uses different naming for SQLite (kinesis_records_$id) vs IndexedDB
(amplify_kinesis_$id). Updated dbPrefix to 'amplify_kinesis' and
storeName to 'kinesis_records' to match the released client. SQLite
database now uses storeName for file naming, dbPrefix for IndexedDB.
Firehose follows same pattern: amplify_firehose / firehose_records.

* chore: remove accidentally committed untracked/ephemeral files

Remove generated and ephemeral files from aws_kinesis_datastreams/example/
and amplify_kinesis/example/ that were accidentally included in a
previous commit. These files (CDK outputs, Flutter ephemeral files,
iOS/macOS generated plugin registrants) should not be tracked.

* fix: add trailing underscore to dbPrefix for IndexedDB compatibility

The released KDS client on main uses 'amplify_kinesis_$identifier' for
the IndexedDB database name. The shared package concatenates
'$dbPrefix$identifier', so dbPrefix must include the trailing
underscore to produce the same name and avoid breaking existing
customers' cached data.

KDS: 'amplify_kinesis' → 'amplify_kinesis_'
Firehose: 'amplify_firehose' → 'amplify_firehose_'
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