Uploading any asset causes all other assets of the same type to disappear from the Featured Page
Describe the bug
Uploading any asset causes all other assets of the same type to disappear from the Featured Page
(Might be specific to docker compose) More specifically, uploading a model causes all other models to lose their publish_approved and featured values.
To Reproduce
Steps to reproduce the behavior:
- Start up the docker compose quickstart
- Upload a new model
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- MLX Version [e.g. 22]
Additional context
Add any other context about the problem here.
Thanks Andrew. I will take a look at this
@drewbutlerbb4 -- I cannot reproduce this bug. How did you enable the upload in the Quickstart with Docker Compose since that was not working anymore (#97)?
I have a separate image I was working on for admin routing that I was using. I can't reproduce this issue on my image either so I will close it until/if I am able to reliably reproduce it.
I have been able to reproduce this issue, although not reliably. I will try and provide as much information as I can on the context.
Steps Followed:
- docker compose pull
- docker compose up
- Navigate using components sidebar button
- Navigate using
register a componentbutton - Upload the component yaml that Romeo links in #102
Resulting network requests:
-
upload -
publish_approvedOPTIONS -
publish_approvedPOST -
featuredOPTIONS -
featuredPOST
I detail some of the info on these requests below
upload request info from Chrome developer tools:
General:
Request URL: http://localhost:8080/apis/v1alpha1/components/upload?
Request Method: POST
Status Code: 201 CREATED
Remote Address: [::1]:8080
Referrer Policy: strict-origin-when-cross-origin
Response Headers:
Access-Control-Allow-Origin: http://localhost
Content-Length: 401
Content-Type: application/json
Date: Tue, 06 Jul 2021 17:38:32 GMT
Server: Werkzeug/2.0.1 Python/3.9.6
Vary: Origin
Request Headers:
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 1216
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary58GIa1D2o8T6ajOT
Host: localhost:8080
Origin: http://localhost
Pragma: no-cache
Referer: http://localhost/
sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="90", "Google Chrome";v="90"
sec-ch-ua-mobile: ?0
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
uploadfile: (binary)
enterprise_github_token:
Response:
{
"created_at": "2021-07-06T17:38:31.942004Z",
"description": "Gets the specified number of lines from the input file.",
"id": "get-lines",
"metadata": {},
"name": "Get Lines",
"parameters": [
{
"description": "Data for input 1",
"name": "Input 1"
},
{
"default": "100",
"description": "Number of lines to copy",
"name": "Parameter 1"
}
]
}
publish_approved request info from Chrome developer tools
General:
Request URL: http://localhost:8080/apis/v1alpha1/components/publish_approved
Request Method: OPTIONS
Status Code: 200 OK
Remote Address: [::1]:8080
Referrer Policy: strict-origin-when-cross-origin
Request Headers:
Access-Control-Allow-Headers: content-type
Access-Control-Allow-Methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT
Access-Control-Allow-Origin: http://localhost
Allow: OPTIONS, GET, POST, DELETE, HEAD
Content-Length: 0
Content-Type: text/html; charset=utf-8
Date: Tue, 06 Jul 2021 17:38:32 GMT
Server: Werkzeug/2.0.1 Python/3.9.6
Vary: Origin
Response Headers:
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Access-Control-Request-Headers: content-type
Access-Control-Request-Method: POST
Cache-Control: no-cache
Connection: keep-alive
Host: localhost:8080
Origin: http://localhost
Pragma: no-cache
Referer: http://localhost/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
Second publish_approved request info from Chrome developer tools
General:
Request URL: http://localhost:8080/apis/v1alpha1/components/publish_approved
Request Method: POST
Status Code: 200 OK
Remote Address: [::1]:8080
Referrer Policy: strict-origin-when-cross-origin
Response Headers:
Access-Control-Allow-Origin: http://localhost
Content-Length: 0
Content-Type: application/json
Date: Tue, 06 Jul 2021 17:38:32 GMT
Server: Werkzeug/2.0.1 Python/3.9.6
Vary: Origin
Request Headers:
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 13
Content-Type: application/json
Host: localhost:8080
Origin: http://localhost
Pragma: no-cache
Referer: http://localhost/
sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="90", "Google Chrome";v="90"
sec-ch-ua-mobile: ?0
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
Request Payload:
["get-lines"]
0: "get-lines"
Let me know of anything else I can do to help @ckadner
Hi @drewbutlerbb4 -- I have been trying to reproduce this without luck. Could this have been a issue with concurrent requests or maybe related to caching?
I'm not sure, it has been very infrequent for me. I have not seen it again since July 6th. I do not believe it is caching because the original PR for caching in the UI was July 13th a month after this was reported (and I believe the API caching was implemented at a similar time?). Not sure on concurrent requests. To be honest, I'm not sure how to pursue this but I figured it should be logged nonetheless.