Skip to content

[Bug]: Server start is slowed down due to configuring unchanged backends #3763

@r4victor

Description

@r4victor

Steps to reproduce

  1. Configure an AWS backend in server/config.yml with regions omitted and creds.type=default.
  2. Start the server
  3. Restart the server with the same config again without changes.
  4. Observe that the backend is configured again (slow Applying configuration).

Actual behaviour

The server currently skips backend updates only if the parsed file config equals the current backend config. This comparison is unstable because it compares two different representations:

  • backend_config: user-intent config parsed from server/config.yml
  • current_backend_config: config reconstructed from the persisted backend state

Several configurators rewrite or enrich config during create_backend(), so an unchanged server/config.yml does
not round-trip back to the same model.

Examples:

  • AWS expands regions=None to DEFAULT_REGIONS.
  • GCP expands regions=None to DEFAULT_REGIONS.
  • Azure expands regions and may auto-create resource_group.
  • OCI expands regions and may generate compartment_id.

As a result, config sync treats unchanged backends as changed and re-runs backend updates, which can be slow.

Expected behaviour

Backends are not re-configured if the configuration is unchanged.

dstack version

master

Server logs

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions