From 3d784423783566d682a62cab38be2f714f462a55 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 11:16:23 -0700 Subject: [PATCH 1/3] Release v4.4.0 (#3898) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Arvind Bhamidipati Co-authored-by: James Estevez --- cumulusci/__about__.py | 2 +- docs/history.md | 250 ++++++++++++++++++++++------------------- 2 files changed, 134 insertions(+), 118 deletions(-) diff --git a/cumulusci/__about__.py b/cumulusci/__about__.py index 29baa2b4f6..ecdb1cef9e 100644 --- a/cumulusci/__about__.py +++ b/cumulusci/__about__.py @@ -1 +1 @@ -__version__ = "4.3.0.dev0" +__version__ = "4.4.0" diff --git a/docs/history.md b/docs/history.md index a2cf0fdc6b..2e7e443c03 100644 --- a/docs/history.md +++ b/docs/history.md @@ -2,13 +2,32 @@ +## v4.4.0 (2025-05-05) + + + +## What's Changed + +### Changes + +- Add new tasks get_assignable_permission_sets and get_assignable_licenses by [@vsbharath](https://github.com/vsbharath) in [#3892](https://github.com/SFDO-Tooling/CumulusCI/pull/3892) + +### Issues Fixed + +- fix: Make get permset licenses return active only by [@jstvz](https://github.com/jstvz) in [#3888](https://github.com/SFDO-Tooling/CumulusCI/pull/3888) +- fix: Read the docs configuration by LaTeX into PDF by [@dcinzona](https://github.com/dcinzona) in [#3891](https://github.com/SFDO-Tooling/CumulusCI/pull/3891) + +**Full Changelog**: https://github.com/SFDO-Tooling/CumulusCI/compare/v4.3.0.dev0...v4.4.0 + + + ## v4.3.0.dev0 (2025-02-19) ## What's Changed -### Changes +### Changes - @W-17717398: Fix for Error When Local Records Are Empty During SELECT Action by [@aditya-balachander](https://github.com/aditya-balachander) in [#3877](https://github.com/SFDO-Tooling/CumulusCI/pull/3877) - Changed Check Components to add a get repo components function by [@jain-naman-sf](https://github.com/jain-naman-sf) in [#3881](https://github.com/SFDO-Tooling/CumulusCI/pull/3881) @@ -16,15 +35,13 @@ **Full Changelog**: https://github.com/SFDO-Tooling/CumulusCI/compare/v4.3.0...v4.3.0.dev0 - - ## v4.3.0 (2025-02-07) ## What's Changed -### Changes +### Changes - Fix the check_sobjects_available task to take the api_version from Cumulusci.yml by [@lakshmi2506](https://github.com/lakshmi2506) in [#3875](https://github.com/SFDO-Tooling/CumulusCI/pull/3875) @@ -36,7 +53,7 @@ ## What's Changed -### Changes +### Changes - fix: Prevent 'directory not empty' error in `snowfakery` on Linux by [@schenkkp](https://github.com/schenkkp) in [#3864](https://github.com/SFDO-Tooling/CumulusCI/pull/3864) - @W-17621812: Update \_get_required_permission_types to handle SELECT operations by [@aditya-balachander](https://github.com/aditya-balachander) in [#3870](https://github.com/SFDO-Tooling/CumulusCI/pull/3870) @@ -54,7 +71,7 @@ ## What's Changed -### Changes +### Changes - Remove default declaration for select rows query by [@mjawadtp](https://github.com/mjawadtp) in [#3867](https://github.com/SFDO-Tooling/CumulusCI/pull/3867) @@ -75,7 +92,7 @@ ## What's Changed -### Changes +### Changes - @W-17427085: Set ANNOY related dependencies to be optional by [@aditya-balachander](https://github.com/aditya-balachander) in [#3858](https://github.com/SFDO-Tooling/CumulusCI/pull/3858) - Update on the documentation for SFDX_ORG_CREATE_ARGS environment variable by [@lakshmi2506](https://github.com/lakshmi2506) in [#3861](https://github.com/SFDO-Tooling/CumulusCI/pull/3861) @@ -88,7 +105,7 @@ ## What's Changed -### Changes +### Changes - @W-16485311: Core Logic for Selecting Records from Target Org by [@aditya-balachander](https://github.com/aditya-balachander) in [#3818](https://github.com/SFDO-Tooling/CumulusCI/pull/3818) - Add integration tests for all selection strategies by [@mjawadtp](https://github.com/mjawadtp) in [#3851](https://github.com/SFDO-Tooling/CumulusCI/pull/3851) @@ -101,7 +118,7 @@ ## v4.0.1 (2024-11-18) -### Issues Fixed +### Issues Fixed - Fixed a ModuleNotFoundError for docutils by adding the dependency `docutils` by [@jstvz](https://github.com/jstvz) in [#3558](https://github.com/SFDO-Tooling/CumulusCI/pull/3558). @@ -111,7 +128,7 @@ ## What's Changed -### Critical Changes +### Critical Changes - Python versions 3.8, 3.9, and 3.10 are no longer supported. - Switch to `sf` CLI commands [@lakshmi2506](https://github.com/lakshmi2506) in [#3829](https://github.com/SFDO-Tooling/CumulusCI/pull/3829) @@ -125,7 +142,7 @@ ## What's Changed -### Changes +### Changes - fix: escape stage name when running ensure_record_type task by [@leo-dcfa](https://github.com/leo-dcfa) in [#3827](https://github.com/SFDO-Tooling/CumulusCI/pull/3827) - fix: Upgrade upload-artifact action by [@jstvz](https://github.com/jstvz) in [#3831](https://github.com/SFDO-Tooling/CumulusCI/pull/3831) @@ -144,7 +161,7 @@ ## What's Changed -### Changes +### Changes - fix: Update input handlers with new Salesforce lightning-primitive tags by [@chanyahn-st](https://github.com/chanyahn-st) in [#3822](https://github.com/SFDO-Tooling/CumulusCI/pull/3822) @@ -160,7 +177,7 @@ ## What's Changed -### Changes +### Changes - Fix to Include All Keys in standardValue XML for add_standard_value_set_entries Task from Entries Option with Backward Compatibility by [@lakshmi2506](https://github.com/lakshmi2506) in [#3820](https://github.com/SFDO-Tooling/CumulusCI/pull/3820) @@ -172,7 +189,7 @@ ## What's Changed -### Changes +### Changes - Fix to Suppress the required field check for the upsert action at mapping step by [@lakshmi2506](https://github.com/lakshmi2506) in [#3817](https://github.com/SFDO-Tooling/CumulusCI/pull/3817) @@ -184,7 +201,7 @@ ## What's Changed -### Changes +### Changes - Add tasks to extract and upload files (Salesforce Files) by [@mjawadtp](https://github.com/mjawadtp) in [#3801](https://github.com/SFDO-Tooling/CumulusCI/pull/3801) - Update the validation for loading to check the required fields as well by [@lakshmi2506](https://github.com/lakshmi2506) in [#3807](https://github.com/SFDO-Tooling/CumulusCI/pull/3807) @@ -197,7 +214,7 @@ ## What's Changed -### Changes +### Changes - Added the `list_files` task to display files in an org by [@lakshmi2506](https://github.com/lakshmi2506) in [#3799](https://github.com/SFDO-Tooling/CumulusCI/pull/3799) - The `api_names` option of the `assign_permission_set_licenses` task now accepts either `DeveloperName` or `PermissionSetLicenseKey` by [@lakshmi2506](https://github.com/lakshmi2506) in [#3798](https://github.com/SFDO-Tooling/CumulusCI/pull/3798) @@ -208,12 +225,12 @@ ## What's Changed -### Changes +### Changes - Extend modal close wait with custom timeout by [@leboff](https://github.com/leboff) in [#3783](https://github.com/SFDO-Tooling/CumulusCI/pull/3783) - Added check_output true to get the logs of metadata retrieval by [@lakshmi2506](https://github.com/lakshmi2506) in [#3789](https://github.com/SFDO-Tooling/CumulusCI/pull/3789) -### Issues Fixed +### Issues Fixed - Fix retrieve unpackaged so it is usable in metadeploy by [@yippie](https://github.com/yippie) in [#3566](https://github.com/SFDO-Tooling/CumulusCI/pull/3566) @@ -229,7 +246,7 @@ ## What's Changed -### Changes +### Changes - Don't add fullname tag in 2GP package.xml by [@leboff](https://github.com/leboff) in [#3748](https://github.com/SFDO-Tooling/CumulusCI/pull/3748) @@ -251,7 +268,7 @@ ## What's Changed -### Changes +### Changes - @W-15258380 - Reloading of login URL's from env before creating jwt session by [@lakshmi2506](https://github.com/lakshmi2506) in [#3765](https://github.com/SFDO-Tooling/CumulusCI/pull/3765) @@ -263,7 +280,7 @@ ## What's Changed -### Changes +### Changes - Fix Invalid Lookups of namespaced fields by [@aditya-balachander](https://github.com/aditya-balachander) in [#3759](https://github.com/SFDO-Tooling/CumulusCI/pull/3759) - Fix Id Not Specified on Update Call by [@aditya-balachander](https://github.com/aditya-balachander) in [#3761](https://github.com/SFDO-Tooling/CumulusCI/pull/3761) @@ -277,7 +294,7 @@ ## What's Changed -### Changes +### Changes - Fix: Type Error while loading Contacts when PersonAccount is enabled by [@jkasturi-sf](https://github.com/jkasturi-sf) in [#3756](https://github.com/SFDO-Tooling/CumulusCI/pull/3756) @@ -289,7 +306,7 @@ ## What's Changed -### Changes +### Changes - Polymorphic Lookup Data Extraction by [@aditya-balachander](https://github.com/aditya-balachander) in [#3741](https://github.com/SFDO-Tooling/CumulusCI/pull/3741) - ADR: Migrate from SFDX to SF CLI by [@jstvz](https://github.com/jstvz) in [#3630](https://github.com/SFDO-Tooling/CumulusCI/pull/3630) @@ -303,7 +320,7 @@ ## What's Changed -### Changes +### Changes - Fix `is_person_type` `AttributeError` in record type handling by [@aditya-balachander](https://github.com/aditya-balachander) in [#3739](https://github.com/SFDO-Tooling/CumulusCI/pull/3739) @@ -315,7 +332,7 @@ ## What's Changed -### Changes +### Changes - Incorrect generation of record type mapping table name in a namespaced org context by [@lakshmi2506](https://github.com/lakshmi2506) in [#3713](https://github.com/SFDO-Tooling/CumulusCI/pull/3713) - Retrieve pre-flight checks by [@lakshmi2506](https://github.com/lakshmi2506) in [#3723](https://github.com/SFDO-Tooling/CumulusCI/pull/3723) @@ -339,7 +356,7 @@ ## What's Changed -### Changes +### Changes - Allowed namespace injection without managed by [@jain-naman-sf](https://github.com/jain-naman-sf) in [#3677](https://github.com/SFDO-Tooling/CumulusCI/pull/3677) - Update pyright configuration for 1.1.339 by [@jstvz](https://github.com/jstvz) in [#3715](https://github.com/SFDO-Tooling/CumulusCI/pull/3715) @@ -353,11 +370,11 @@ ## What's Changed -### Critical Changes +### Critical Changes - Remove `robot_lint` task and dependencies by [@jstvz](https://github.com/jstvz) in [#3697](https://github.com/SFDO-Tooling/CumulusCI/pull/3697) -### Changes +### Changes - Show an error message when no `origin` remote is present by [@lakshmi2506](https://github.com/lakshmi2506) in [#3679](https://github.com/SFDO-Tooling/CumulusCI/pull/3679) - Improve task `return_values` documentation by [@lakshmi2506](https://github.com/lakshmi2506) in [#3689](https://github.com/SFDO-Tooling/CumulusCI/pull/3689) @@ -365,7 +382,7 @@ - Support Python 3.12 by [@jstvz](https://github.com/jstvz) in [#3691](https://github.com/SFDO-Tooling/CumulusCI/pull/3691) - Make task `options` read only when using Pydantic option validation by [@aditya-balachander](https://github.com/aditya-balachander) in [#3695](https://github.com/SFDO-Tooling/CumulusCI/pull/3695) -### Issues Fixed +### Issues Fixed - Fix Github url parse error for some scenarios by [@mgrandhi](https://github.com/mgrandhi) in [#3683](https://github.com/SFDO-Tooling/CumulusCI/pull/3683) @@ -381,7 +398,7 @@ ## What's Changed -### Changes +### Changes - Add option to specify release window in `cci org scratch` by [@jain-naman-sf](https://github.com/jain-naman-sf) in [#3653](https://github.com/SFDO-Tooling/CumulusCI/pull/3653) - Add describe_metadatatypes task by [@lakshmi2506](https://github.com/lakshmi2506) in [#3669](https://github.com/SFDO-Tooling/CumulusCI/pull/3669) @@ -400,7 +417,7 @@ ## What's Changed -### Changes +### Changes - Allow setting Major and Minor Version in upload_production task by [@jain-naman-sf](https://github.com/jain-naman-sf) in [#3651](https://github.com/SFDO-Tooling/CumulusCI/pull/3651) - Add better error handling for empty or invalid org and service env vars by [@prescod](https://github.com/prescod) in [#3365](https://github.com/SFDO-Tooling/CumulusCI/pull/3365) @@ -414,7 +431,7 @@ - Improve message description handling for scratch org cli `not_found` error by [@lakshmi2506](https://github.com/lakshmi2506) in [#3659](https://github.com/SFDO-Tooling/CumulusCI/pull/3659) - Add `deactivate_flows` task by [@lakshmi2506](https://github.com/lakshmi2506) in [#3664](https://github.com/SFDO-Tooling/CumulusCI/pull/3664) -### Issues Fixed +### Issues Fixed - Add guard for empty body to github_release_report by [@jstvz](https://github.com/jstvz) in [#3645](https://github.com/SFDO-Tooling/CumulusCI/pull/3645) @@ -435,7 +452,7 @@ ## What's Changed -### Changes +### Changes - Added workarounds to support Vlocity local compilation in CI by [@jstvz](https://github.com/jstvz) in [#3642](https://github.com/SFDO-Tooling/CumulusCI/pull/3642) @@ -447,12 +464,12 @@ ## What's Changed -### Changes +### Changes - Updated Permission Set preflights to handle Permission Set Groups by [@jkasturi-sf](https://github.com/jkasturi-sf) in [#3623](https://github.com/SFDO-Tooling/CumulusCI/pull/3623) - Added the `create_pull_request_on_conflict` option to automerge tasks by [@BenjaminFrench](https://github.com/ BenjaminFrench) in [#3632](https://github.com/SFDO-Tooling/CumulusCI/pull/3632) -### Issues Fixed +### Issues Fixed - Fixed issues with uploading some Unlocked Packages by [@jstvz](https://github.com/jstvz) in [#3636](https://github.com/SFDO-Tooling/CumulusCI/pull/3636) - Corrected behavior of the `skip_future_releases` option by [@jstvz](https://github.com/jstvz) in [#3624](https://github.com/SFDO-Tooling/CumulusCI/pull/3624) @@ -465,7 +482,7 @@ ## What's Changed -### Changes +### Changes - Add preflight check for PSL assignments by [@davidmreed](https://github.com/davidmreed) in [#3616](https://github.com/SFDO-Tooling/CumulusCI/pull/3616) - Use Marketing Cloud's validate endpoint to update deployment packages by [@davidmreed](https://github.com/davidmreed) and [@TheBitShepherd](https://github.com/TheBitShepherd) in [#3598](https://github.com/SFDO-Tooling/CumulusCI/pull/3598) @@ -478,7 +495,7 @@ ## What's Changed -### Changes +### Changes - Use Marketing Cloud's validate endpoint to update deployment packages by [@davidmreed](https://github.com/davidmreed) and [@TheBitShepherd](https://github.com/TheBitShepherd) in [#3598](https://github.com/SFDO-Tooling/CumulusCI/pull/3598) @@ -490,7 +507,7 @@ ## What's Changed -### Changes +### Changes - Added opt-in Pydantic-based task option parsing. by [@prescod](https://github.com/prescod) in [#1618](https://github.com/SFDO-Tooling/CumulusCI/pull/1618) - Add deploy transform to inject org URLs by [@davidmreed](https://github.com/davidmreed) in [#3596](https://github.com/SFDO-Tooling/CumulusCI/pull/3596) @@ -503,7 +520,7 @@ ## What's Changed -### Issues Fixed +### Issues Fixed - Ensure that top-level 'tasks' directory is read for custom tasks by [@prescod](https://github.com/prescod) in [#3582](https://github.com/SFDO-Tooling/CumulusCI/pull/3582) @@ -515,7 +532,7 @@ ## What's Changed -### Changes +### Changes - Fix bug that prevented "api" declaration in `extract_declaration` from being respected during `capture_sample_dataset`. by [@prescod](https://github.com/prescod) in [#3568](https://github.com/SFDO-Tooling/CumulusCI/pull/3568) - Update windows install steps by [@TheBitShepherd](https://github.com/TheBitShepherd) in [#3571](https://github.com/SFDO-Tooling/CumulusCI/pull/3571) @@ -530,13 +547,13 @@ ## What's Changed -### Changes +### Changes - Allow use of static release notes on GitHub by [@davidmreed](https://github.com/davidmreed) in [#3550](https://github.com/SFDO-Tooling/CumulusCI/pull/3550) - `cci service update` by [@TheBitShepherd](https://github.com/TheBitShepherd) in [#3481](https://github.com/SFDO-Tooling/CumulusCI/pull/3481) - Add TimelineObjectDefinition metadata type by [@jstvz](https://github.com/jstvz) in [#3551](https://github.com/SFDO-Tooling/CumulusCI/pull/3551) -### Issues Fixed +### Issues Fixed - Fix an issue with `capture_sample_data` and record type capturing. by [@prescod](https://github.com/prescod) in [#3552](https://github.com/SFDO-Tooling/CumulusCI/pull/3552) @@ -550,7 +567,7 @@ No changes (other than dependency updates) since v3.72.1.dev2 . Please see the c ## What's Changed -### Changes +### Changes - Include `modelVersion` in MCPM Payload by [@TheBitShepherd](https://github.com/TheBitShepherd) in [#3523](https://github.com/SFDO-Tooling/CumulusCI/pull/3523) - Fix MCPM deploy again by [@TheBitShepherd](https://github.com/TheBitShepherd) in [#3526](https://github.com/SFDO-Tooling/CumulusCI/pull/3526) @@ -563,7 +580,7 @@ No changes (other than dependency updates) since v3.72.1.dev2 . Please see the c ## What's Changed -### Changes +### Changes - Include `modelVersion` in MCPM Payload by [@TheBitShepherd](https://github.com/TheBitShepherd) in [#3523](https://github.com/SFDO-Tooling/CumulusCI/pull/3523) - Fix MCPM deploy again by [@TheBitShepherd](https://github.com/TheBitShepherd) in [#3526](https://github.com/SFDO-Tooling/CumulusCI/pull/3526) @@ -574,7 +591,7 @@ No changes (other than dependency updates) since v3.72.1.dev2 . Please see the c ## What's Changed -### Changes +### Changes - Change `deploy_marketing_cloud_package` task to include `modelVersion` in MCPM Payload by [@TheBitShepherd](https://github.com/TheBitShepherd) in [#3523](https://github.com/SFDO-Tooling/CumulusCI/pull/3523) @@ -584,7 +601,7 @@ No changes (other than dependency updates) since v3.72.1.dev2 . Please see the c ## What's Changed -### Issues Fixed +### Issues Fixed - Fixed an issue preventing installation of CumulusCI's sdist in [#3520](https://github.com/SFDO-Tooling/CumulusCI/pull/3520) @@ -592,11 +609,11 @@ No changes (other than dependency updates) since v3.72.1.dev2 . Please see the c ## What's Changed -### Changes +### Changes - Improve documentation of tasks w.r.t required/option/defauled fields. by [@prescod](https://github.com/prescod) in [#3447](https://github.com/SFDO-Tooling/CumulusCI/pull/3447) -### Issues Fixed +### Issues Fixed - Ensure that products have a slug before publishing translations by [@prescod](https://github.com/prescod) in [#3483](https://github.com/SFDO-Tooling/CumulusCI/pull/3483) - Remove deprecated Playwright keywords by [@jstvz](https://github.com/jstvz) in [#3503](https://github.com/SFDO-Tooling/CumulusCI/pull/3503) @@ -606,11 +623,11 @@ No changes (other than dependency updates) since v3.72.1.dev2 . Please see the c ## 3.71.0 (2022-12-20) -Critical Changes +Critical Changes - A few weeks ago we soft-launched a `load_data` feature that matched the dataset loaded to the `org_shape`. If you had discovered and used the `load_data` option called `org_shape_match_only`, you should switch to the new task because eventually we will remove the option and only use the new `load_sample_data` task. (#3455) -Changes +Changes - CumulusCI has two new tasks for working with sample data: `load_sample_data` and `capture_sample_data`. (#3455) - CumulusCI now offers the ability to inject arbitrary IDs into a project's metadata components. See the [Find-and-Replace Id Injection](https://cumulusci.readthedocs.io/en/latest/deploy.html#find-and-replace-id-injection) source transform for more information. (#3460) @@ -623,7 +640,7 @@ Changes ## 3.69.0 (2022-11-14) -Changes +Changes - Added support for debugging and breakpoints in Playwright-based Robot Framework by @boakley in @@ -647,11 +664,11 @@ Changes ## 3.68.0 (2022-10-31) -Critical Changes +Critical Changes - Upgraded Robot Framework from version 4.1.3 to version 6. As with most Robot Framework updates, there are a host of new features and a few deprecated features and backwards incompatibilities. For a complete list consult the [Robot Framework release notes](https://github.com/robotframework/robotframework/releases) in https://github.com/SFDO-Tooling/CumulusCI/pull/3417 -Changes +Changes - Add support for InstallKey, sourceOrg, release keys on 2GP version create by @davidmreed in https://github.com/SFDO-Tooling/CumulusCI/pull/3403 - We now support the `Territory2`, `Territory2Model`, `Territory2Type`, and `Territory2Rule` MetaData types. by @TheBitShepherd in https://github.com/SFDO-Tooling/CumulusCI/pull/3406 @@ -661,7 +678,7 @@ Changes - Snowfakery (upgraded to 3.4) can now generate Event or Meeting Schedules similar to Calendar Apps - Snowfakery now has a Salesforce.ContentFile feature for generating Content Versions -Issues Fixed +Issues Fixed - Bumped key_size from 2048 to 4096 on advice from a security audit by @boakley in https://github.com/SFDO-Tooling/CumulusCI/pull/3389 - Fixed an issue where unknown deploy statuses could cause polling to hang in the deploy_marketing_cloud_package task by @TheBitShepherd in https://github.com/SFDO-Tooling/CumulusCI/pull/3394 @@ -698,7 +715,7 @@ Issues Fixed ## 3.66.0 (2022-09-29) -Changes +Changes - New Metadata ETL task `set_object_settings` to enable and disable settings on standard and custom objects (thanks \@jlantz) (#3364) - For Robot tests on the Firefox profile, we now accept all cookies to prevent lightning pages from failing to render due to cross-domain cookies. (#3366) @@ -707,7 +724,7 @@ Changes - CumulusCI now supports the following Metadata type: `AIApplicationConfig` (#3368) - CumulusCI now supports the following types from [Net Zero Cloud\'s Tooling API](https://developer.salesforce.com/docs/atlas.en-us.netzero_cloud_dev_guide.meta/netzero_cloud_dev_guide/netzero_cloud_tooling_api_parent.htm): `BldgEnrgyIntensityCnfg`, `StnryAssetEnvSrcCnfg`, `VehicleAssetEmssnSrcCnfg`. (#3372) -Issues Fixed +Issues Fixed - A failure when calling `capture page screenshot` no longer causes a Robot test to fail (#3366) - Fixed an issue where the `cci --version` command failed to output the current version (#3367) @@ -716,24 +733,24 @@ Issues Fixed ## 3.65.0 (2022-09-16) -Changes +Changes - Improve logging and add error handling for Vlocity tasks by \@prescod in (#3357) ## 3.64.0 (2022-08-18) -Changes +Changes - Support for upcoming Salesforce 240 Release in Robot by \@boakley (#3321) -Issues Fixed +Issues Fixed - Fix crash with unusual Unicode characters in metadata on Windows running `update_package_xml` by \@prescod (#3323) - Fix Scratch org creation in latest sfdx by \@prescod (#3334) ## 3.63.0 (2022-08-04) -Changes +Changes - CumulusCI can now validate MetaDeploy plans in cumulusci.yml by @jstvz in (#3298) - Sensitive service info is now masked in the `cci service info` command - by @bethbrains in (#3295) @@ -742,14 +759,14 @@ Changes - New task for deploying remote site settings that are required by OmniStudio - `deploy_omni_studio_site_settings` by @Br4nd0R in (#3303) - Added new robot keywords available when using the SalesforcePlaywright library; get current record id, wait until loading is complete and go to record home. These keywords work in a similar fashion to the existing keywords of the same name that are based on Selenium - by @boakley in (#3310) -Issues Fixed +Issues Fixed - Fixed two issues which prevented the `set_recently_viewed` feature from working by @prescod in (#3305) - The GithubIssuesParser class will now fall back if issues are disabled by @davidmreed in (#3293) ## 3.62.0 (2022-07-21) -Changes +Changes - CumulusCI now supports pinning dependencies on other projects by @davidmreed in (#3270) - Add extract declarations concept to CumulusCI by @prescod in (#3285) @@ -758,13 +775,13 @@ Changes ## 3.61.1 (2022-07-10) -Issues Fixed +Issues Fixed - Fix `metadeploy_publish` error caused by supported_orgs case-sensitivity (#3277) ## 3.61.0 (2022-07-09) -Changes +Changes - `metadeploy_publish` consumes legal targets for supported orgs (#3239) - Add update_profile support for record type layouts by (#3243) @@ -773,7 +790,7 @@ Changes - Import persistent orgs from the SFDX keychain (#3253) - Speed up Snowfakery handling of small batch sizes (#3188) -Issues Fixed +Issues Fixed - Fix JWT audience for sandboxes (#3240) - Fixed a bug where scratch org attributes configured via cumulusci.yml were @@ -1789,9 +1806,9 @@ Critical Changes: subfolders will see a change in resolution behavior. Previously, a dependency specified like this: - dependencies: - - github: https://github.com/SalesforceFoundation/NPSP - subfolder: unpackaged/config/trial + dependencies: + - github: https://github.com/SalesforceFoundation/NPSP + subfolder: unpackaged/config/trial would always deploy from the latest commit on the default branch. Now, this dependency will be resolved to a GitHub commit @@ -1802,12 +1819,12 @@ Critical Changes: - The `project__dependencies` section in `cumulusci.yml` no longer supports nested dependencies specified like this: - dependencies: - - namespace: "test" - version: "1.0" - dependencies: - - namespace: "parent" - version: "2.2" + dependencies: + - namespace: "test" + version: "1.0" + dependencies: + - namespace: "parent" + version: "2.2" All dependencies should be listed in install order. @@ -1976,12 +1993,12 @@ Critical changes: - The `project__dependencies` section in `cumulusci.yml` will no longer support nested dependencies specified like this : - dependencies: - - namespace: "test" - version: "1.0" dependencies: - - namespace: "parent" - version: "2.2" + - namespace: "test" + version: "1.0" + dependencies: + - namespace: "parent" + version: "2.2" All dependencies should be listed in install order. @@ -3588,33 +3605,33 @@ New features: : - - Added keywords for generating a collection of sObjects according to a template: + Added keywords for generating a collection of sObjects according to a template: - : - `Generate Test Data` - - `Salesforce Collection Insert` - - `Salesforce Collection Update` + : - `Generate Test Data` + - `Salesforce Collection Insert` + - `Salesforce Collection Update` - - + - - Changes to Page Objects: + Changes to Page Objects: - : - More than one page object can be loaded at once. - Once loaded, the keywords of a page object remain - visible in the suite. Robot will give priority to - keywords in the reverse order in which they were - imported. - - There is a new keyword, `Log Current Page Object`, - which can be useful to see information about the - most recently loaded page object. - - There is a new keyword, `Get Page Object`, which - will return the robot library for a given page - object. This can be used in other keywords to access - keywords from another page object if necessary. - - The `Go To Page` keyword will now automatically load - the page object for the given page. + : - More than one page object can be loaded at once. + Once loaded, the keywords of a page object remain + visible in the suite. Robot will give priority to + keywords in the reverse order in which they were + imported. + - There is a new keyword, `Log Current Page Object`, + which can be useful to see information about the + most recently loaded page object. + - There is a new keyword, `Get Page Object`, which + will return the robot library for a given page + object. This can be used in other keywords to access + keywords from another page object if necessary. + - The `Go To Page` keyword will now automatically load + the page object for the given page. - - Added a basic debugger for Robot tests. It can be enabled - using the `-o debug True` option to the robot task. + - Added a basic debugger for Robot tests. It can be enabled + using the `-o debug True` option to the robot task. - Added support for deploying new metadata types `ProfilePasswordPolicy` and `ProfileSessionSetting`. @@ -3689,8 +3706,8 @@ New features: permanently set this option, add this in `~/.cumulusci/cumulusci.yml`: - cli: - plain_output: True + cli: + plain_output: True - Added additional info to the `cci version` command, including the Python version, an upgrade check, and a warning on Python 2. @@ -4971,12 +4988,12 @@ Resolving a few issues from beta77: below. In flows that need to inject the actual namespace prefix, override the [unmanaged]{.title-ref} option .. : - custom_deploy_task: - class_path: cumulusci.tasks.salesforce.Deploy - options: - path: your/custom/metadata - namespace_inject: $project_config.project__package__namespace - unmanaged: False + custom_deploy_task: + class_path: cumulusci.tasks.salesforce.Deploy + options: + path: your/custom/metadata + namespace_inject: $project_config.project__package__namespace + unmanaged: False ### Enhancements @@ -5691,13 +5708,13 @@ Resolving a few issues from beta77: - **IMPORANT** This release changes the yaml structure for flows. The new structure now looks like this: - flows: - flow_name: - tasks: - 1: - task: deploy - 2: - task: run_tests + flows: + flow_name: + tasks: + 1: + task: deploy + 2: + task: run_tests - See the new flow customization examples in the cookbook for examples of why this change was made and how to use it: @@ -6107,4 +6124,3 @@ Resolving a few issues from beta77: ## 2.0.0-alpha1 (2016-10-21) - First release on PyPI. - From 0b9160c58b09977a4311e30b2850d9129d54e9e9 Mon Sep 17 00:00:00 2001 From: Bharath Chadarajupalli Date: Mon, 2 Jun 2025 13:25:22 -0700 Subject: [PATCH 2/3] Add output_dir option to retrieve_changes task (#3901) Added output_dir option to specify a custom output directory for retrieved changes Updated retrieve_components function to handle the output_dir parameter Modified error handling to provide clearer messages when no results are found Updated test cases to verify the output_dir functionality --- cumulusci/tasks/salesforce/sourcetracking.py | 22 ++++++- .../salesforce/tests/test_sourcetracking.py | 63 +++++++++++++++++-- 2 files changed, 78 insertions(+), 7 deletions(-) diff --git a/cumulusci/tasks/salesforce/sourcetracking.py b/cumulusci/tasks/salesforce/sourcetracking.py index 27567ddb20..f58a52e651 100644 --- a/cumulusci/tasks/salesforce/sourcetracking.py +++ b/cumulusci/tasks/salesforce/sourcetracking.py @@ -179,6 +179,14 @@ def _reset_sfdx_snapshot(self): "namespace_tokenize" ] +retrieve_changes_task_options["output_dir"] = { + "description": ( + "The output directory for the retrieved metadata. " + + "If not specified, defaults to force-app or the target directory passed to retrieve changes." + ), + "required": False, +} + def _write_manifest(changes, path, api_version): """Write a package.xml for the specified changes and API version.""" @@ -226,6 +234,7 @@ def retrieve_components( project_config: BaseProjectConfig = None, retrieve_complete_profile: bool = False, capture_output: bool = False, + output_dir: str = None, ): """Retrieve specified components from an org into a target folder. @@ -238,7 +247,10 @@ def retrieve_components( to a namespace prefix to replace it with a `%%%NAMESPACE%%%` token. """ - target = os.path.realpath(target) + # Always use output_dir if specified, else use target + retrieve_target = ( + os.path.realpath(output_dir) if output_dir else os.path.realpath(target) + ) profiles = [] # If retrieve_complete_profile and project_config is None, raise error # This is because project_config is only required if retrieve_complete_profile is True @@ -302,6 +314,8 @@ def retrieve_components( "-w", "5", "--ignore-conflicts", + "--output-dir", + retrieve_target, ], capture_output=capture_output, check_return=True, @@ -364,6 +378,9 @@ def _init_options(self, kwargs): self.options.get("retrieve_complete_profile", False) ) + # Get output_dir first + output_dir = self.options.get("output_dir") + # Check which directories are configured as dx packages package_directories = [] default_package_directory = None @@ -392,6 +409,7 @@ def _init_options(self, kwargs): md_format = path not in package_directories self.md_format = md_format self.options["path"] = path + self.options["output_dir"] = output_dir if "api_version" not in self.options: self.options[ @@ -410,6 +428,7 @@ def _run_task(self): self.logger.info("{MemberType}: {MemberName}".format(**change)) target = os.path.realpath(self.options["path"]) + output_dir = self.options.get("output_dir") package_xml_opts = {} if self.options["path"] == "src": package_xml_opts.update( @@ -430,6 +449,7 @@ def _run_task(self): extra_package_xml_opts=package_xml_opts, project_config=self.project_config, retrieve_complete_profile=self.options["retrieve_complete_profile"], + output_dir=output_dir, ) if self.options["snapshot"]: diff --git a/cumulusci/tasks/salesforce/tests/test_sourcetracking.py b/cumulusci/tasks/salesforce/tests/test_sourcetracking.py index 258d1a1e32..206b344970 100644 --- a/cumulusci/tasks/salesforce/tests/test_sourcetracking.py +++ b/cumulusci/tasks/salesforce/tests/test_sourcetracking.py @@ -20,6 +20,11 @@ from cumulusci.utils import temporary_dir +@pytest.fixture +def vcr_cassette_dir(): + return os.path.join(os.path.dirname(__file__), "cassettes") + + class TestListChanges: """List the changes from a scratch org""" @@ -180,12 +185,12 @@ def test_run_task(self, sfdx, create_task_fixture): }, ], } - with mock.patch.object( - RetrieveProfile, "_run_task" - ) as mock_retrieve_profile, mock.patch.object( - pathlib.Path, "exists", return_value=True - ), mock.patch.object( - pathlib.Path, "is_dir", return_value=True + with ( + mock.patch.object( + RetrieveProfile, "_run_task" + ) as mock_retrieve_profile, + mock.patch.object(pathlib.Path, "exists", return_value=True), + mock.patch.object(pathlib.Path, "is_dir", return_value=True), ): task._run_task() assert sfdx_calls == [ @@ -208,6 +213,52 @@ def test_run_task__no_changes(self, sfdx, create_task_fixture): task._run_task() assert "No changes to retrieve" in messages + def test_run_task_with_output_dir(self, sfdx, create_task_fixture): + sfdx_calls = [] + sfdx.side_effect = lambda cmd, *args, **kw: sfdx_calls.append(cmd) + + with temporary_dir(): + task = create_task_fixture( + RetrieveChanges, + { + "include": "Test", + "namespace_tokenize": "ns", + "retrieve_complete_profile": True, + "output_dir": "output", + }, + ) + task._init_task() + task.tooling = mock.Mock() + task.tooling.query_all.return_value = { + "totalSize": 1, + "records": [ + { + "MemberType": "CustomObject", + "MemberName": "Test__c", + "RevisionCounter": 1, + }, + { + "MemberType": "Profile", + "MemberName": "TestProfile", + "RevisionCounter": 1, + }, + ], + } + with ( + mock.patch.object( + RetrieveProfile, "_run_task" + ) as mock_retrieve_profile, + mock.patch.object(pathlib.Path, "exists", return_value=True), + mock.patch.object(pathlib.Path, "is_dir", return_value=True), + ): + task._run_task() + assert sfdx_calls == [ + "project convert mdapi", + "project retrieve start", + "project convert source", + ] + mock_retrieve_profile.assert_called() + class TestSnapshotChanges: @mock.patch("cumulusci.tasks.salesforce.sourcetracking.sfdx") From b8aa37babcf6c9bbe6635cf4fdd76656bd07a193 Mon Sep 17 00:00:00 2001 From: Rupesh J Date: Mon, 16 Jun 2025 16:48:40 +0530 Subject: [PATCH 3/3] Migrate pkg_resources to packaging module Signed-off-by: Rupesh J --- AUTHORS.rst | 1 + cumulusci/__init__.py | 10 +++---- cumulusci/cli/robot.py | 9 ++++-- cumulusci/cli/runtime.py | 4 +-- cumulusci/cli/tests/test_cci.py | 6 ++-- cumulusci/cli/tests/test_robot.py | 30 ++++++++------------ cumulusci/cli/tests/test_utils.py | 6 ++-- cumulusci/cli/utils.py | 15 ++++++---- cumulusci/tasks/salesforce/update_profile.py | 8 ++---- pyproject.toml | 1 + 10 files changed, 46 insertions(+), 44 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 848008c153..5f3a5f3253 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -39,3 +39,4 @@ For example: * Chandler Anderson (zenibako) * Ben French (BenjaminFrench) * Rupert Barrow (rupertbarrow) +* Rupesh J (rupeshjSFDC) diff --git a/cumulusci/__init__.py b/cumulusci/__init__.py index 2dd9be88c7..2db01717a4 100644 --- a/cumulusci/__init__.py +++ b/cumulusci/__init__.py @@ -1,15 +1,15 @@ import os import sys +from importlib.metadata import PackageNotFoundError, version from simple_salesforce import api, bulk -from cumulusci.__about__ import __version__ - -__import__("pkg_resources").declare_namespace("cumulusci") - __location__ = os.path.dirname(os.path.realpath(__file__)) -__version__ = __version__ +try: + __version__ = version("cumulusci") +except PackageNotFoundError: + __version__ = "unknown" if sys.version_info < (3, 8): # pragma: no cover raise Exception("CumulusCI requires Python 3.8+.") diff --git a/cumulusci/cli/robot.py b/cumulusci/cli/robot.py index 5083a1b68d..a7409760e9 100644 --- a/cumulusci/cli/robot.py +++ b/cumulusci/cli/robot.py @@ -1,7 +1,7 @@ +import importlib.metadata import sys import click -import pkg_resources import sarge from .runtime import pass_runtime @@ -109,5 +109,8 @@ def _require_npm(): def _is_package_installed(package_name): """Return True if the given package is installed""" - # technique shamelessly stolen from https://stackoverflow.com/a/44210735/7432 - return package_name in {pkg.key for pkg in pkg_resources.working_set} + try: + importlib.metadata.distribution(package_name) + return True + except importlib.metadata.PackageNotFoundError: + return False diff --git a/cumulusci/cli/runtime.py b/cumulusci/cli/runtime.py index 16157d0930..9e596fa7da 100644 --- a/cumulusci/cli/runtime.py +++ b/cumulusci/cli/runtime.py @@ -6,7 +6,7 @@ import click import keyring -import pkg_resources +from packaging import version from cumulusci.cli.utils import get_installed_version from cumulusci.core.exceptions import ConfigError, KeychainKeyNotFound, OrgNotFound @@ -143,7 +143,7 @@ def check_cumulusci_version(self): if self.project_config: min_cci_version = self.project_config.minimum_cumulusci_version if min_cci_version: - parsed_version = pkg_resources.parse_version(min_cci_version) + parsed_version = version.parse(min_cci_version) if get_installed_version() < parsed_version: raise click.UsageError( f"This project requires CumulusCI version {min_cci_version} or later. " diff --git a/cumulusci/cli/tests/test_cci.py b/cumulusci/cli/tests/test_cci.py index ccb06adaea..c91a367dcd 100644 --- a/cumulusci/cli/tests/test_cci.py +++ b/cumulusci/cli/tests/test_cci.py @@ -8,8 +8,8 @@ from unittest import mock import click -import pkg_resources import pytest +from packaging import version from requests.exceptions import ConnectionError from rich.console import Console @@ -402,7 +402,7 @@ def test_cli(): @mock.patch( "cumulusci.cli.cci.get_latest_final_version", - mock.Mock(return_value=pkg_resources.parse_version("100")), + mock.Mock(return_value=version.parse("100")), ) def test_version(capsys): run_click_command(cci.version) @@ -413,7 +413,7 @@ def test_version(capsys): @mock.patch( "cumulusci.cli.cci.get_latest_final_version", - mock.Mock(return_value=pkg_resources.parse_version("1")), + mock.Mock(return_value=version.parse("1")), ) def test_version__latest(capsys): run_click_command(cci.version) diff --git a/cumulusci/cli/tests/test_robot.py b/cumulusci/cli/tests/test_robot.py index f9243c1ff3..50f75c700f 100644 --- a/cumulusci/cli/tests/test_robot.py +++ b/cumulusci/cli/tests/test_robot.py @@ -9,19 +9,11 @@ from .utils import run_cli_command -class MockWorkingSet(list): - """Mocks a pkg_resources.workingset object +class MockDistribution: + """Mocks an importlib.metadata.Distribution object""" - Basically, a list of mock packages representing all of the packages - installed in the current environment - """ - - def __init__(self, *package_names): - super().__init__() - for package_name in package_names: - pkg = mock.Mock() - pkg.key = package_name - self.append(pkg) + def __init__(self, name): + self.name = name def mock_Command(returncodes={}): @@ -49,16 +41,18 @@ def run(): return the_real_mock -@mock.patch("cumulusci.cli.robot.pkg_resources") -def test_is_package_installed(pkg_resources): +@mock.patch("cumulusci.cli.robot.importlib.metadata.distribution") +def test_is_package_installed(mock_distribution): """Verify that the helper _is_package_installed returns the correct result""" - pkg_resources.working_set = MockWorkingSet( - "robotframework", "robotframework-browser", "snowfakery" - ) + # Test when package is installed + mock_distribution.return_value = MockDistribution("robotframework-browser") result = _is_package_installed("robotframework-browser") assert result is True - pkg_resources.working_set = MockWorkingSet("robotframework", "snowfakery") + # Test when package is not installed + from importlib.metadata import PackageNotFoundError + + mock_distribution.side_effect = PackageNotFoundError("Package not found") result = _is_package_installed("robotframework-browser") assert result is False diff --git a/cumulusci/cli/tests/test_utils.py b/cumulusci/cli/tests/test_utils.py index 4298e890f3..79964e322a 100644 --- a/cumulusci/cli/tests/test_utils.py +++ b/cumulusci/cli/tests/test_utils.py @@ -3,10 +3,10 @@ import time from unittest import mock -import pkg_resources import pytest import requests import responses +from packaging import version import cumulusci @@ -46,8 +46,8 @@ def test_get_latest_final_version(): def test_check_latest_version(click, get_latest_final_version, get_installed_version): with utils.timestamp_file() as f: f.write(str(time.time() - 4000)) - get_latest_final_version.return_value = pkg_resources.parse_version("2") - get_installed_version.return_value = pkg_resources.parse_version("1") + get_latest_final_version.return_value = version.parse("2") + get_installed_version.return_value = version.parse("1") utils.check_latest_version() if sys.version_info > utils.LOWEST_SUPPORTED_VERSION: diff --git a/cumulusci/cli/utils.py b/cumulusci/cli/utils.py index e33d3005f5..125ba19303 100644 --- a/cumulusci/cli/utils.py +++ b/cumulusci/cli/utils.py @@ -6,8 +6,8 @@ from collections import defaultdict import click -import pkg_resources import requests +from packaging import version as packaging_version from rich.console import Console from cumulusci import __version__ @@ -74,7 +74,7 @@ def get_latest_final_version(): for versionstring in res["releases"].keys(): if not is_final_release(versionstring): continue - versions.append(pkg_resources.parse_version(versionstring)) + versions.append(packaging_version.parse(versionstring)) versions.sort(reverse=True) return versions[0] @@ -110,9 +110,14 @@ def check_latest_version(): ) -def get_installed_version(): - """returns the version name (e.g. 2.0.0b58) that is installed""" - return pkg_resources.parse_version(__version__) +def parse_version(versionstring: str) -> packaging_version.Version: + """Parse a version string into a Version object.""" + return packaging_version.parse(versionstring) + + +def get_installed_version() -> packaging_version.Version: + """Get the installed version of CumulusCI.""" + return parse_version(__version__) def win32_long_paths_enabled() -> bool: diff --git a/cumulusci/tasks/salesforce/update_profile.py b/cumulusci/tasks/salesforce/update_profile.py index 2aca7de9ab..a9f54139eb 100644 --- a/cumulusci/tasks/salesforce/update_profile.py +++ b/cumulusci/tasks/salesforce/update_profile.py @@ -1,7 +1,7 @@ import os from collections import defaultdict -import pkg_resources +from packaging import version from cumulusci.core.exceptions import CumulusCIException, TaskOptionsError from cumulusci.core.utils import process_bool_arg, process_list_arg @@ -69,10 +69,8 @@ def _init_options(self, kwargs): # not be using a custom `package.xml` min_cci_version = self.project_config.minimum_cumulusci_version if min_cci_version and "package_xml" not in self.options: - parsed_version = pkg_resources.parse_version(min_cci_version) - default_packages_arg = parsed_version >= pkg_resources.parse_version( - "3.9.0" - ) + parsed_version = version.parse(min_cci_version) + default_packages_arg = parsed_version >= version.parse("3.9.0") else: default_packages_arg = False diff --git a/pyproject.toml b/pyproject.toml index d840b1eb9e..db44ec55c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,7 @@ dependencies = [ "defusedxml", "lxml", "MarkupSafe", + "packaging>=23.0", "psutil", "pydantic<2", "PyJWT",