forcedotcom / devops-center-feedback

61 stars 2 forks source link

Unable to Pull deleted Apex Classes #204

Open vishnuyadavalli opened 1 year ago

vishnuyadavalli commented 1 year ago

Describe the bug We deleted a bunch of Apex classes and Visualforce Pages. But only a few of them are showing up when we pull changes in work item.

To Reproduce Steps to reproduce the behavior:

  1. Deleted existing Apex classes
  2. Click Pull Changes button in Work Item

Expected behavior Only a few classes are showing up.

Screenshots image

image

Additional context Add any other context about the problem here.

EstebanRomero84 commented 1 year ago

Hello @vishnuyadavalli thanks for reporting this issue, I will start investigating it. Can you send me the orgId of the environment where you have DevOps Center package installed? And just to rule it out it, have you checked the ignored files?

vishnuyadavalli commented 1 year ago

Hi @EstebanRomero84 ,

Yes I checked Ignored files. They are not in ignored files. As you can see, only 1 apex class is pulled. But the rest of the classes are not pulled.

Org Id - 00DE0000000YgOr

EstebanRomero84 commented 1 year ago

Could you run the following query in the dev environment where you deleted the components? SELECT Id, MemberName, MemberType, IsNameObsolete, IsNewMember, RevisionCounter, LastModifiedDate FROM SourceMember ORDER BY RevisionCounter DESC You will need to select Use Tooling API

vishnuyadavalli commented 1 year ago

@EstebanRomero84 ,

Can find the deleted apex classes with the query. image

EstebanRomero84 commented 1 year ago

Thank you @vishnuyadavalli this is very helpful. Another question, how did you delete those classes? From setup, from dev console, sfdx, destructive deployment, or other way?

vishnuyadavalli commented 1 year ago

@EstebanRomero84 some from Dev Console, some form Setup ->Apex classes.

EstebanRomero84 commented 1 year ago

@vishnuyadavalli the org where you deleted the classes is a sandbox or a scratch org? And if the answer is sandbox, which type and when source tracking was enabled on it?

Thanks

vishnuyadavalli commented 1 year ago

@EstebanRomero84 Yes. It is a sandbox and created after source tracking is enabled.

EstebanRomero84 commented 1 year ago

@vishnuyadavalli the issue here seems to be related to the Source Member object, which DevOps Center uses to track changes. For some reason Source Member records were not created when you deleted those classes. We contacted internally the team that owns this functionality and they aware of this issue. You can track it here.

vishnuyadavalli commented 1 year ago

@EstebanRomero84 . Thanks you.

sdavis-AWP commented 12 months ago

I have also experienced this same issue. Deleted source that fails to create a source member record.

amtrack commented 1 month ago

Is there an update or Known Issue for it?

I rarely work with Sandboxes and when this was reported to me I was surprised.

From what I can see, this is how Source Tracking works in Sandboxes: