Skip to content
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

Quest-674: Changes to support BYOC/BYOJ pipeline creation #325

Merged
merged 72 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
b1a4ffc
SDK-335: GCP creds schema changes (#263)
tarrygo Feb 15, 2019
3631d0e
[SDK-338] Added option to enable Rubix (#265)
abhijithshankar93 Feb 21, 2019
62468d2
SDK-323: GCP changes for preemptible nodes (#266)
akaranjkar-qu Mar 1, 2019
756d517
fixes #175. utf-8 errors in Python 3 (#208)
mcarlsen Mar 19, 2019
8afa7fe
SDK-344: Enable use of port argument for DbTaps #267
chattarajoy Mar 19, 2019
c7b9cb6
Added exception instead of "pass" to avoid silently skipping of file …
Mar 19, 2019
ac95aaf
SDK-339 : Added comments on how to use List command. (#269)
lordozb Mar 26, 2019
70b075e
SDK-345: Add custom resource group and start-stop related params for …
akaranjkar-qu Apr 1, 2019
7fb3292
SDK-340 : Support for Airflow Version and Python Version (#270)
lordozb Apr 19, 2019
0db727c
SDK-350 MultiCloud Fix for Script Location Parameter (#272)
chattarajoy May 8, 2019
d1cccf4
Release Version 1.11.1
msumit May 14, 2019
838819e
SDK-XXX: Update readme
msumit May 14, 2019
6951fe2
SDK-352 : Add storage config params - block_volume_count and block_vo…
thispc May 21, 2019
f8e3548
SDK-354 Default to S3 Signature Version V4 (#273)
chattarajoy May 21, 2019
35fe334
Release Version 1.12.0
chattarajoy May 21, 2019
87989ce
SDK-109 Proper Error Message when results unavailable (#276)
lordozb Jun 19, 2019
915bdea
fix: dev: SDK-364: Oracle Multi AD changes required in qds-sdk
chattarajoy Jul 29, 2019
c5c035b
Update requests and urllib library versions (#280)
brickyard Jul 31, 2019
7661327
SDK-366 Drop Support for Python 2.6 (#281)
chattarajoy Jul 31, 2019
2d72f4b
Release Version 1.13.0
chattarajoy Jul 31, 2019
22880b2
DeepSource.io Integeration (#275)
sanketsaurav Aug 7, 2019
488e3e8
DeepSource Integeration for Commit checks and Test Coverage (#282)
chattarajoy Aug 10, 2019
baca769
SDK-375: Added support for Qubole-trace-Id (#285)
shekharsaurabh Oct 11, 2019
3dc5bc4
SDK-381 support for spark streaming cluster (#289)
saiyam1712 Nov 4, 2019
880d26e
Release Version 1.13.1
chattarajoy Nov 4, 2019
2266e96
Revert "Update requests and urllib library versions (#280)"
chattarajoy Nov 4, 2019
4292d8c
SDK-383: Add retries to get calls in case of 500 Response (#292)
chattarajoy Dec 9, 2019
b7dac34
Release Version 1.13.2
Dec 11, 2019
05f8994
SDK-376: Adding support for multiple API versions in clusters (#284)
tarrygo Oct 17, 2019
3937ba6
SDK-376: Revert the refactoring of cluster_cmd_line (#286)
tarrygo Nov 12, 2019
1f51003
ACM-4728: Add HS2 cluster creation from qds-sdk (#290)
satyabolnedi Nov 29, 2019
1efa8cd
SDK-361: Support for cluster image version clusters API (#291)
tarrygo Dec 10, 2019
d22bcd2
SDK-386: Add Retries and Delay Options for API Rate Limiting (#295)
shekharsaurabh Jan 30, 2020
ff6dccb
new: dev: ACM-6382: Added for parent cluster label in hs2 clusters (#…
vasantchaitanyamahipala Jan 29, 2020
439b882
SDK-386: Add New Exception Class for 429 errors (#302)
shekharsaurabh Feb 7, 2020
033a2bc
SDK-385: SDK support for Quest (#297)
dreamerHarshit Feb 13, 2020
9171a49
Release Version 1.14.0
chattarajoy Feb 18, 2020
46ead9a
SDK-388: Support for spot allocation strategy on Cluster (#293)
kswap Feb 19, 2020
68657f8
SDK-392: Support for Mlflow Cluster Type (#306)
Anupam-pandey Feb 24, 2020
c02dd7c
Validate a JSON response before checking response code (#308)
chattarajoy Feb 27, 2020
b44b2a8
Refactor Connection Adapter name (#309)
chattarajoy Mar 2, 2020
9495e28
new: usr: JUPY-567, SDK-394: Add SDK bindings for JupyterNotebookComm…
tgvr Mar 12, 2020
f2023d7
Release Version 1.15.0
chattarajoy Mar 18, 2020
ed4347b
SDK-386: Changing retry conditions for 503 response (#311)
shekharsaurabh Mar 23, 2020
8e07683
SDK-397: Add DBTap Config for MlFlow Cluster (#313)
santosh1994 Mar 30, 2020
702095f
SDK-387: Add Support for Hive Version (#303)
satyabolnedi Apr 1, 2020
35dcae6
QUEST-608: Replaced Quest by Pipelines (#314)
lordozb Apr 14, 2020
041151c
Release Version 1.15.1
chattarajoy Apr 14, 2020
ce5745c
SDK-404: Add --skip-upload-to-source option in JupyterNotebookCommand…
tgvr Apr 15, 2020
8bf79f9
SDK-401: Fix inflection version upgrade on basis of python version (#…
anmol-dhingra Apr 15, 2020
e10933e
SDK-386: Increase number of default retries for HTTP Requests (#317)
shekharsaurabh Apr 21, 2020
5b6694c
Release Version 1.15.2
chattarajoy Apr 22, 2020
053843a
Revert "SDK-401: Fix inflection version upgrade on basis of python ve…
chattarajoy Apr 22, 2020
1645310
SDK-401: Fix inflection version upgrade on basis of python version (#…
anmol-dhingra Apr 15, 2020
8040972
SDK-405: Add autoscaling spotblock fallback capabilities to ClusterV2…
juhi-09 May 5, 2020
ba1fbc5
ACM-6842: Ability to Create Cluster with HS2 on master (#320)
surajg-q May 6, 2020
1311b39
SDK-407, JUPY-884: Add '--upload-to-source' param for JupyterNotebook…
tgvr Jun 3, 2020
88c42db
Release Version 1.16.0
chattarajoy Jun 3, 2020
8c74f40
add payload changes
siddharth1001 Jun 19, 2020
3541de4
typo
siddharth1001 Jun 19, 2020
9156ef7
changes
siddharth1001 Jun 19, 2020
98bcbbe
refactor
siddharth1001 Jun 19, 2020
e1a4830
return resp
siddharth1001 Jun 19, 2020
653d46b
Merge branch 'unreleased' into QUEST-674
siddharth1001 Jun 19, 2020
dfdef53
Merge branch 'unreleased' into QUEST-674
siddharth1001 Jun 19, 2020
8d4bace
changes
siddharth1001 Jun 19, 2020
627de9d
Merge branch 'QUEST-674' of https://github.com/siddharth1001/qds-sdk-…
siddharth1001 Jun 19, 2020
e3d7025
use or
siddharth1001 Jun 19, 2020
9c68f94
pipeline
siddharth1001 Jun 19, 2020
e1e0e5c
changes
siddharth1001 Jun 19, 2020
5c73873
lint
siddharth1001 Jun 19, 2020
7729a18
use kwargs.get
siddharth1001 Jun 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 55 additions & 8 deletions qds_sdk/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,23 +339,70 @@ def create(cls, pipeline_name, create_type, **kwargs):
Args:
pipeline_name: Name to be given.
create_type: 1->Assisted, 2->Code, 3->Jar
create_type: 1->Assisted, 2->Jar, 3->Code
chattarajoy marked this conversation as resolved.
Show resolved Hide resolved
**kwargs: keyword arguments specific to create type
Returns:
response
"""
conn = Qubole.agent()
data = {"data": {
"attributes":
{"name": pipeline_name, "status": "DRAFT",
"create_type": create_type},
"type": "pipelines"}
}
url = Pipelines.rest_entity_path + "?mode=wizard"
url = Pipelines.rest_entity_path
if create_type is None:
raise ParseError("Provide create_type for Pipeline.", None)
if not kwargs or create_type == 1:
chattarajoy marked this conversation as resolved.
Show resolved Hide resolved
data = {
siddharth1001 marked this conversation as resolved.
Show resolved Hide resolved
"data": {
"attributes": {
"name": pipeline_name,
"status": "DRAFT",
"create_type": create_type
},
"type": "pipeline"
}
}
url = url + "?mode=wizard"
else:
data = {
"data": {
chattarajoy marked this conversation as resolved.
Show resolved Hide resolved
"type": "pipeline",
"attributes": {
"name": pipeline_name,
"create_type": create_type,
"properties": {
"cluster_label": kwargs.get('cluster_label'),
"can_retry": kwargs.get('can_retry'),
"command_line_options": kwargs.get('command_line_options'),
"user_arguments": kwargs.get('user_arguments')
}
},
"relationships": {
"alerts": {
"data": {
"type": "pipeline/alerts",
"attributes": {
"can_notify": kwargs.get('can_notify'),
"notification_channels": kwargs.get('channel_ids')
}
}
}
}
}
}
if create_type == 2:
data['data']['attributes']['properties']['jar_path'] = \
kwargs.get('jar_path')
data['data']['attributes']['properties']['main_class_name'] = \
kwargs.get('main_class_name')
elif create_type == 3:
data['data']['attributes']['properties']['code'] = \
kwargs.get('code')
data['data']['attributes']['properties']['language'] = \
kwargs.get('language')

response = conn.post(url, data)
cls.pipeline_id = Pipelines.get_pipline_id(response)
cls.pipeline_name = pipeline_name
return response

@staticmethod
def start(pipeline_id):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_quest.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_create_pipeline(self):
'--cluster-label', 'spark', '-c', 'print("hello")', '--language', 'python', '--user-arguments', 'users_argument']
print_command()
d1 = {"data": {"attributes": {"name": "test_pipeline_name", "status": "DRAFT", "create_type": 3},
"type": "pipelines"}}
"type": "pipeline"}}
response = {"relationships": {"nodes": [], "alerts": []}, "included": [],
"meta": {"command_details": {"code": "print(\"hello\")", "language": "python"},
"properties": {"checkpoint_location": None, "trigger_interval": None,
Expand Down