-
Notifications
You must be signed in to change notification settings - Fork 59
Compatible for bohrium OpenAPI sandbox #553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
aae7869
0a81a19
e82f431
7e1dbcc
2f110f1
4271112
bf2a23e
d2ba339
a0b3b52
46865e1
8d121ff
4857458
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -72,6 +72,7 @@ def __init__( | |||||||||||||
| self.init_remote_root = remote_root | ||||||||||||||
| self.temp_local_root = os.path.abspath(local_root) | ||||||||||||||
| self.remote_profile = remote_profile | ||||||||||||||
| os.makedirs(DP_CLOUD_SERVER_HOME_DIR, exist_ok=True) | ||||||||||||||
| access_key = ( | ||||||||||||||
| remote_profile.get("access_key", None) | ||||||||||||||
| or os.getenv("BOHRIUM_ACCESS_KEY", None) | ||||||||||||||
|
|
@@ -170,7 +171,7 @@ def upload_job(self, job, common_files=None): | |||||||||||||
| object_key = os.path.join(data["storePath"], zip_filename) # type: ignore | ||||||||||||||
| job.upload_path = object_key | ||||||||||||||
| job.job_id = data["jobId"] # type: ignore | ||||||||||||||
|
Comment on lines
170
to
172
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent error handling for API response fields. Lines 170 and 172 use direct indexing ( Apply this diff to use consistent safe access: - object_key = os.path.join(data["storePath"], zip_filename) # type: ignore
+ object_key = os.path.join(data.get("storePath", ""), zip_filename) # type: ignore
job.upload_path = object_key
- job.job_id = data["jobId"] # type: ignore
+ job.job_id = data.get("jobId", "") # type: ignore📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| job.jgid = data["jobGroupId"] # type: ignore | ||||||||||||||
| job.jgid = data.get("jobGroupId", "") # type: ignore | ||||||||||||||
| self.storage.upload_From_file_multi_part( | ||||||||||||||
| object_key=object_key, file_path=upload_zip, token=token | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.