Skip to content

DEVOPS-652 feat: extend create scratch org to accept snapshot as extra param that allow to create an org from a template#2

Merged
dipakparmar merged 5 commits intomainfrom
feature/DEVOPS-652-1
Sep 5, 2025
Merged

DEVOPS-652 feat: extend create scratch org to accept snapshot as extra param that allow to create an org from a template#2
dipakparmar merged 5 commits intomainfrom
feature/DEVOPS-652-1

Conversation

@jsun-clariti
Copy link
Copy Markdown

@jsun-clariti jsun-clariti commented Sep 4, 2025

Overview

Extend create scartch org to allow create scratch org from a salesforce snapshot

Related Jira Tickets

DEVOPS-652

Changes Proposed

Types of Changes

  • add 'snapshot' options to ScratchOrg schema
  • when build args for create scratch org, leverage the snapshot is specified.
  • when snapshot is specified, remove 'feature' and 'edition' sessions from org_config file and used the new temp file for org creation.
  • add unit test

Indicate the type of changes your PR introduces to the project. Check the box that applies by replacing [ ] with [x] and Ensure you understand the implications of each type.

  • Bug fix (non-breaking changes which fix an issue)
  • New feature (non-breaking changes which add functionality)
  • Breaking change (changes that would cause existing functionality to not work as expected)
  • Documentation update (updates to documentation, no changes to code)
  • Other (please describe):

Compliance and Security

Ensure your changes adhere to project policies and do not introduce security vulnerabilities.

  • I have read and understood the Clariti's VCS Policies.
  • My commits are GPG-signed, adhering to project standards.
  • My code follows Clariti's coding standards and passes all existing lint/unit tests.
  • My changes do not introduce any new security issues.
  • I have performed a self-review to ensure the code introduces no new security vulnerabilities.
  • I have addressed existing security issues in my code (if applicable).

@jsun-clariti jsun-clariti self-assigned this Sep 4, 2025
@jsun-clariti jsun-clariti marked this pull request as ready for review September 4, 2025 19:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR extends the CumulusCI scratch org creation functionality to support creating scratch orgs from Salesforce snapshots. This allows users to create scratch orgs based on predefined templates rather than starting from scratch.

  • Adds a new snapshot parameter to the ScratchOrg schema and configuration
  • Modifies scratch org creation logic to handle snapshot-based org creation with automatic config file adjustments
  • Includes comprehensive unit tests for the new snapshot functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
cumulusci/utils/yaml/cumulusci_yml.py Adds snapshot field to ScratchOrg model
cumulusci/schema/cumulusci.jsonschema.json Adds JSON schema definition for the snapshot parameter
cumulusci/core/config/scratch_org_config.py Implements snapshot support in org creation logic with temporary config file handling
cumulusci/core/config/tests/test_config.py Adds unit tests for snapshot-based scratch org creation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread cumulusci/core/config/scratch_org_config.py
Comment thread cumulusci/core/config/scratch_org_config.py
Comment thread cumulusci/core/config/scratch_org_config.py Outdated
@dipakparmar
Copy link
Copy Markdown

@coderabbitai full review

@dipakparmar
Copy link
Copy Markdown

@codex can you review this?

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

@jsun-clariti
Copy link
Copy Markdown
Author

@codex can you review this?

Comment thread cumulusci/core/config/scratch_org_config.py
@dipakparmar dipakparmar merged commit 101504d into main Sep 5, 2025
@dipakparmar dipakparmar deleted the feature/DEVOPS-652-1 branch September 5, 2025 19:19
dipakparmar pushed a commit that referenced this pull request Oct 17, 2025
…a param that allow to create an org from a template (#2)

* DEVOPS-652 feat: extend create scratch org to accept snapshot as extra param that allow to create an org from a template

* DEVOPS-652 test: add unit test for creating org with snapshot configuration

* DEVOPS-652 refactor: remove snapshot assignment from org config during creation and clean up the file

* DEVOPS-652 fix: improve error handling for temporary config file creation in ScratchOrgConfig

* DEVOPS-652 fix: remove snapshot from config when using snapshot in ScratchOrgConfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants