mirror of
https://github.com/Sea-Haven-Industries/procurement-ingest.git
synced 2026-10-07 16:08:54 +00:00
Merge c64b2999ce into 61ccc68877
This commit is contained in:
commit
8c9bce265c
1 changed files with 39 additions and 14 deletions
|
|
@ -1,29 +1,56 @@
|
||||||
"""CDK stack for the work order email ingestion pipeline."""
|
"""CDK stack for the work order email ingestion pipeline."""
|
||||||
|
|
||||||
import aws_cdk as cdk
|
import aws_cdk as cdk
|
||||||
|
import common
|
||||||
from aws_cdk import (
|
from aws_cdk import (
|
||||||
Duration,
|
Duration,
|
||||||
RemovalPolicy,
|
RemovalPolicy,
|
||||||
Stack,
|
Stack,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
aws_cloudwatch as cloudwatch,
|
aws_cloudwatch as cloudwatch,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
aws_cloudwatch_actions as cw_actions,
|
aws_cloudwatch_actions as cw_actions,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
aws_dynamodb as dynamodb,
|
aws_dynamodb as dynamodb,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
aws_iam as iam,
|
aws_iam as iam,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
aws_kms as kms,
|
aws_kms as kms,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
aws_lambda as lambda_,
|
aws_lambda as lambda_,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
aws_lambda_event_sources as lambda_event_sources,
|
aws_lambda_event_sources as lambda_event_sources,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
aws_s3 as s3,
|
aws_s3 as s3,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
aws_s3_notifications as s3n,
|
aws_s3_notifications as s3n,
|
||||||
aws_ses as ses,
|
)
|
||||||
aws_ses_actions as ses_actions,
|
from aws_cdk import (
|
||||||
aws_secretsmanager as secretsmanager,
|
aws_secretsmanager as secretsmanager,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
|
aws_ses as ses,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
|
aws_ses_actions as ses_actions,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
aws_sns as sns,
|
aws_sns as sns,
|
||||||
|
)
|
||||||
|
from aws_cdk import (
|
||||||
aws_sqs as sqs,
|
aws_sqs as sqs,
|
||||||
)
|
)
|
||||||
from constructs import Construct
|
from constructs import Construct
|
||||||
|
|
||||||
import common
|
|
||||||
|
|
||||||
|
|
||||||
class WorkorderIngestStack(Stack):
|
class WorkorderIngestStack(Stack):
|
||||||
def __init__(self, scope: Construct, construct_id: str, **kwargs):
|
def __init__(self, scope: Construct, construct_id: str, **kwargs):
|
||||||
|
|
@ -750,14 +777,12 @@ def _add_shoc_webhook_emitter(stack, work_orders_table, comments_table, alarm_to
|
||||||
shoc_emitter_rejected_queue.grant_send_messages(shoc_emitter)
|
shoc_emitter_rejected_queue.grant_send_messages(shoc_emitter)
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# SHIPS DARK: both event source mappings deploy with enabled=False,
|
# ACTIVATED (enabled=True) 2026-07-30 after SHOC's receiver passed the
|
||||||
# deliberately. The full stack (Lambda, queues, alarms, secret,
|
# shared HMAC test vectors. Shipped DARK originally (enabled=False) so the
|
||||||
# rotation) deploys and is testable with zero deliveries while SHOC
|
# stack could deploy and be tested with zero deliveries while SHOC had no
|
||||||
# has no receiver, so our merge cadence never depends on Luby's.
|
# receiver; this activation PR is the deliberate one-line flip (plan Phase
|
||||||
# Activation is a one-line enabled=True PR gated on the SHOC receiver
|
# 3). LATEST start position => the feed begins now, no historical flood;
|
||||||
# passing the shared HMAC test vectors (plan Phase 3). LATEST start
|
# SHOC backfills history via the procurement read API, not the stream.
|
||||||
# position => no historical flood at activation; SHOC loads history
|
|
||||||
# via the procurement read API instead.
|
|
||||||
# Ordering knobs: parallelization_factor=1, bisect_batch_on_error=
|
# Ordering knobs: parallelization_factor=1, bisect_batch_on_error=
|
||||||
# False and retry_attempts=-1 (retry until the 24h record age) are
|
# False and retry_attempts=-1 (retry until the 24h record age) are
|
||||||
# REQUIRED for strict per-work-order in-order delivery -- a retryable
|
# REQUIRED for strict per-work-order in-order delivery -- a retryable
|
||||||
|
|
@ -775,7 +800,7 @@ def _add_shoc_webhook_emitter(stack, work_orders_table, comments_table, alarm_to
|
||||||
max_record_age=Duration.hours(24),
|
max_record_age=Duration.hours(24),
|
||||||
parallelization_factor=1,
|
parallelization_factor=1,
|
||||||
report_batch_item_failures=True,
|
report_batch_item_failures=True,
|
||||||
enabled=False,
|
enabled=True,
|
||||||
on_failure=lambda_event_sources.SqsDlq(shoc_emitter_failures_queue),
|
on_failure=lambda_event_sources.SqsDlq(shoc_emitter_failures_queue),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -789,7 +814,7 @@ def _add_shoc_webhook_emitter(stack, work_orders_table, comments_table, alarm_to
|
||||||
max_record_age=Duration.hours(24),
|
max_record_age=Duration.hours(24),
|
||||||
parallelization_factor=1,
|
parallelization_factor=1,
|
||||||
report_batch_item_failures=True,
|
report_batch_item_failures=True,
|
||||||
enabled=False,
|
enabled=True,
|
||||||
on_failure=lambda_event_sources.SqsDlq(shoc_emitter_failures_queue),
|
on_failure=lambda_event_sources.SqsDlq(shoc_emitter_failures_queue),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue