Skip to content
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

x-request-id identic while uploading and (batch) deleting files #11925

Closed
butonic opened this issue Nov 18, 2024 · 11 comments · Fixed by #11929
Closed

x-request-id identic while uploading and (batch) deleting files #11925

butonic opened this issue Nov 18, 2024 · 11 comments · Fixed by #11929
Assignees
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Something isn't working

Comments

@butonic
Copy link
Member

butonic commented Nov 18, 2024

When checking the logs I see multiple delete requests with the sambe request id 78df25d3-da57-4afc-b0fa-1b879a059783:

2024-11-18 17:00:58.335	
{"level":"info","service":"proxy","proto":"HTTP/1.1","request-id":"78df25d3-da57-4afc-b0fa-1b879a059783","traceid":"c832d180391a7de3aecf1aa74baedfbb","remote-addr":"77.21.27.45","method":"DELETE","status":204,"path":"/remote.php/dav/spaces/52a78aa9-aba0-4403-a5d5-421cb51766ea$16a17b88-aff0-4a8d-89f2-a1e34f25d6a3/1000_4k/f18.bin","duration":575.723237,"bytes":0,"time":"2024-11-18t16:00:58Z","line":"github.com/owncloud/ocis/v2/services/proxy/pkg/middleware/accesslog.go:34","message":"access-log"}
	
	
2024-11-18 17:00:57.662	
{"level":"info","service":"proxy","proto":"HTTP/1.1","request-id":"78df25d3-da57-4afc-b0fa-1b879a059783","traceid":"9790231858154f715b03a3f1b56fc912","remote-addr":"77.21.27.45","method":"DELETE","status":204,"path":"/remote.php/dav/spaces/52a78aa9-aba0-4403-a5d5-421cb51766ea$16a17b88-aff0-4a8d-89f2-a1e34f25d6a3/1000_4k/f11.bin","duration":623.722751,"bytes":0,"time":"2024-11-18t16:00:57Z","line":"github.com/owncloud/ocis/v2/services/proxy/pkg/middleware/accesslog.go:34","message":"access-log"}
	
	
2024-11-18 17:00:56.479	
{"level":"info","service":"proxy","proto":"HTTP/1.1","request-id":"78df25d3-da57-4afc-b0fa-1b879a059783","traceid":"5de615cf1ae22214bd6f79cd071e4d40","remote-addr":"77.21.27.45","method":"DELETE","status":502,"path":"/remote.php/dav/spaces/52a78aa9-aba0-4403-a5d5-421cb51766ea$16a17b88-aff0-4a8d-89f2-a1e34f25d6a3/1000_4k/f15.bin","duration":30018.324353,"bytes":0,"time":"2024-11-18t16:00:56Z","line":"github.com/owncloud/ocis/v2/services/proxy/pkg/middleware/accesslog.go:34","message":"access-log"}
	
	
2024-11-18 17:00:26.421	
{"level":"info","service":"proxy","proto":"HTTP/1.1","request-id":"78df25d3-da57-4afc-b0fa-1b879a059783","traceid":"853aa3dc79b34e9c448ae4b9007e6966","remote-addr":"77.21.27.45","method":"DELETE","status":204,"path":"/remote.php/dav/spaces/52a78aa9-aba0-4403-a5d5-421cb51766ea$16a17b88-aff0-4a8d-89f2-a1e34f25d6a3/1000_4k/f13.bin","duration":674.282122,"bytes":0,"time":"2024-11-18t16:00:26Z","line":"github.com/owncloud/ocis/v2/services/proxy/pkg/middleware/accesslog.go:34","message":"access-log"}
	
	
2024-11-18 17:00:25.503	
{"level":"info","service":"proxy","proto":"HTTP/1.1","request-id":"78df25d3-da57-4afc-b0fa-1b879a059783","traceid":"4fde1d099e1ff0dcd6e612cba7648a6e","remote-addr":"77.21.27.45","method":"DELETE","status":502,"path":"/remote.php/dav/spaces/52a78aa9-aba0-4403-a5d5-421cb51766ea$16a17b88-aff0-4a8d-89f2-a1e34f25d6a3/1000_4k/f1.bin","duration":30105.127429,"bytes":0,"time":"2024-11-18t16:00:25Z","line":"github.com/owncloud/ocis/v2/services/proxy/pkg/middleware/accesslog.go:34","message":"access-log"}

I was selecting multiple files in a folder and then hitting delete.

cc @micbar mentioned that he also sew this with upload requests.

@butonic butonic added the Type:Bug Something isn't working label Nov 18, 2024
@micbar
Copy link
Contributor

micbar commented Nov 18, 2024

Easy Reproducer

Upload 10 files at once, all uploads get the same Request ID

@micbar micbar added the Priority:p2-high Escalation, on top of current planning, release blocker label Nov 18, 2024
@JammingBen JammingBen self-assigned this Nov 18, 2024
@JammingBen JammingBen moved this from Prio 2 to In progress in Infinite Scale Team Board Nov 18, 2024
@AlexAndBear
Copy link
Contributor

Also reproducible with batch delete

@AlexAndBear AlexAndBear changed the title web seems to reuse request ids x-request-id identic while uploading and (batch) deleting files Nov 18, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Infinite Scale Team Board Nov 19, 2024
@butonic butonic reopened this Nov 22, 2024
@github-project-automation github-project-automation bot moved this from Done to In progress in Infinite Scale Team Board Nov 22, 2024
@butonic
Copy link
Member Author

butonic commented Nov 22, 2024

hm .... DELETE requests still seem to reuse the id https://github.com/owncloud/enterprise/issues/6987#issuecomment-2493106248

@JammingBen
Copy link
Contributor

I can't reproduce it, can somebody else verify this in a browser by inspecting the network tab? And make sure it's Web version 11.0.4?

@jnweiger
Copy link
Contributor

jnweiger commented Nov 22, 2024

With web 11.0.4 and 7.0.0-rc.3:
go to a folder with 500 small pictures, select all, delete, go to trash bin, select all, delete.

In firefox/132.0 the network tab shows a different X-Request-ID for each DELETE.

Sometimes (not reproducible) the webUI shows many error notifications. But all files are gone, and are in the trash bin:

image

Deleting files from the trash bin logs this error for each selected file. But the delete works fine.

Nov 22 10:07:30 jw-ocis-v7-0-0-rc-3-30k ocis[9254]: {"level":"error","service":"activitylog","error":"resource id is required","event":{"Type":"events.ItemPurged","ID":"739440ca-a961-4315-8cbf-ebc9e617ff9b","TraceParent":"00-c027912e65cb2057340ce4313ea82583-ad7cbba3ba745804-00","InitiatorID":"2819aaed-6099-4c82-a357-b2c147bf0293","Event":{"Executant":{"idp":"https://dog-7rc3-20241121.jw-qa.owncloud.works","opaque_id":"fe12ee7b-c62f-4bb6-a488-6e7cb46630b5","type":1},"ID":null,"Ref":{"resource_id":{"storage_id":"ceca6deb-3224-44e3-922c-a45b7359eb6a","opaque_id":"fe12ee7b-c62f-4bb6-a488-6e7cb46630b5","space_id":"fe12ee7b-c62f-4bb6-a488-6e7cb46630b5"},"path":"."},"Owner":null,"Timestamp":{"seconds":1732270050,"nanos":95367188},"ImpersonatingUser":null}},"time":"2024-11-22T10:07:30Z","line":"github.com/owncloud/ocis/v2/services/activitylog/pkg/service/service.go:143","message":"could not process event"}

The network tab again shows a different X-Request-ID for each DELETE from trashbin.

The DELETE requests in the logs all have different "request-id" and all have "status":204

When not selecting files, but using the "Empty trash bin" button, this error is only logged once.

@JammingBen
Copy link
Contributor

Sometimes (not reproducible) the webUI shows many error notifications. But all files are gone, and are in the trash bin:

Any console logs during that? And what does the server return for these (presumably failed) requests? It's strange that the request ids seems to be missing... 🤔

@jnweiger
Copy link
Contributor

Hmm, cannot reproduce.. sorry.
The only error that occurred in the browser console is this, but that seems unrelated to deleting:

image

@jnweiger
Copy link
Contributor

Got it:

image

@AlexAndBear
Copy link
Contributor

AlexAndBear commented Nov 22, 2024

In packages/web-pkg/src/composables/actions/helpers/useFileActionsDeleteResources.ts:L204 we actually hand over new Error() to the showErrorMessage method, this is why, we cant extract any x-request-id

@JammingBen
Copy link
Contributor

In packages/web-pkg/src/composables/actions/helpers/useFileActionsDeleteResources.ts:L204 we actually hand over new Error() to the showErrorMessage method, this is why, we cant extract any x-request-id

True 🤦 Yeah, so there's that...

The error itself is more concerning though. I tried several times locally, but can't reproduce that. @jnweiger Any chance you had a look at the network tab? Did these requests fail on the server side?

@JammingBen
Copy link
Contributor

Clarified with @jnweiger in a call: The issue is only when hitting the delete button multiple times. So you select e.g. 100 files, then hit delete, then hit delete again while it's still in the process. Not nice of course, but not a critical issue IMO. I'll create a separate issue and close this one since the original issue seems to be fixed on the Web site.

@github-project-automation github-project-automation bot moved this from In progress to Done in Infinite Scale Team Board Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants