Skip to content

Add FTP Capacity Block Expiration Notification Feature#144

Draft
jatinkulkarni wants to merge 2 commits intoaws:mainfrom
jatinkulkarni:main
Draft

Add FTP Capacity Block Expiration Notification Feature#144
jatinkulkarni wants to merge 2 commits intoaws:mainfrom
jatinkulkarni:main

Conversation

@jatinkulkarni
Copy link

Issue

Description of Changes

Implements FTP Capacity Block Expiration Notification feature for SageMaker extension. Adds three-tier notification system (30min, 10min, 2min warnings) to alert users before capacity block expiration, preventing unexpected data loss.

Key additions:

  • capacityBlockWarning.ts - notification display logic
  • constant.ts - CB notification constants and metadata interfaces
  • extension.ts - monitoring initialization, scheduling, cleanup
  • sagemaker.series - patch file registration

Technical highlights:

  • Handles setTimeout limits for long-duration blocks (>24 days) via 7-day periodic rechecks
  • Auto-reschedules if capacity block extended (1min tolerance)
  • Accounts for EC2's 30min shutdown window
  • Toast notifications at 30/10min, modal at 2min with "Save All" option

Testing

Tested via GitHub Actions workflow on feature branch with DISABLE_MANGLE=true. Build artifacts generated successfully. Verified notification scheduling logic and timeout handling.

Screenshots/Videos

Image Image (1)

Additional Notes

Changes limited to SageMaker-specific directories (patches/sagemaker/), enabling SageMaker team self-approval per CODEOWNERS. Feature enhances UX by preventing data loss during capacity block expiration with defensive error handling and graceful degradation.

Backporting

Consider backporting to supported version branches (1.0.x, 1.1.x) if needed for existing SageMaker deployments.


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

Comment on lines +10 to +15
+// Capacity Block notification constants
+export const THIRTY_MINUTES_INTERVAL_MILLIS = 30 * 60 * 1000;
+export const TEN_MINUTES_INTERVAL_MILLIS = 10 * 60 * 1000;
+export const TWO_MINUTES_INTERVAL_MILLIS = 2 * 60 * 1000;
+export const EC2_THIRTY_MINUTES_SHUTDOWN_MILLIS = 30 * 60 * 1000;
+export const CB_EXTENSION_TOLERANCE_MILLIS = 1 * 60 * 1000; // 1 minute tolerance for CB extension detection

Choose a reason for hiding this comment

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

Please remove hardcoded contants and read from env variables or atleast fall back to. This would make the IDE logic very rigid

sagemaker/sagemaker-ui-dark-theme.diff
sagemaker/sagemaker-ui-post-startup.diff
sagemaker/sagemaker-extension-smus-support.diff
sagemaker/sagemaker-extension-cb-notification.diff

Choose a reason for hiding this comment

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

Why can't we move under sagemaker-extension rather than creating a new one? Also can we make the client side logic generic while pushing the notifications from backend?

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.

2 participants