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

feat(pool): recover orphaned scratch orgs #1234

Merged
merged 5 commits into from
Feb 15, 2023

Conversation

azlam-abdulsalam
Copy link
Contributor

@azlam-abdulsalam azlam-abdulsalam commented Feb 15, 2023

Scratch orgs when created during prepare can be timed out at the client side (aka at the execution
of prepare), however these scratch orgs might get created in the backend and consume an active
limit, but is not recovered by sfpowerscripts upon delete. Users have to manually delete thes orgs
out or wait till these orgs are expired, so that the active limits are back.

This functionality uses description field to determine which scratch orgs were requested by sfpowerscripts and then
proceed to delete during an execution of prepare command before and after the pools are created

Checklist

All items have to be completed before a PR is merged

  • Adhere to Contribution Guidelines
  • Updates to Decision Records considered?
  • Updates to documentation at DX@Scale Guide considered?
  • Tested changes?
  • Unit Tests new and existing passing locally?

azlam-abdulsalam and others added 2 commits February 15, 2023 16:34
Scratch orgs when created during prepare can be timed out at the client side (aka at the execution
of prepare), however these scratch orgs might get created in the backend and consume an active
limit, but is not recovered by sfpowerscripts upon delete. Users have to manually delete thes orgs
out or wait till these orgs are expired, so that the active limits are back.
 This functionality
uses description filed to determine which scratch orgs were requested by sfpowerscripts and then
proceed to delete during an execution of prepare command before and after the pools are created
@codecov-commenter
Copy link

codecov-commenter commented Feb 15, 2023

Codecov Report

Base: 60.48% // Head: 60.48% // No change to project coverage 👍

Coverage data is based on head (ac9d899) compared to base (998d064).
Patch has no changes to coverable lines.

❗ Current head ac9d899 differs from pull request most recent head a0cac8b. Consider uploading reports for the commit a0cac8b to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1234   +/-   ##
=======================================
  Coverage   60.48%   60.48%           
=======================================
  Files          64       64           
  Lines        2126     2126           
  Branches      453      453           
=======================================
  Hits         1286     1286           
  Misses        788      788           
  Partials       52       52           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@azlam-abdulsalam azlam-abdulsalam added the enhancement enhancement to existing feature label Feb 15, 2023
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@9a17ea2). Click here to learn what that means.
Patch has no changes to coverable lines.

❗ Current head 741d33a differs from pull request most recent head 6b36e5a. Consider uploading reports for the commit 6b36e5a to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1234   +/-   ##
=======================================
  Coverage        ?   60.48%           
=======================================
  Files           ?       64           
  Lines           ?     2126           
  Branches        ?      453           
=======================================
  Hits            ?     1286           
  Misses          ?      788           
  Partials        ?       52           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@azlam-abdulsalam azlam-abdulsalam merged commit 0c18540 into main Feb 15, 2023
@azlam-abdulsalam azlam-abdulsalam deleted the feat/pool-scratchorg-enhancmeents branch February 15, 2023 06:08
azlam-abdulsalam added a commit that referenced this pull request Feb 15, 2023
azlam-abdulsalam added a commit that referenced this pull request Feb 15, 2023
Revert "feat(pool): recover orphaned scratch orgs (#1234)"

This reverts commit 0c18540.
azlam-abdulsalam added a commit that referenced this pull request Feb 16, 2023
* feat(pool): recover orphaned scratch orgs

Scratch orgs when created during prepare can be timed out at the client side (aka at the execution
of prepare), however these scratch orgs might get created in the backend and consume an active
limit, but is not recovered by sfpowerscripts upon delete. Users have to manually delete thes orgs
out or wait till these orgs are expired, so that the active limits are back.
 This functionality
uses description filed to determine which scratch orgs were requested by sfpowerscripts and then
proceed to delete during an execution of prepare command before and after the pools are created

* [CodeFactor] Apply fixes

* Apply suggestions from code review

---------

Co-authored-by: codefactor-io <support@codefactor.io>
azlam-abdulsalam added a commit that referenced this pull request Feb 16, 2023
* feat(pool): recover orphaned scratch orgs (#1234)

* feat(pool): recover orphaned scratch orgs

Scratch orgs when created during prepare can be timed out at the client side (aka at the execution
of prepare), however these scratch orgs might get created in the backend and consume an active
limit, but is not recovered by sfpowerscripts upon delete. Users have to manually delete thes orgs
out or wait till these orgs are expired, so that the active limits are back.
 This functionality
uses description filed to determine which scratch orgs were requested by sfpowerscripts and then
proceed to delete during an execution of prepare command before and after the pools are created

* [CodeFactor] Apply fixes

* Apply suggestions from code review

---------

Co-authored-by: codefactor-io <support@codefactor.io>

* fix(pool): move recovery of orphaned orgs to delete

recovery of oprhaned scratch orgs are moved to the delete command, with an addition of '-o' flag.
This will alllow the user to run dur

---------

Co-authored-by: codefactor-io <support@codefactor.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement enhancement to existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants