Comments (5)
@prakash-concret Thank you for the reproduction.
Root cause: This is related to a change made to that task as part of #1618 to move to Pydantic-based task option validation framework.
Workaround: The most straightforward workaround is to directly update your task to use parsed_options
instead:
diff --git a/tasks/example.py b/tasks/example.py
index f07dc6a..daa2a30 100644
--- a/tasks/example.py
+++ b/tasks/example.py
@@ -50,4 +50,4 @@ class FindReplaceUsername(FindReplace):
# Run the _init_options logic from FindReplace
super()._init_options(kwargs)
# Set the replace option to the org's username
- self.options["replace"] = self.org_config.username
+ self.parsed_options["replace"] = self.org_config.username
(Not applicable to your use case, but I want to note that some find/replace transforms are available in the deploy
task.
from cumulusci.
@prakash-concret @jstvz Yes this is the issue I am facing and even In 3.75.1 It's working fine.
But versions after that there it is not working as expected.
from cumulusci.
@sahilconcret This is working as designed. The FindReplace
task uses the replace
option as a literal replacement. Are you saying that your custom task previously worked as you describe? If so, what was the last version that did so?
from cumulusci.
@jstvz you are right, but overriding the option values using a custom Python class is not working.
For Example: Created a Python class to replace username names like this.
from cumulusci.tasks.util import FindReplace as FindReplace
class FindReplaceUsername(FindReplace):
salesforce_task = True # Require a target org
def _init_options(self, kwargs):
# Run the _init_options logic from FindReplace
super()._init_options(kwargs)
# Set the replace option to the org's username
self.options["replace"] = self.org_config.username
calling this custom task from cumulusci.yml
find_replace_username:
description: Replaces a string with the target org's username
class_path: tasks.util.FindReplaceUsername
options:
find: "%%%USERNAME%%%"
replace: userName
path: unpackaged/config/cmts/customMetadata
This custom implementation is not working in the new release, in the 3.74.0 version it's working fine.
@sahilconcret Please confirm this is an issue you are facing.
from cumulusci.
Thanks @jstvz @prakash-concret for your help.
In versions later that 3.75.1 we need to use self.parsedoptions instead of self.options.
That works perfectly.
from cumulusci.
Related Issues (20)
- Update Robot Framework dependency to v7.0
- `cci org remove` doesn't remove org HOT 2
- Exception in cci task upload_production - Malformed Request Error: The version number must be greater than the last Managed - Released version number HOT 10
- is_person_type error when running snowfakery HOT 7
- Help authenticating to devhub for 2gp nightly build workflow HOT 1
- cci flow run ci_beta AND cci task install_managed_beta DO not use the latest beta HOT 5
- Deleted Versions used for determining next version
- Invalid Lookup Error in Snowfakery Recipes HOT 13
- Enable configuration for cci version update sources HOT 2
- Repository is locked behind an IP Allow-list HOT 1
- Flow "push_upgrade_org" is incorrectly defined
- `update_admin_profile` task fails on namespaced org with Person Accounts enabled HOT 1
- Namespace not being added into Flow references in minority of cases HOT 1
- Snowfakery Batch Size and Just Once
- Error during cci task run retrieve_changes HOT 2
- find_replace transforms on XPath with predicates does not work
- retrieve_profile task seems to be missing some Metadata
- Package Versions Starting with 0 (0.1,0.2,0.3, etc.) Cause "does not exist" error When Referenced in cumulusci.yml Dependencies HOT 1
- Can't run test suites if project__test__name_match is defined
- cci task run get_installed_packages/uninstall_managed do not see 2GP beta
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cumulusci.