All Apps and Add-ons

Feature Request: AppInspect to check for absolute paths

gsopkoTC
Path Finder

All one has to do is search Splunk Answers as such...

https://answers.splunk.com/search.html?f=&redirect=search%2Fsearch&sort=relevance&q=ImportError%3A+N...

...to see that there are a lot of apps finding conflicting Python libraries/modules. A cause for this is that most apps that I have seen that I have encountered this issue have not specified an absolute path as suggested via Splunk SDK documentation, as well as what's provided in the example init py here (line 17):

https://github.com/splunk/splunk-sdk-python/blob/master/splunklib/__init__.py#L17

A step that would mitigate this would be for the AppInspect program to look for this:

from future import absolute_import

And if not, reject the app with a statement regarding that the app needs to be built to utilize absolute versus relative paths. Otherwise, we'll all continue to have the problem of apps stumbling into another app directory looking for a Python library and throwing an error. Other steps should also be taken to prevent, but this is a good start and can be readily automated.

0 Karma
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!

Review:





Or Learn More in Our Blog >>