This repository has been archived by the owner on May 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Asynchronous Web API and Async Swagger by Comwrap and Balance Internet #8
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ot valid for "boolean"
…i-ce into async-webapi-2
- get AsynchronousRequestProcessor implement ProcessorInterface - remove exception hiding
- fixed static tests
- moved preference to be loaded earlier in the process
- fixed static errors
- add proxies for the queue commands
- fixed di.xml
- Asynchronous schema processor class must implement interface
- updated class namespace - updated config.json with the correct values - removed unused variables and methods
…bulk api statuses
careys7
reviewed
Mar 22, 2018
*/ | ||
public function canProcess(\Magento\Framework\Webapi\Rest\Request $request) | ||
{ | ||
if (preg_match(self::PROCESSOR_PATH, ltrim($request->getPathInfo(), '/')) === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the following:
GET https://bulk-api.localhost/rest/all/schema?services=all
<response>
<message>
Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /var/www/current/src/app/code/Magento/WebapiAsync/Controller/Rest/AsynchronousSchemaRequestProcessor.php on line 69
</message>
<trace>
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'preg_match(): D...', '/var/www/curren...', 69, Array) #1 /var/www/current/src/app/code/Magento/WebapiAsync/Controller/Rest/AsynchronousSchemaRequestProcessor.php(69): preg_match('async/schema', 'schema') #2 /var/www/current/src/app/code/Magento/Webapi/Controller/Rest/RequestProcessorPool.php(39): Magento\WebapiAsync\Controller\Rest\AsynchronousSchemaRequestProcessor->canProcess(Object(Magento\Framework\Webapi\Rest\Request\Proxy)) #3 /var/www/current/src/app/code/Magento/Webapi/Controller/Rest.php(187): Magento\Webapi\Controller\Rest\RequestProcessorPool->getProcessor(Object(Magento\Framework\Webapi\Rest\Request\Proxy)) #4 /var/www/current/src/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http)) #5 /var/www/current/src/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array) #6 /var/www/current/src/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http)) #7 /var/www/current/src/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(26): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array) #8 /var/www/current/src/lib/internal/Magento/Framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #9 /var/www/current/src/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch() #10 /var/www/current/src/lib/internal/Magento/Framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch() #11 /var/www/current/src/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor)) #12 {main}
</trace>
</response>
Looking at this now. It's wrapped in an XML response so I think something else might have gone wrong before this
careys7
reviewed
Mar 22, 2018
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Webapi\Test\Unit\Controller; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be WebapiAsync
- updated class namespace
- changed exception handling in MassSchedule - added base test case class to test Async WebAPI
- changed Swagger path
- Extracted default rest implementation to SwaggerWebapi module
- Renamed Magento\Swagger\Block\Index::getParamSchemaType() to Magento\Swagger\Block\Index::getSchemaType() - Changed injection of SchemaTypes to a native PHP array, removed SchemaTypesInterface argument to swagger block - Changed composer version - Fixed composer namespace in SwaggerWebapi - Added requires to composer for both modules (they will require this in the future due to a constant required from Webapi & WebapiAsync) - Changed setup_version to 2.0.0
…Async Added WebapiAsync configuration locator, converter and reader Draft implementation of ServiceMetadata plugin for WebapiAsync Changes to SwaggerwebapiAsync and WebapiAsync modules Refactored WebapiAsync Config to ServiceConfig - Extracted methods from ServiceConfig::convert() for readability - Renamed Config to ServiceConfig to avoid conflicts with topic-related config
…ynchronousSchemaRequestProcessor
- Fixed message queue integration test
- Fixed integration tests
- Fixed integration tests
- Fixed static tests
- Fixed integration tests
- Fixed static tests
- Fixed static tests
- Fixed integration tests
- Reduced coupling between objects
- Fixed integration tests
- Fixed unit tests
- Fixed static tests
- Fixed integration tests
- Fixed integration tests
- Disable topic generation for performance tests
- removed unused variable - enabled topic generation for performance tests
- fixed static tests
- disabled extension for performance tests
- removed unsupported void return type
- changed interface names per architectural feedback - added statuses tracking for successfull operations
- fixed static and integration tests
- fixed static and integration tests
vrann
changed the title
Create Async Web API processor by @comwrap
Asynchronous Web API and Async Swagger by Comwrap and Balance Internet
Mar 30, 2018
magento-engcom-team
pushed a commit
that referenced
this pull request
Jul 21, 2018
2.3 develop 12072018
magento-engcom-team
pushed a commit
that referenced
this pull request
Nov 16, 2018
Latest 2.3 develop branch
magento-engcom-team
pushed a commit
that referenced
this pull request
Feb 25, 2019
[Forwardport] 'Fixes-for-customer-login-page-input-field' :: On customer login page…
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As a Magento Developer, I would like to make WebAPI calls asynchronously so that my integrations don't have to wait for my requests to get processed to complete when it's not necessary.
In the product update context, this means that I can invoke single or bulk product APIs and get an immediate response that my request was accepted, and I'm offered a separate status reporting API to check on the progress of my requests by ID. For now this will only be available in Commerce and not Open Source.
Scope
Stories
Combines followinf PRs
#9
#7
#6
Contribution checklist