Skip to content

[ER] Make Fleet Server wait timeout and retry period configurable in elastic-package for serverless provider #3078

@fred-maussion

Description

@fred-maussion

Problem

When using the serverless provider in elastic-package, the creation of a Serverless project includes a wait loop to detect the Fleet Server URL.

However:

  • The values retriesDefaultFleetServerTimeout and retriesDefaultFleetServerPeriod are hardcoded in the source code.
  • They cannot be overridden using the profile configuration.
  • In some environments (slow provisioning, high load...), Fleet takes longer than the default 10 seconds to become available.
  • This leads to premature failures during serverless environment setup.

Proposed Solution

Add two new profile configuration parameters:

  • stack.serverless.fleet.period
  • stack.serverless.fleet.timeout

These values should:

  1. Be read from the profile.
  2. Fallback to existing defaults if the configuration keys do not exist or are invalid.

Example configuration:
``ini
stack.serverless.fleet.period = "5"
stack.serverless.fleet.timeout = "60"


This would yield:
	•	Retry period: 5 seconds
	•	Retry timeout: 60 seconds
	•	Fallback to defaults: 2 seconds period, 10 seconds timeout

Expected Benefits
	•	More robust serverless project creation, especially in slower cloud regions.
	•	Better stability when Fleet Server initialization is delayed.
	•	Improved developer experience for contributors/debugging test failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions