Replies: 7 comments 15 replies
-
|
related proposal |
Beta Was this translation helpful? Give feedback.
-
|
We have worked around the lack of The thing we'd really like is to have the globbing behavior of the merging of package directories documented. That is, which directory (first, or last, or alphabetically?) wins when two package directories contain the same metadata? |
Beta Was this translation helpful? Give feedback.
-
|
Part of my interest in this issue is in it being totally clear how third party tools should interpret metadata workspaces. As @daveespo mentions the problem here is this has not been documented anywhere that I have found. This is clearly very bad for such tools but its also pretty terrible state in general because we can't ever be sure how the metadata might end up and org, it's entirely dependent on the push/deploy version and the features/bugs contained within. To be fair the same is actually true of the MDAPI, but the difference is there are years of convention behind how MDAPI works and its been very very stable. To deal with this in the tools I work on we flag any sfdx-project.json that does not set PPDS with an error since we don't know how to accurately interpret the metadata it contains. If you don't want to continue to support PPDS I think that is OK as long as you error if it is set when you are going to do something that would silently ignore it. Obviously it's fairly easy for us to script our own deploy handling for when PPDS is set so we get the consistent behaviour we need. Another option that might be worth looking at is not supporting source tracking with PPDS. I would guess it's very likely that if you care about PPDS you really don't care about source tracking. |
Beta Was this translation helpful? Give feedback.
-
|
Hello @mshanemc, Thanks for bringing it to my attention. To be honest, the solution would be a series of fixes on the underlying Metadata API; most of the other arguments are workaround on existing limitations - except for the merge of contents under different folders. The usual use case is 3, and the usual workaround is to create either a bash script or something similar (but again, if MDAPI - Metadata API - had not required ordering some metadata then we wouldn't have this problem, which would be the ideal scenario). For ISVs, I tend to assume they can leverage CumulusCI instead of rolling their own (that is what I would probably do if I get there again); for customers is a little trickier but some may end up relying on vendor solutions anyway. |
Beta Was this translation helpful? Give feedback.
-
|
Hack |
Beta Was this translation helpful? Give feedback.
-
|
@mshanemc @iowillhoit @cromwellryan I don't know if ChatGPT 4 is lying or if he has already analyzed a hidden package you guys are creating. Look what he suggested to me "Oops" hahahaha |
Beta Was this translation helpful? Give feedback.
-
|
If you are using an onion design pattern then you want to ensure noone is developing code that references code outside of their layer, only inward. Using directories and pushPackageDirectoriesSequentially for your onion layers you can validate that. Upvoted. |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We've gotten a few people asking why
sf project deploy startintentionally doesn't supportpushPackageDirectoriesSequentially.First, make sure you've read the migration docs.
Long ago, the
force:source:pushwould deploy pkgDirs sequentially, 1 deployment for each folder. Deploys are slow, so for the vast majority of users, it's better to do merge all the pkgDirs into 1 deployment. It really sucked if you changed a file in 2 different package directories and pushed it (you just did 2 deployments for no reason!)When the CLI moved to using the much faster SDR library to match what VSCode Extensions did, the default behavior became "merge the pkgDirs and deploy them in one go". There were a few people who that didn't work for, so we created the
pushPackageDirectoriesSequentiallyproperty insfdx-project.jsonto opt-in where the old behavior was required--props to @kjonescertinia for that ideaWhen we created the new
project deploycommands, we wanted this to be simpler. If you really need multiple deployments in a specific order, you can call the deploy command however you need and that's decoupled from your folder structure.Use case 1
You have lots of pkgDirs because things are modular.
Ais large but under the limit,B/C/Daren't as big, butA+B+C+Dcombined are above the limit. When you want to deploy the entire project to a new folder, you could say (and put in yourinitscript)Now you've only got 2 deploys instead of 4! Metadata deployments are slow enough so why do extra ones?
Bonus: you couldn't run the same commands to deploy to a Full Sandbox or Prod or Packaging Org (something
pushcould never do).And if you change a file in A and another file in C, then
sf project deploy startonly has to do 1 deployment.Use case 3
Metadata type
Xhas to go before the other types.sf project deploy start -m Xsf project deploy start(that deploys the rest of the changes. You could use -d or -x if you want something that will deploy to any org)Now you can organize your project logically instead of based on metadata API quirks.
Other design considerations
We heard that a lot.
At a high level, we didn't like (and y'all found confusing) the weird gaps between
source:pushandsource:deploy.pushonly works with tracking orgs. Thesource:deployyou have to opt into tracking or it breaks tracking.source:deploycould specify [metadata types, files, manifest]pushis only synchronous, and if it times out or gets disconnected, you're in a broken state.deploycould be async, and has a siblingreportcommandBy unifying the functionality of
source:pushandsource:deploy, we gotresumewill get the deploy results and update your tracking files corretlyThose features are really, really challenging support across multiple deployments. We were already taking multiple DeployResults from the metadata API response and trying to make it "feel" like one. It's hard to get exactly right.
Now imagine there's a timeout in
pushafter deploy 1 of 5 pkgDir. That's hard to resume or report details from. You would never be able to do--asyncbecause the cli would need to do one deploy and then initiate the next.OK, you read all that and still think you can't live without
pushPackageDirectoriesSequentially?Vote this up, and explain why, and what you'd like to see.
Beta Was this translation helpful? Give feedback.
All reactions