Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Return unused/rolled back scratch orgs to the pool #989

Closed

Description

@azlam-abdulsalam

During the execution of validate command, sfpowerscripts fetch a scratch org from the pool. Currently any scratch orgs fetched from the pool are assigned (update the status, so that its no longer available for any validate or fetch) and can't be reused. There are situations where a fetched scratch org can be returned to the pool.

The following scenarios are identified

  • The very first package during deployment failed. All failed packages are immediately rolled back without any side effects to the underlying org.
  • There is no change identified between the installed artifacts and the branch that is getting validated. While, this could be prevented by using a file filter, some CI/CD systems need additional scripts or plugins to ensure that validate command is executed only if there is a valid change

There could be future scenarios, where CI orgs aka pooled scratch orgs could be reused for validating an independent domain.

Creating scratch orgs are very flaky and a time consuming process (most large projects are in the 5+ hour window). So rather than throwing away the org, atleast a few could be reused to save from pool creation

Based on discusssion at https://github.com/Accenture/sfpowerscripts/discussions/962

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions