Skip to content

Commit a2a4b41

Browse files
mooperdrobtaylor
authored andcommitted
changed endpoint
1 parent 206f487 commit a2a4b41

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

chipflow_lib/steps/silicon.py

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -149,32 +149,14 @@ def submit(self, rtlil_path, *, dry_run=False):
149149
logger.info(f"Submitting {submission_name} for project {self.project_name}")
150150

151151
resp = requests.post(
152-
os.environ.get("CHIPFLOW_API_ENDPOINT", "https://app.chipflow-infra.com/api/builds"),
153-
auth=(os.environ["CHIPFLOW_API_KEY_ID"], os.environ["CHIPFLOW_API_KEY_SECRET"]),
152+
os.environ.get("CHIPFLOW_API_ENDPOINT", "https://build.chipflow.org/api/builds"),
153+
auth=os.environ["CHIPFLOW_API_KEY_SECRET"],
154154
data=data,
155155
files={
156156
"rtlil": open(rtlil_path, "rb"),
157157
"config": json.dumps(config),
158158
})
159159
resp_data = resp.json()
160-
if resp.status_code == 403:
161-
raise ChipFlowError(
162-
"Authentication failed; please verify the values of the the CHIPFLOW_API_KEY_ID "
163-
"and CHIPFLOW_API_KEY_SECRET environment variables, if the issue persists, "
164-
"contact support to resolve it")
165-
elif resp.status_code >= 400:
166-
raise ChipFlowError(
167-
f"Submission failed ({resp_data['statusCode']} {resp_data['error']}: "
168-
f"{resp_data['message']}); please contact support and provide this error message")
169-
elif resp.status_code >= 300:
170-
assert False, "3xx responses should not be returned"
171-
elif resp.status_code >= 200:
172-
if not resp_data["ok"]:
173-
raise ChipFlowError(
174-
f"Submission failed ({resp_data['msg']}); please contact support and provide "
175-
f"this error message")
176-
else:
177-
print(f"{resp_data['msg']} (#{resp_data['id']}: {resp_data['name']}); "
178-
f"{resp_data['url']}")
179-
else:
180-
ChipFlowError(f"Unexpected response from API: {resp}")
160+
print(resp_data)
161+
if resp.status_code != 200:
162+
raise ChipFlowError(f"Failed to submit: {resp_data}")

0 commit comments

Comments
 (0)