Closed nobodyiam closed 7 months ago
🤖
Hello @nobodyiam!
I'm Dosu, a friendly bot here to assist you with your Apollo issues while we're waiting for a human maintainer. I can help you solve bugs, answer questions, and guide you on how to become a contributor to Apollo. If you need anything, feel free to ask!
Based on the error log you provided, the issue seems to be originating from the ApolloAuditSpanAspect
class, specifically the auditDataInfluenceArg
method. This method is used to audit the arguments of the method that is being intercepted. It checks if the arguments have certain annotations (ApolloAuditLogDataInfluence
, ApolloAuditLogDataInfluenceTable
, ApolloAuditLogDataInfluenceTableField
) and if so, it appends the data influence to the audit log.
The error message "Index 1 out of bounds for length 1" suggests that the code is trying to access an element at an index that is beyond the length of the array or list. This could be due to a discrepancy between the expected and actual number of arguments in the method being audited.
As for the createAppNamespaceInLocal
method in the AppNamespaceService
class, it is used to create a new AppNamespace in the local database. If the AppNamespace already exists, depending on whether it's a public or private namespace and whether it's in the same or different application, the method may throw a BadRequestException
or create the AppNamespace.
However, without more information, it's hard to pinpoint the exact cause of the issue. It would be helpful if you could provide more details about the AppNamespace you're trying to create, such as whether it's a public or private namespace, whether it already exists, and if so, whether it's in the same or different application. Also, if you could provide the exact steps to reproduce the issue, it would be very helpful in diagnosing the problem.
In the meantime, you might want to check the arguments of the method being audited and ensure they match the expected annotations and number of arguments. Also, please ensure that the AppNamespace you're trying to create meets the conditions for successful creation as outlined in the AppNamespaceService
class.
I hope this helps! If you have any more questions or need further clarification, feel free to ask.
-Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
This seems an intermittent issue with the apollo-portal server, which occurred twice. Restarting the server appeared to resolve the problem temporarily. I'm uncertain about the root cause and would appreciate your assistance in investigating this matter further. Could you please take a look at it? @BlackBear2003 @Anilople
Found it!
The root cause is when trying to get method by reflect, I just simply use methodName to get method from the class before.
So when catching method with same name, it will cause some bad error, like the situation you mentioned:
Mainly because the implementation of this method is not good, so I improved this method and let me test it again! @nobodyiam
@BlackBear2003 Thanks for the quick response!
@BlackBear2003 I've reviewed the patch and it's working great. However, there seems to be a small issue with a possible null pointer exception. Could you take a quick look at the pull request comment to fix it? Thanks!
@nobodyiam I added a judgment to avoid possible null pointer exceptions 😃
Describe the bug The following errors occurred when creating namespaces.
To Reproduce Steps to reproduce the behavior:
Add Namespace
for any appSubmit
Expected behavior It should create the namespace successfully.
Additional Details & Logs