Skip to content

Conversation

@Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Aug 21, 2025

This adds thresholds to our incremental deploy plan generation

  • If no local files are discovered.
  • Apply a maximum delete ratio TotalSyncRequests (<=100: 0.8, <=1000: 0.5, >1000: 0.2)`
  • Expose --delete-threshold to our deploy plan command. This will allow us to override the default threshold and force a manual deploy to go through if its legitimately exceeding the threshold.

Includes a bunch of data driven tests to validate several scenarios.

@elastic/docs-tech-leads this will mean a single update can at most delete 20% of the content. Is that too stringent?

- Introduced `deleteThreshold` parameter with a default value of 0.2
- Added plan validation for deletion ratio before writing the plan.

We will now fail and exit with a non zero exit code when the plan includes more deletions than the allowed ratio (0.2) or when the plan had no source files to begin with.
- Update delete ratio calculation to use `TotalSyncRequests` instead of `TotalFilesToSync`.
- Enforce stricter delete thresholds for low `TotalSyncRequests` (<100: 0.8, <1000: 0.5) to accommodate higher flux in new documentation.
@Mpdreamz Mpdreamz requested a review from a team as a code owner August 21, 2025 20:33
@Mpdreamz Mpdreamz added the fix label Aug 21, 2025
@Mpdreamz Mpdreamz self-assigned this Aug 21, 2025
@Mpdreamz Mpdreamz changed the title fix/deploy plan threshold Add --delete-threshold to deploy plan with some sane defaults. Aug 21, 2025
@shainaraskas
Copy link
Contributor

on board with 20%

@Mpdreamz Mpdreamz merged commit b47e41a into main Aug 26, 2025
19 checks passed
@Mpdreamz Mpdreamz deleted the fix/deploy-plan-threshold branch August 26, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants