-
Notifications
You must be signed in to change notification settings - Fork 1
Use new build system #44
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
Conversation
|
|
e37f981 to
acf8f43
Compare
acf8f43 to
0c4c701
Compare
| os.environ.get("CHIPFLOW_API_ENDPOINT", "https://app.chipflow-infra.com/api/builds"), | ||
| auth=(os.environ["CHIPFLOW_API_KEY_ID"], os.environ["CHIPFLOW_API_KEY_SECRET"]), | ||
| os.environ.get("CHIPFLOW_API_ENDPOINT", "https://build.chipflow.org/api/builds"), | ||
| auth=os.environ["CHIPFLOW_API_KEY"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auth takes a tuple: ('user', 'pass')
robtaylor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mooperd actually, could you add some more tests for the submit codepath in tests/test_silicon_step.py ?
| if resp.status_code == 403: | ||
| raise ChipFlowError( | ||
| "Authentication failed; please verify the values of the the CHIPFLOW_API_KEY_ID " | ||
| "and CHIPFLOW_API_KEY_SECRET environment variables, if the issue persists, " | ||
| "contact support to resolve it") | ||
| elif resp.status_code >= 400: | ||
| raise ChipFlowError( | ||
| f"Submission failed ({resp_data['statusCode']} {resp_data['error']}: " | ||
| f"{resp_data['message']}); please contact support and provide this error message") | ||
| elif resp.status_code >= 300: | ||
| assert False, "3xx responses should not be returned" | ||
| elif resp.status_code >= 200: | ||
| if not resp_data["ok"]: | ||
| raise ChipFlowError( | ||
| f"Submission failed ({resp_data['msg']}); please contact support and provide " | ||
| f"this error message") | ||
| else: | ||
| print(f"{resp_data['msg']} (#{resp_data['id']}: {resp_data['name']}); " | ||
| f"{resp_data['url']}") | ||
| else: | ||
| ChipFlowError(f"Unexpected response from API: {resp}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error handling is still needed. Auth failure, or other issues on cloud side - I just got a 404 for example. no idea why!
No description provided.