Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Not clearly error message displayed after enter an invalid job_id when view jobs #32

Open
wangxin921012 opened this issue Jun 13, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@wangxin921012
Copy link

wangxin921012 commented Jun 13, 2018

Describe the bug
Not clearly error message displayed after enter an invalid job_id when view jobs

To Reproduce
Steps to reproduce the behavior:

  1. Run command "%adl viewjob"
  2. Set a invalid job id, like this "%adl viewjob --account devtooltelemetryadla --job_id 43f9deef-9235-4a1c-a9e1-f598grd27225"(or you can enter other invalid job id)
  3. Observe the result

Expected behavior
Should give the error message as "CloudError: Azure Error: JobNotFound
Message: Job is not found."

Screenshots
image
For more details about error please refer to section [Additional context]

Desktop (please complete the following information):

  • OS: [Windows 10]
  • Browser [chrome]
  • Jupyter Version 5.5.0

Additional context
Viewing azure data lake job by id '43f9deef-9235-4a1c-a9e1-f598grd27225' under account 'devtooltelemetryadla'...

CloudError Traceback (most recent call last)
in ()
----> 1 get_ipython().run_line_magic('adl', 'viewjob --account devtooltelemetryadla --job_id 43f9deef-9235-4a1c-a9e1-f598grd27225')

d:\program files (x86)\python36-32\lib\site-packages\IPython\core\interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2129 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2130 with self.builtin_trap:
-> 2131 result = fn(*args,**kwargs)
2132 return result
2133

in adl(self, line, cell)

d:\program files (x86)\python36-32\lib\site-packages\IPython\core\magic.py in (f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):

d:\program files (x86)\python36-32\lib\site-packages\adlmagics\adlmagics_main.py in adl(self, line, cell)
65
66 magic = self.__magics[cmd]
---> 67 return magic.execute(arg_string, cell)
68
69 def __register_azure_magic(self, azure_magic_class):

d:\program files (x86)\python36-32\lib\site-packages\adlmagics\magics\adla\adla_job_viewing_magic.py in execute(self, arg_string, content_string)
15 self._write_line("Viewing azure data lake job by id '%s' under account '%s'..." % (args.job_id, args.account))
16
---> 17 job = self._adla_service.retrieve_job(args.account, args.job_id)
18
19 self._write_line("Azure data lake job info:")

d:\program files (x86)\python36-32\lib\site-packages\adlmagics\services\adla_service_sdk_impl.py in retrieve_job(self, account, job_id)
50 job_client = DataLakeAnalyticsJobManagementClient(self.__token_service.credentials, AdlaJobConsts.adla_job_dns_suffix)
51
---> 52 job = job_client.job.get(account, job_id)
53
54 return AdlaJob(job.job_id, job.name, job.type.name, job.submitter, job.degree_of_parallelism, job.priority, job.submit_time, job.start_time, job.end_time, job.state.name, job.result.name)

d:\program files (x86)\python36-32\lib\site-packages\azure\mgmt\datalake\analytics\job\operations\job_operations.py in get(self, account_name, job_identity, custom_headers, raw, **operation_config)
261 exp = CloudError(response)
262 exp.request_id = response.headers.get('x-ms-request-id')
--> 263 raise exp
264
265 deserialized = None

CloudError: Azure Error: InvalidArgument
Message: Body is invalid.

@ruixinxu ruixinxu added the enhancement New feature or request label Jun 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants