Replies: 15 comments 26 replies
-
Yes, very much so. With instant Hyperforce cloning (if it's coming back) you could do a refresh after each PR merge! IMO aligns very well with recent change Select Who Has Access To a Sandbox |
Beta Was this translation helpful? Give feedback.
-
It would be useful because you could perform this task with a non-UI user license, like the integration user, from the local CLI. Also, this task could be embedded in an automated pipeline, so that there's no need to login to the production org to do so. |
Beta Was this translation helpful? Give feedback.
-
My use for something like this would be to automatically refresh a staging environment that we use to test complex deployments, like those with pre or post tasks (apex scripts, data loads, manual changes) that are hard if not impossible to test safely in production. This is in a "post-UAT" state where we just want to validate and rehearse the deployment. Setting up a nightly job to refresh that sandbox so it's ready first-thing in my morning would mean I could get rocking on that task without having to wait for the sandbox lottery (earlier this week, a dev sandbox took 7.5 hours to refresh, which is atypical, but if I could have scripted it, that would have been great). Keeping the same sandbox name means I don't have to update URLs or anything for existing scripts that are prepared, just update an auth token. |
Beta Was this translation helpful? Give feedback.
-
Yes !! This is necessary for CI of org-dependent packages : every new package version should be installed in a refreshed sandbox for tests. My need is to designate 1 such sandbox and refresh it automatically every night + run post-install Apex, and keep the possibility to auth |
Beta Was this translation helpful? Give feedback.
-
Yes, please allow this. This would be useful to allow my team to initiate their own sandbox refreshes from a CI pipeline through an integration user. We currently have to use the Tooling API to allow this in our CI pipeline, but we would prefer to use the Salesforce CLI since we use the CLI for our deployment jobs. |
Beta Was this translation helpful? Give feedback.
-
I would love to see this feature implemented. My team and I always use the Salesforce UI for all our sandbox creation/refreshes, partly because there is no option in the CLI to refresh them and we are mostly refreshing sandboxes rather than creating new sandboxes. We have a bunch of predefined sandbox names that we reuse and they are configured with various jobs in our CI/CD for running tests, validating deployments, etc... Having sandbox refresh support in the CLI would also be benefical for automating the entire sandbox refresh process with CI/CD systems. Currently we have team members manually performing refreshes, this occurs during common work hours and can lead to some false-postive build failures as the environments get activated and replaced. So being able to schedule a refresh to occur during the night when it is less likely to conflict with others would be ideal. Additionally, as others have mentioned we would like to be able to limit the number of users that have access to Production. Many of our team members have access to Production for the purpose of being able to create/refresh sandboxes. So if we were able to provide our team with the ability to create/refresh from CI/CD instead we could remove their access to Production. |
Beta Was this translation helpful? Give feedback.
-
W-15042183 |
Beta Was this translation helpful? Give feedback.
-
Please implement this functionality! |
Beta Was this translation helpful? Give feedback.
-
Here is the proposed command. Please provide feedback especially if it would not solve your usecases. If it looks good, just leave a 👍 UPDATE: This is outdated. See the latest command help output in a February 27th post.
|
Beta Was this translation helpful? Give feedback.
-
The proposed command assumes auto-activation will be the popular choice. To not auto-activate you would provide, |
Beta Was this translation helpful? Give feedback.
-
@shetzel - Does the above proposed command still accept a path to a sandbox definition file for other characteristics like Apex Class ID, Public Group ID, etc? Having the sandbox name via a command flag is perfect for my use case. But I still would like to be able to set the apex class ID and public group ID for refreshes. Either via a flag or the definition file. Edit: I'm aware of an existing sandbox selective access bug which is why public groups were removed from the Sandbox Refresh UI. But restoring that would be the biggest roadblock resolver for my use case. My use case in basics:
|
Beta Was this translation helpful? Give feedback.
-
Here is what the command help looks like for
|
Beta Was this translation helpful? Give feedback.
-
This new feature was released in version 2.31.10 of Salesforce CLI. |
Beta Was this translation helpful? Give feedback.
-
The documentation says |
Beta Was this translation helpful? Give feedback.
-
When the refresh sandbox process is performed using the Salesforce UI is possible to change the sandbox name. |
Beta Was this translation helpful? Give feedback.
-
We have commands to create, delete, and resume sandboxes from the sf CLI. There is currently no way to refresh/update a sandbox from the CLI.
Would this be a useful command? If so, tell us why?
What are your usecases?
Beta Was this translation helpful? Give feedback.
All reactions