CumulusCI icon indicating copy to clipboard operation
CumulusCI copied to clipboard

generate_and_load_from_yaml task record type extraction fails for namespaced custom objects

Open RobertoMartinez-districtm opened this issue 3 years ago • 3 comments

Describe the bug

Normally resolving record types for standard objects works no problem. However, when running _generate_and_load_from_yaml with a recipe that generates records for a namespaced custom object, The following exception occurs

`[05/17/22 23:11:00] Running step: Insert Campaign_Product_Performance__c Extracting Record Types for Demand_SelfSrv__Campaign_Product_Performance__c Exception in task generate_and_load_from_yaml

Error: A record type mapping table was not found in your dataset. Was it generated by extract_data? 'Demand_SelfSrv__Campaign_Product_Performance__c_rt_mapping' `

However if I set the inject_namespaces option to false and manually add the prefix to all custom metadata in the snowfakery recipe, the record types resolve and no exception is raised

Reproduction steps

  1. Create a custom object on a namespaced scratch org
  2. Add record types to that custom object
  3. Create snowfakery recipe with custom object and record types
  4. Run
    task: generate_and_load_from_yaml options: generator_yaml: path/to/recipe.yml drop_missing_schema: true inject_namespaces: true
  5. Exception should be raised

Your CumulusCI and Python versions

CumulusCI version: 3.58.0 Python version: 3.8.3

Operating System

Windows

Windows environment

Command Prompt

CumulusCI installation method

pipx

Error Gist

https://gist.github.com/RobertoMartinez-districtm/3100e86244b30f7aa4e0d388e258cb0d

Additional information

2GP unlocked package running dev_org_namespaced flow on a namespaced scratch org

Did anyone get to reproduce the bug?

I think this bug is probably in load_data, not in Snowfakery. Filed as W-11242094.

davidmreed avatar Jun 02 '22 22:06 davidmreed

Hi @davidmreed , what's the status on this issue. Curious to find out 😄