SFDO-Tooling / CumulusCI

Python framework for building portable automation for Salesforce projects
http://cumulusci.readthedocs.io
BSD 3-Clause "New" or "Revised" License
363 stars 242 forks source link

generate_and_load_from_yaml task record type extraction fails for namespaced custom objects #3203

Open RobertoMartinez-districtm opened 2 years ago

RobertoMartinez-districtm commented 2 years ago

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_SelfSrvCampaign_Product_Performancec 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_SelfSrvCampaign_Product_Performancec_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

RobertoMartinez-districtm commented 2 years ago

Did anyone get to reproduce the bug?

davidmreed commented 2 years ago

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

RobertoMartinez-districtm commented 1 year ago

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