-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Namespace should be correctly tracked for managed packages (ENTERING_MANAGED_PKG) #508
Comments
Hi @biswajith-s-pso-maxval thanks for the report. VS Code Version: Early analysis Briefly the issue is we only get
We could be in either default, NS or NS2 in the above case since we could have exited ns before entering ns2 or we could have called ns2 from ns. If you have the If you share your log I can confirm this.
|
@biswajith-s-pso-maxval Here is the order
This obviously becomes a huge issue when there are multiple nested namespaces, because we have no idea of knowing when the exit occurred.
Does this seem like your case? |
Hi Luke,
You are correct. It's happening since there is no exit for Managed package
name space.
Let's raise a idea exchange to have this exit event for Managed package.
Given the popularity of your application, your team should raise it and we
all can upvote it.
…On Wed, 5 Jun, 2024, 12:42 am Luke Cotter, ***@***.***> wrote:
@biswajith-s-pso-maxval <https://github.com/biswajith-s-pso-maxval>
Here is an example of some SOQL that will be grouped under the default
namespace by that was actually in MyNs
image.png (view on web)
<https://github.com/certinia/debug-log-analyzer/assets/81575432/51cb8799-cb16-4a02-addc-67f5fff369a7>
I believe this is what is happening in your case and is not a bug but
really due to a lack of information in the logs.
Here is the order
1. DML occurs on MyObject__c from some unmanaged code
2. There is a trigger on MyObject__c in the namespace MyNs
3. DML always switches us to the default namespace since we can have
multiple triggers on an object in multiple namespaces
4. We get a ENTERING_MANAGED_PKG|MyNs event next, because we have a
trigger on MyObject__c in the MyNs namespace
5. We next get the SOQL, *BUT* since we never get an
EXITING_MANAGED_PKG event we might have left the trigger in MyNs, we
really have no idea.
6. Since we are unable to know whether we are in MyNs or default we
play it safe and assume default.
This obviously becomes a huge issue when there are multiple nested
namespaces, because we have no idea of knowing when the exit occurred.
1. ENTERING_MANAGED_PKG|MyNs
2. ENTERING_MANAGED_PKG|MyNs2
3. ENTERING_MANAGED_PKG|MyNs3
4. SOQL_EXECUTE_BEGIN
Does this seem like you case?
Can you review the previous comment and then I can take another looks?
If not I will have to close due to no response.
—
Reply to this email directly, view it on GitHub
<#508 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4X6WKKNPIIC7XYELFV6L7LZFYGQ7AVCNFSM6AAAAABG47HOQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBYGIZDGNZQGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@biswajith-s-pso-maxval Trigger in a managed pkg nested calls from one pkg to another Sequential pkg calls from unmanaged Here is what the classes in the mock packages look like
Next actions |
Under the Analysis tab or under the Call Tree tab, if we Group By Namespace then it shows up
But unfortunately, under the Database tab, the group by feature or filtering on Namespace doesn't work. It only shows default.
The text was updated successfully, but these errors were encountered: