Skip to content

force:source:status not adhereing to specific forceignore rules #119

Closed

Description

@toddhalfpenny

Summary

Remote metadata (e.g. custom fields, list views) are not being ignored for force:source:status in the same way that they are for force:source:pull when they are specifically mentioned. They show as remote changes for status even when they will not be pulled by pull, but they are not shown when for example ignoring with Account** or *.listView

Steps To Reproduce:

  1. Create new list view called All on account on a scratch org.
  2. Run force:source:status, you will see the remote change (correct)
  3. Add Account.All into .forceignore file
  4. Run force:source:status, you will still see the remote change (incorrect)
  5. Add *.listView into .forceignore file
  6. Run force:source:status, you will not still see the remote change; it is ignored correctly
  7. Remove *.listView from .forceignore file
  8. Run force:source:pull, you will not still see the remote change pulled down; it is ignored correctly

Additional information

Video of the issue being reproduced.

SFDX CLI Version - sfdx-cli/7.11.2-4a5bf6aa97 linux-x64 node-v10.15.3:

SFDX plugin Version

@oclif/plugin-commands 1.2.2 (core)
@oclif/plugin-help 2.2.0 (core)
@oclif/plugin-not-found 1.2.2 (core)
@oclif/plugin-plugins 1.7.8 (core)
@oclif/plugin-update 1.3.9 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.0.5 (core)
analytics 1.1.2 (core)
generator 1.1.0 (core)
salesforcedx 46.1.5 (core)
├─ force-language-services 46.3.0 (core)
└─ salesforce-alm 46.3.0 (core)

OS and version:
Linux - Ubuntu 18.04

Activity

  1. nickmorozov commented on Jun 20, 2019

    @nickmorozov

    Can confirm, I've encountered this before.

  2. added
    bug
    on Feb 25, 2020
  3. dcarroll commented on Feb 25, 2020

    @dcarroll
    Contributor

    @clairebianchi @amphro Does anyone on the CLI team know about this issue?

  4. mshanemc commented on Jun 4, 2020

    @mshanemc
    Contributor

    @toddhalfpenny is this still true? When I create a list view in the org, it doesn't show up in source:status

  5. dcstuff commented on Feb 14, 2021

    @dcstuff

    @mshanemc Confirmed this is still happening! Fresh scratch org. I had modified some listviews on some custom objects.

    First errors came down that it could not find certain listviews on some wacky standard objects which I had never heard of -- exactly this person's issue, dated Jan 11: https://developer.salesforce.com/forums/?id=9062I000000IWO4QAO

    The only workaround that worked was adding the following to my .forceignore.

    ProductServiceCampaignItem.All_ProductServiceCampaignItems
    ProductServiceCampaignItem.My_ProductServiceCampaignItems
    ProductServiceCampaignItem.My_RecentProductServiceCampaignItems
    ShiftTemplate.My_RecentShiftTemplates
    ShiftTemplate.My_ShiftTemplates
    ShiftTemplate.All_ShiftTemplates
    
  6. mshanemc commented on Sep 28, 2021

    @mshanemc
    Contributor

    Here's the plan for this:

    What if we showed them in status output, but mark that they are subject to ignoring (that way, you could use source:status to ask the server what's changed and realize you need to update your .forceignore) vs. just wondering why it's not there.

    Then you'd be able to know what would be pulled before you run pull.

    @W-9805809@

  7. mshanemc commented on Apr 1, 2022

    @mshanemc
    Contributor

    closed with new commands GA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions