@@ -124,7 +124,7 @@ def submit(self, rtlil_path, *, dry_run=False):
124124 pads = {}
125125 for iface , port in self .platform ._ports .items ():
126126 width = len (port .pins )
127- print (f"iface={ iface } , port={ port } , dir={ port .direction } , width={ width } " )
127+ # print(f"iface={iface}, port={port}, dir={port.direction}, width={width}")
128128 if width > 1 :
129129 for i in range (width ):
130130 padname = f"{ iface } { i } "
@@ -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