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.

Prepare command creates too many Scratch Orgs when using snapshot pool #1105

Closed

Description

@domrycz

Describe the bug

When using sfpowerscripts:orchestrator:prepare command with pool config file which contains snapshotPool property, process creates as many scratch org as it sees in snapshot pool.
For example:
Pool A has maxAllocation set to 10 and snapshotPool set to pool B.
Prepare sees 0 scratch orgs in pool A and 13 in pool B.
It creates 13 scratch orgs in pool A (and leaves 0 in pool B).

To Reproduce

Use new snapshot property in pool config file.
Create a few scratch orgs in pool which is used as snapshot.
Then try to create less scratch orgs in pool which is based on snapshot one (and leave some of the scratch org still in snapshot pool).

Expected behavior
I want sfpowerscripts:orchestrator:prepare to look into given config file and keep the pool size at maximum level defined in maxAllocation property.

Platform Details (please complete the following information):

  • sfdx cli version: 7.159.0
  • powerscripts version: 18.1.3

Activity

  1. added
    analysis
    on Aug 18, 2022
  2. azlam-abdulsalam commented on Aug 18, 2022

    @azlam-abdulsalam
    Contributor

    Hi @domrycz ,

    Can you provide the two config files and the order of execution

  3. azlam-abdulsalam commented on Aug 18, 2022

    @azlam-abdulsalam
    Contributor

    Based on discussion with @dieffrei, this scenario is not accomodated, currently snapshot pool will utilise all the scratch orgs provided in the input pool. It doesn't respect max allocation in the pool which consumes snapshot.

    Current design only accomodate where parent pool and child pool has to have the exact number

  4. added
    enhancement
    and removed
    analysis
    on Aug 18, 2022
  5. domrycz commented on Aug 18, 2022

    @domrycz
    Author

    Cool, I was also talking with @dieffrei so I think we are on the same page now. I have understood that I can have one base pool with managed packages installed and then use this pool as a "base" for a few different pools.

  6. azlam-abdulsalam commented on Aug 18, 2022

    @azlam-abdulsalam
    Contributor

    We didn't think of this scenario;), but definitely looks like a valid use case. We will pick this up in September release

  7. added a commit that references this issue on Dec 5, 2022
    dbc3441
  8. added a commit that references this issue on Dec 5, 2022
    cfd21a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions