solenopsis / Solenopsis

A deployment tool for Salesforce
http://solenopsis.github.com/Solenopsis/
Other
104 stars 41 forks source link

delta-push adds all workflows to the package #261

Open pcon opened 6 years ago

pcon commented 6 years ago

It appears that delta-push adds all the .workflow files to package regardless of if they have been changed or not.

This is a problem because if you have outbound messages in a workflow, the queue becomes paused during a deployment (even during a quick-deploy)

sfloess commented 6 years ago

Note to self - when testing don't use the XSLT.

sfloess commented 6 years ago

@pcon - this is odd...something is wonky with the dir-diff macro-def. I grabbed a sample workflow file and applied meld using what would be pushed (via sf.dryRun) and what is present: meld reports no diff.

Keep in mind, this is my using cached-delta-push.

Anyway, I'm on it...

sfloess commented 6 years ago

@pcon - which xslt(s) for workflows should be ignored? Outgoing_Message__c_pull.xsl ???? Or all?

solenopsis-bot commented 6 years ago

It was the case.workflow. The xslt strips out outbound message

On Sat, May 12, 2018, 10:02 Scot P. Floess notifications@github.com wrote:

@pcon https://github.com/pcon - which xslt for workflows should be ignored? Outgoing_Message__c_pull.xsl ???? Or all?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/solenopsis/Solenopsis/issues/261#issuecomment-388557355, or mute the thread https://github.com/notifications/unsubscribe-auth/AKH3PzO4c9ys4Ejsj59HFSk1GN7V2IeWks5txuttgaJpZM4TQhuK .

sfloess commented 6 years ago

@pcon - ack...lemme try to figure this out :+1:

sfloess commented 6 years ago

@pcon - I'm confused as I did a pull from dev and the pulled Case.workflow is missing the Outbound element...whereas in git it's there...am I misunderstanding?

solenopsis-bot commented 6 years ago

We remove it from the workflow file via the xslt because of this issue.

On Sat, May 12, 2018, 11:06 Scot P. Floess notifications@github.com wrote:

@pcon https://github.com/pcon - I'm confused as I did a pull from dev and the pulled Case.workflow is missing the Outbound element...whereas in git it's there...am I misunderstanding?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/solenopsis/Solenopsis/issues/261#issuecomment-388561313, or mute the thread https://github.com/notifications/unsubscribe-auth/AKH3P1-9RLCAoe0kFKyQE2cXIkMgovwJks5txvp5gaJpZM4TQhuK .

sfloess commented 6 years ago

@pcon - so is the core issue related to package.xml and workflows being defined in it? I don't think I grok what is happening here. For example, if the Outbound element is removed on pull, but is exists in git, I'd expect the two files are different and will be included in the push

solenopsis-bot commented 6 years ago

I'll try to explain better later today. Worst case we can talk on Monday

On Sat, May 12, 2018, 11:12 Scot P. Floess notifications@github.com wrote:

@pcon https://github.com/pcon - so is the core issue related to package.xml and workflows being defined in it? I don't think I grok what is happening here. For example, if the Outbound element is removed on pull, but is exiss in gut, I'd expect the two files are different and will be included in the push

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/solenopsis/Solenopsis/issues/261#issuecomment-388561698, or mute the thread https://github.com/notifications/unsubscribe-auth/AKH3P2DHO7sY5PMb6TVVPFUYpD9Irh5yks5txvvtgaJpZM4TQhuK .

sfloess commented 6 years ago

@pcon - being that it's Mother's Day weekend, spend your time with the wife :) Monday is fine... I just feel bad I've neglected this project for so long lately :(

pcon commented 6 years ago

Here's the problem. If we run a delta-push and you inspect the workflows directory, you'll see that every workflow file is in there regardless of if it differs from the pull or not. I think that delta-push should only include files that differ in the zip. The reason I pointed out case.workflow is that is the primary one that is hurting us. It's probably easier to test with the others rather than with that one since it's being modified by an XSLT at the moment.

sfloess commented 6 years ago

@pcon - ack... I will look at it this weekend again :)

sfloess commented 6 years ago

@pcon - we may need to chat about this. I cannot get all workflows as candidates for deploy. Here is what I did:

Only a handfull of workflows were present in /tmp/sfloess/solenopsis/1.1/dev/file-push/workflows/

I then moved the ccm XSLT workflow dir over to bak.workflow and reran the above. Here is what I get:

> ls /tmp/sfloess/solenopsis/1.1/dev/file-push/workflows/
Case_Comment__c.workflow  ExternalEventMapping.workflow  Question.workflow         SnapshotAuditEvent.workflow  WorkflowEmail__c.workflow
Case.workflow             LiveChatTranscript.workflow    QuickTextAction.workflow  SnapshotBin.workflow
Escalation__c.workflow    Outgoing_Message__c.workflow   Reply.workflow            SnapshotConfig.workflow

When running bsolenopsis -Dsf.dryRun=true delta-push here is what I see:

> ls /tmp/sfloess/solenopsis/1.1/dev/file-push/workflows/
Case_Comment__c.workflow  ExternalEventMapping.workflow  Question.workflow         SnapshotAuditEvent.workflow  WorkflowEmail__c.workflow
Case.workflow             LiveChatTranscript.workflow    QuickTextAction.workflow  SnapshotBin.workflow
Escalation__c.workflow    Outgoing_Message__c.workflow   Reply.workflow            SnapshotConfig.workflow

Am I missing something?

pcon commented 6 years ago

If I run this against my personal environment

[pcon@pconnell workflows]$ pwd
/tmp/pcon/solenopsis/1.1/pconnell/file-push/workflows
[pcon@pconnell workflows]$ ls
AccountAccess__c.workflow               Entitlement_Process_Association__c.workflow         PhysicalAddress__c.workflow
AccountHistory__c.workflow              Entitlement_To_Engineering_Product_Map__c.workflow  ProblemSymptom__c.workflow
Account_Members__c.workflow             Entitlement.workflow                                Product2.workflow
AccountNote__c.workflow                 Escalation_Case__c.workflow                         Product__c.workflow
Address__c.workflow                     Escalation_Comments__c.workflow                     ProductToBusinessUnit__c.workflow
Article_Version__c.workflow             Escalation_Response__c.workflow                     Product_To_Engineering_Product_Map__c.workflow
Ascension__c.workflow                   Escalation_Router__c.workflow                       Question.workflow
Asset.workflow                          Escalation_Team__c.workflow                         QuickTextAction.workflow
AssistantProgress.workflow              Event.workflow                                      QuickText.workflow
Book__c.workflow                        ExchangeUserMapping.workflow                        Reply.workflow
Bookmark__c.workflow                    ExternalEventMapping.workflow                       Reports_To__c.workflow
BugComment__c.workflow                  External_Tracker__c.workflow                        RFE__c.workflow
BugzillaBug__c.workflow                 External_Tracker_Update__c.workflow                 RHAssociate__c.workflow
BugzillaComment__c.workflow             FeatureFlag__c.workflow                             SandboxEmailWhitelist__c.workflow
BugzillaFlag__c.workflow                Feedback__c.workflow                                ServiceContract.workflow
BugzillaFlagType__c.workflow            FeedItem.workflow                                   SFDC_Product_To_Engineering_Product_Map__c.workflow
CampaignMember.workflow                 FileAttachmentApp__c.workflow                       Shadow_SLA_Process__c.workflow
Campaign.workflow                       File_Attachment__c.workflow                         Site.workflow
CaseFolder__c.workflow                  Group_Member__c.workflow                            Skill__c.workflow
CaseGroupRole__c.workflow               Idea.workflow                                       SKU_To_Engineering_Product_Map__c.workflow
CaseGroupRole_Group__c.workflow         Incoming_Message__c.workflow                        SMXConfiguration__c.workflow
CaseGroupRole_Member__c.workflow        KCS_Settings__c.workflow                            SnapshotAuditEvent.workflow
CaseHistory__c.workflow                 Large_Case_Field_Entry__c.workflow                  SnapshotBin.workflow
CaseJournal__c.workflow                 Lead.workflow                                       SnapshotConfig.workflow
CaseNotificationAddress__c.workflow     LiveAgentSession.workflow                           SocialPersona.workflow
Case_Resource_Relationship__c.workflow  LiveChatTranscriptEvent.workflow                    SocialPost.workflow
Case_Snapshot__c.workflow               LiveChatTranscriptSkill.workflow                    Solution.workflow
Case_Tag_Link__c.workflow               LogglySettings__c.workflow                          Span__c.workflow
Case.workflow                           MacroAction.workflow                                State__c.workflow
Comment_Review__c.workflow              MacroInstruction.workflow                           StreamingChannel.workflow
ComplianceQuestionaire__c.workflow      Macro.workflow                                      SurveyConfiguration__c.workflow
Configured_SKU_Attribute__c.workflow    Management_Action__c.workflow                       SymptomResource__c.workflow
ContactAccount__c.workflow              Manages__c.workflow                                 SystemProfile__c.workflow
ContractLineItem.workflow               Negotiated_Entitlement_Process__c.workflow          Task.workflow
Contract.workflow                       NonPrimaryBillingAddress__c.workflow                Team_Member__c.workflow
Country__c.workflow                     NonPrimaryShippingAddress__c.workflow               Telephone__c.workflow
County__c.workflow                      NotificationAddress__c.workflow                     Third_Party_Partner__c.workflow
CSAT_Survey__c.workflow                 NPS_Survey__c.workflow                              User_Case_Contact__c.workflow
Daily_Breaches__c.workflow              ObjectSnapshot__c.workflow                          User_Data__c.workflow
DuplicateRecordItem.workflow            Object_Tag__c.workflow                              UserLicense.workflow
DuplicateRecordSet.workflow             OpportunityLineItem.workflow                        UserProvisioningRequest.workflow
ElectronicAddress__c.workflow           Opportunity.workflow                                User.workflow
EmailMessage.workflow                   Organization.workflow                               Version__c.workflow
Email_Settings__c.workflow              Org_Settings__c.workflow                            View__c.workflow
Engineering_Product__c.workflow         Outgoing_Message__c.workflow
EntitlementContact.workflow             PerfEngLiaison__c.workflow

If I run a diff on this directory I get

[pcon@pconnell workflows]$ pwd
/tmp/pcon/solenopsis/1.1/pconnell/file-push/workflows
[pcon@pconnell workflows]$ diff -rq . ~/ccm/src/workflows/
Only in /home/pcon/ccm/src/workflows/: Account.workflow
Only in /home/pcon/ccm/src/workflows/: Article__c.workflow
Only in /home/pcon/ccm/src/workflows/: Bug__c.workflow
Only in /home/pcon/ccm/src/workflows/: Case_Comment__c.workflow
Files ./Case.workflow and /home/pcon/ccm/src/workflows/Case.workflow differ
Only in /home/pcon/ccm/src/workflows/: Contact.workflow
Only in /home/pcon/ccm/src/workflows/: Escalation__c.workflow
Only in /home/pcon/ccm/src/workflows/: KCS_Link__c.workflow
Only in /home/pcon/ccm/src/workflows/: LiveChatTranscript.workflow
Only in /home/pcon/ccm/src/workflows/: SymptomSolution__c.workflow
Only in /home/pcon/ccm/src/workflows/: WorkflowEmail__c.workflow

I originally thought that the ones showing as only in the source were in the sfdc ignore file but the ones in that file do not exist in either location. The Case.workflow I expected because we are applying a _push.xsl so it should differ from what's on disk.

Oddly, what's in the folder-pull directory are the ones that show as only in the source directory

[pcon@pconnell workflows]$ pwd
/tmp/pcon/solenopsis/1.1/pconnell/folder-pull/workflows
[pcon@pconnell workflows]$ ls
Account.workflow     Bug__c.workflow           Case.workflow     Escalation__c.workflow  LiveChatTranscript.workflow  WorkflowEmail__c.workflow
Article__c.workflow  Case_Comment__c.workflow  Contact.workflow  KCS_Link__c.workflow    SymptomSolution__c.workflow

So, what I think may be happening is that the folder-pull is not getting all of the workflows pulled down (or written to disk) for some reason. This is the same for me when I do it against dev as well.

sfloess commented 6 years ago

@pcon - thanks for the detailed information! This will greatly assist me :)

Let's see what I can get done on this :+1:

sfloess commented 6 years ago

@pcon - spent about 2hrs tonight trying to understand what's going on here... Alas, I am woefully confused... I'll figure it out - more a status update for you :)

sfloess commented 6 years ago

@pcon - looking at this again today. So here is what I did:

Either I am really confused, or our environments are running differently somehow?