Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Do not await abort to complete if save() failed. In case uploading content fails inside {@link... #442

Closed
0pdd opened this issue Jul 7, 2022 · 2 comments

Comments

@0pdd
Copy link

0pdd commented Jul 7, 2022

The puzzle 87-1669245c from #87 has to be resolved:

* @todo #87:60min Do not await abort to complete if save() failed.
* In case uploading content fails inside {@link S3Storage#save(Key, Content)} method
* we are doing abort() for multipart upload.
* Also whole operation does not complete until abort() is complete.
* It would be better to finish save() operation right away and do abort() in background,
* but it makes testing the method difficult.
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)

The puzzle was created by @dgarus on 23-Jun-22.

Estimate: 60 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

@0pdd
Copy link
Author

0pdd commented Jul 7, 2022

I can't create GITHUB labels ``. Most likely I don't have necessary permissions to artipie/asto repository. Please, make sure @0pdd user is in the list of collaborators:

POST https://api.github.com/repos/artipie/asto/issues/442/labels: 403 - Must have admin rights to Repository. // See: https://docs.github.com/rest/reference/issues#add-labels-to-an-issue
/app/vendor/bundle/ruby/2.7.0/gems/octokit-4.25.0/lib/octokit/response/raise_error.rb:14:in `on_complete'
/app/vendor/bundle/ruby/2.7.0/gems/faraday-2.3.0/lib/faraday/middleware.rb:18:in `block in call'
/app/vendor/bundle/ruby/2.7.0/gems/faraday-2.3.0/lib/faraday/response.rb:42:in `on_complete'
/app/vendor/bundle/ruby/2.7.0/gems/faraday-2.3.0/lib/faraday/middleware.rb:17:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/octokit-4.25.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
/app/vendor/bundle/ruby/2.7.0/gems/octokit-4.25.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/faraday-2.3.0/lib/faraday/rack_builder.rb:153:in `build_response'
/app/vendor/bundle/ruby/2.7.0/gems/faraday-2.3.0/lib/faraday/connection.rb:445:in `run_request'
/app/vendor/bundle/ruby/2.7.0/gems/faraday-2.3.0/lib/faraday/connection.rb:281:in `post'
/app/vendor/bundle/ruby/2.7.0/gems/sawyer-0.9.2/lib/sawyer/agent.rb:99:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/octokit-4.25.0/lib/octokit/connection.rb:156:in `request'
/app/vendor/bundle/ruby/2.7.0/gems/octokit-4.25.0/lib/octokit/connection.rb:28:in `post'
/app/vendor/bundle/ruby/2.7.0/gems/octokit-4.25.0/lib/octokit/client/labels.rb:127:in `add_labels_to_an_issue'
/app/objects/vcs/github.rb:82:in `add_labels_to_an_issue'
/app/objects/tickets/tagged_tickets.rb:46:in `submit'
/app/objects/tickets/commit_tickets.rb:36:in `submit'
/app/objects/tickets/emailed_tickets.rb:35:in `submit'
/app/objects/tickets/sentry_tickets.rb:45:in `submit'
/app/objects/puzzles.rb:136:in `block in expose'
/app/objects/puzzles.rb:126:in `loop'
/app/objects/puzzles.rb:126:in `expose'
/app/objects/puzzles.rb:38:in `deploy'
/app/objects/jobs/job.rb:38:in `proceed'
/app/objects/jobs/job_starred.rb:32:in `proceed'
/app/objects/jobs/job_recorded.rb:31:in `proceed'
/app/objects/jobs/job_emailed.rb:33:in `proceed'
/app/objects/jobs/job_commiterrors.rb:33:in `proceed'
/app/objects/jobs/job_detached.rb:48:in `exclusive'
/app/objects/jobs/job_detached.rb:36:in `block in proceed'
/app/objects/jobs/job_detached.rb:36:in `fork'
/app/objects/jobs/job_detached.rb:36:in `proceed'
/app/0pdd.rb:516:in `process_request'
/app/0pdd.rb:354:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1685:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1685:in `block in compile!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1023:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1042:in `route_eval'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1023:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1071:in `block in process_route'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1069:in `catch'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1069:in `process_route'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1021:in `block in route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1018:in `each'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1018:in `route!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1140:in `block in dispatch!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1112:in `block in invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1112:in `catch'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1112:in `invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1135:in `dispatch!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:949:in `block in call!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1112:in `block in invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1112:in `catch'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1112:in `invoke'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:949:in `call!'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:938:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.0/lib/rack/protection/xss_header.rb:18:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.0/lib/rack/protection/json_csrf.rb:26:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.0/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.0/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-protection-2.2.0/lib/rack/protection/frame_options.rb:31:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3.1/lib/rack/logger.rb:17:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3.1/lib/rack/common_logger.rb:38:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:255:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:248:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3.1/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3.1/lib/rack/method_override.rb:24:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:218:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1992:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1552:in `block in call'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1768:in `synchronize'
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1552:in `call'
/app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3.1/lib/rack/handler/webrick.rb:95:in `service'
/app/vendor/ruby-2.7.6/lib/ruby/2.7.0/webrick/httpserver.rb:140:in `service'
/app/vendor/ruby-2.7.6/lib/ruby/2.7.0/webrick/httpserver.rb:96:in `run'
/app/vendor/ruby-2.7.6/lib/ruby/2.7.0/webrick/server.rb:307:in `block in start_thread'

0pdd referenced this issue Jul 7, 2022
Bumps [jetty-http](https://github.com/eclipse/jetty.project) from 9.4.45.v20220203 to 9.4.48.v20220622.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](jetty/jetty.project@jetty-9.4.45.v20220203...jetty-9.4.48.v20220622)

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-http
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@0pdd 0pdd closed this as completed Jul 20, 2022
@0pdd
Copy link
Author

0pdd commented Jul 20, 2022

The puzzle 87-1669245c has disappeared from the source code, that's why I closed this issue.

0pdd referenced this issue Jul 20, 2022
* Storage factory

* modules

* disable IT on Windows

* fix lint error

* disable RedisStorageFactoryTest on Windows

* failIfNoTests=false

* failIfNoTests=false

* fix review comments

* added StorageConfig interface

* fix review comments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant