Closed zechariahks closed 3 months ago
Update: I was able to debug the issue and found the fix. While testing the front end app, if we provide any product name with spaces like "Mike Brown", the app returns 400 BadRequest and forever loads. If we give a single word without spaces it works. Looks like read_file() function in the product_catalog (app_efs.py) service is expecting two item array (key,val)
. If we pass anything with spaces in "Product Name" column, app fails at reading that line and throws 400.
def read_file():
flask_app.logger.info(filepath)
if not os.path.exists(filepath):
open(filepath, 'w').close()
else:
with open(filepath, "r") as f:
for line in f:
(key, val) = line.split()
list_of_names[int(key)] = val
I deployed the app using the steps mentioned in the guide. Initial deployment works well and I was able to browse product catalog UI through ELB endpoint without any issues. But, after adding efs storage, while attempting to add a product, product catalog UI loads forever and throws 400 Badrequest error. Below is the error log from the frontend pod. Am I missing any steps?
Reproduction Steps