-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allure Reports throws a NullPointerException #76
Comments
For what its worth, our bamboo agents are all running on the Amazon Elastic Compute Cloud |
summon @vbragin |
summon @smecsia |
1 similar comment
@krmahadevan We're running this plugin with both Elastic Bamboo agents and Per-build-containers with no issues. Although we also have "Artifact handlers" feature enabled with artifacts being uploaded to AWS S3.
|
To be frank, I dont know. I can talk to our DevOps and find this out. Any specific things, that I should be asking them ?
Yes, when I export the
Sure I can try doing that. But I would like to know as to what causes Bamboo to return back a null provider? The same setup works fine when I spin off a bamboo instance via If I could get some pointers around which aspects of the bamboo setup do I need to poke around, I can work with our DevOps to get insights around this and fix it accordingly. |
ping @smecsia |
@smecsia - would appreciate if you could please help me with this? |
@krmahadevan apologies for the long response...
Ask them specifically about the artifacts storage and how it's configured. I'm not very familiar with typical Bamboo set-ups, but AFAIK there are different extensions that allow you to store artifacts in different storages (e.g. S3). I believe, answer to this question would give us more info for further investigation. |
@smecsia - Thank you for those inputs. I will check with our devops folks and get more information. |
@smecsia - The logs that I had shared earlier, had some hints around the handler that was getting involved in my case
Its basically of type Do you think that because the nodes are dynamic (as in they get spun off when needed) would cause confusion here, because the artifacts are getting generated in the node, but somehow aren't available to the server (the master node from where the allure command line attempts at generating reports out of them) ? |
@krmahadevan looks like it. Since Agent Local Artifact Handler stores artifacts on the agent's disk and report generation is happening on the server's side, it simply cannot download artifacts from there. I think we could implement a workaround by accessing Bamboo artifacts directly through the artifacts servlet or find the way how Bamboo serves such artifacts from the artifacts view. TBH I'm not 100% sure how this works. Probably it needs extra hacking and debugging. |
Here's what was causing the problem. The plan was configured to run on elastic bamboo agent. So after the job runs to completion I believe the node was being recycled and the allure reporting command line was trying to refer to a path that doesn't exist and thus resulting in NullPointerException. I worked with our dev ops team to basically reconfigure the job to run on a local agent after which the problem got resolved. The reason why I didn't consider this as a problem was because I wasn't sure if this would even be a cause. Closing this issue. Thanks for the inputs @smecsia which helped me investigate in the right direction. |
@smecsia @krmahadevan how can we prevent such kind of problems in future? Maybe add a notice to docs/readme or add some additional logging in plugin? |
@baev - There were a couple of issues that goofed me up and caused a long time before narrowing down the issue.
I came to this conclusion because in our bamboo installation, we had defined the temporary folder and had it pointed to a folder via a symbolic link. I am not sure if Java would be able to follow up symbolic links. So I made the above change locally and got it working. Because of both the above issues, I never was able to narrow down to the agent nature to be the root cause of the problem. So yes, the code definitely could use some additional logging (but then again, this would be visible only if a user has access to the bamboo logs, which am not sure is possible with everyone). So instead of doing a null check later, we could perhaps add a null check here and if there was a |
I am making use of the latest released version of the bamboo allure plugin viz.,
1.11
Our Bamboo cluster has more than one remote agents that are running.
I have setup the allure plugin but when generating reports, here's what I see as an exception
I have checked out the codebase, added some debug statements and built the plugin and our DevOps team install the plugin, turned on the logs and this is what I see
Here's my analysis on this so far :
In this section
artifactLinkManager.getArtifactLinkDataProvider(artifact);
is returning back anull
todataProvider
and so the call eventually goes todownloadAllArtifactsTo(dataProvider, stageDir, "");
which has an edit check to see if it got a null value as seen hereI am not able to figure out as to why would this happen.
I can't afford to keep having multiple debug sessions with our DevOps team as well who are the admins for Bamboo.
So my question here is:
I have made framework changes to adopt allure and didn't see this coming until I got into bamboo for execution. It would be a real shame for me to undo all the allure reporting adoption and either go after something else or build my own.
Before I start exploring that, please do let me know if you folks have seen this.
cc @baev
The text was updated successfully, but these errors were encountered: