oracle/oci-python-sdk

Calling oci python sdk from Jenkins causes timed out

alessandratesta opened this issue · 2 comments

python code running directly on a linux machine(other then the machine of OCI) works perfectly. Called by Jenkins retrieves time out.

def resource_search(v_pdb):

config = oci.config.from_file("~/.oci/config","DEFAULT")

search_client = oci.resource_search.ResourceSearchClient(config)
database_client = oci.database.DatabaseClient(config)


# Initialize service client with default config file
resource_search_client = oci.resource_search.ResourceSearchClient(config )

#print(os.environ)



free_text_search = oci.resource_search.models.FreeTextSearchDetails(text=v_pdb,
                                                                    type='FreeText',
                                                                    matching_context_type=oci.resource_search.models.SearchDetails.MATCHING_CONTEXT_TYPE_HIGHLIGHTS)

for response in oci.pagination.list_call_get_all_results_generator(search_client.search_resources, 'response', free_text_search):
    for resource in response.data.items:
        print("Resource type: {}, Resource name: {}, Resource identifier: {} ".format(resource.resource_type, resource.display_name,resource.identifier))

def main(argv=None):
pdb = sys.argv[1]

resource_search(pdb)

if name == "main":
main(sys.argv)

ERROR:root:error loading spec <<python_path>>/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType
ERROR:root:error loading spec <<python_path>>/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType
ERROR:root:error loading spec <<python_path>>/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType
ERROR:root:error loading spec <<python_path>>/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType

The proxy environment variable needed to be set.