forcedotcom / devops-center-feedback

61 stars 2 forks source link

Not all components deployed to next stage org #223

Open RRIEMEA opened 1 year ago

RRIEMEA commented 1 year ago

I created a field with field level sec & flow & page layout. All component changes are in GIT. Except profiles look strange. Lot's of deletions. Also page layout changes are correctly in Git, but are not deployed to next org. As well as field level security is not deployed. New field itself and Flow is correctly deployed.

geomuck commented 1 year ago

Yes, Profile metadata is... not great.

https://developer.salesforce.com/docs/atlas.en-us.232.0.sfdx_dev.meta/sfdx_dev/sfdx_dev_source_tracking_source_tracking_profiles.htm

Basically: when retrieved, the Profile metadata will only contain information about the objects selected during that same retrieve. That can lead to the case that you described, where it looks like a lot of information has been removed from the Profile. But: Profile deploys are additive, so deploying the Profile won't actually REMOVE any information from your target org.

FLS in the Profile will only be included if you include the Object also in your commit (not just the field), for the reason above. You can find your Object under Add Components Manually, then search for Custom Objects.

I'm not sure about the page layout not deploying, though. Can you elaborate on "not deployed to next org" please?

RRIEMEA commented 1 year ago

Ok, makes sense for the profile and the FLS. Thanks for the heads up.

For the page layout: When I created the new field I drag it onto the page layout and also realigned other fields. The changes are in GIT. But when I deploy from Dev to UAT and from there to Prod, the changed pagelayout is not deployed.

geomuck commented 1 year ago

Very strange! Can you please double-check that layouts aren't specified in your project's .forceignore file?

Also, if you're willing, please provide me with your organization ID. I can dig in to some logs, too, to look for some reason why the layouts wouldn't be deployed.

Thanks!

RRIEMEA commented 1 year ago

It's not in .forceignore. I could provide OrgId, but would prefer a less public way.

Thanks!

geomuck commented 1 year ago

Of course! Please feel free to DM me in the Community:

https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000GuygSAC?tab=discussion&sort=LAST_MODIFIED_DATE_DESC

geomuck commented 1 year ago

OK, if you're willing, let's try some sleuthing:

For the promotion where the layout didn't get deployed, I'd like to determine if the Layout metadata was even included in the deployment or not. To figure that out:

1) Log in to the org where the code was deployed INTO, and then navigate to Setup -> Deployment Status 2) Grab the deployment ID from that page 3) Open up https://workbench.developerforce.com, and log in to that same org (use API version 56.0, as 55.0 seems to have a bug at the moment) 4) In Workbench, navigate to Utilities -> Metadata API Process Status 5) Provide the deployment ID from step two into the form, and select "Deploy", then "Get Status"

Expand the componentSuccesses area to see which pieces of metadata were considered to be successfully deployed. Is your Layout present in there?

Screen Shot 2022-10-27 at 3 22 06 PM

KauseJCeili commented 1 year ago

Hi, we are having the same issue regarding Page Layouts. I followed your suggestion @geomuck and checked the Deployment Status using the Workbench. The Page Layouts are not mentioned there.