You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/03 12:28:48 UTC

[GitHub] [pulsar] nicoloboschi opened a new issue #14104: Can't create topics after #12818

nicoloboschi opened a new issue #14104:
URL: https://github.com/apache/pulsar/issues/14104


   **Describe the bug**
   After https://github.com/apache/pulsar/pull/12818, a client (built starting from the master branch) get `not found` while trying to create a topic, if the server doesn't support admin v3 topic endpoint (currently only the master branch has this endpoint).  
   
   **To Reproduce**
   - Run Pulsar standalone 2.8.2 (or 2.9.x)
   - Run command (from master branch) `bin/pulsar-admin  topics create-partitioned-topic test -p 1` 
    You get:
   
   ```
   2022-02-03T12:26:16,790+0000 [AsyncHttpClient-7-1] WARN  org.apache.pulsar.client.admin.internal.BaseResource - [http://172.17.0.2:8080/admin/v3/persistent/public/default/test/partitions?createLocalTopicOnly=false] Failed to perform http put request: javax.ws.rs.NotFoundException: HTTP 404 Not Found
   HTTP 404 Not Found
   
   Reason: HTTP 404 Not Found
   ```
   
   **Expected behavior**
   The client should be send the request to v2 rest api endpoint 
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on issue #14104: Can't create topics after #12818 using Pulsar master client and 2.9.x (or prior) broker (v3/persistent NOT FOUND)

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #14104:
URL: https://github.com/apache/pulsar/issues/14104#issuecomment-1029808800


   The custom content type could be set here: 
   https://github.com/apache/pulsar/blob/10036d562d1a6440e2bf5f2d81e352e66a69642f/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java#L353-L358


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on issue #14104: Can't create topics after #12818 using Pulsar master client and 2.9.x (or prior) broker (v3/persistent NOT FOUND)

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #14104:
URL: https://github.com/apache/pulsar/issues/14104#issuecomment-1029848923


   I noticed that this is needed to fix the issue too: https://github.com/apache/pulsar/pull/14117/commits/02a32010f6010646e49b1a05c5a442e00f55a399
   
   That alone would fix the issue. However I think it's better to not add a new API version in this way since it's not even consistent. For all other methods, the support for PIP-110 was added directly to the existing v2 API.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on issue #14104: Can't create topics after #12818 using Pulsar master client and 2.9.x (or prior) broker (v3/persistent NOT FOUND)

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #14104:
URL: https://github.com/apache/pulsar/issues/14104#issuecomment-1029835894


   @lhotari would you please the PR with the revert?
   This way we will unblock downstream consumers of the master branch


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on issue #14104: Can't create topics after #12818 using Pulsar master client and 2.9.x (or prior) broker (v3/persistent NOT FOUND)

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #14104:
URL: https://github.com/apache/pulsar/issues/14104#issuecomment-1029840781


   I pushed #14117 as a fix that uses the custom JSON media type solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari edited a comment on issue #14104: Can't create topics after #12818 using Pulsar master client and 2.9.x (or prior) broker (v3/persistent NOT FOUND)

Posted by GitBox <gi...@apache.org>.
lhotari edited a comment on issue #14104:
URL: https://github.com/apache/pulsar/issues/14104#issuecomment-1029808800


   The custom content type could be set here: 
   https://github.com/apache/pulsar/blob/10036d562d1a6440e2bf5f2d81e352e66a69642f/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java#L353-L358
   
   Would be `MediaType.valueOf("application/vnd.some-custom-identifier+json")`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on issue #14104: Can't create topics after #12818 using Pulsar master client and 2.9.x broker (v3/persistent NOT FOUND)

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #14104:
URL: https://github.com/apache/pulsar/issues/14104#issuecomment-1028955398


   @nicoloboschi good catch!
   
   We should discuss about this on dev@ and we must fix this somehow


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli closed issue #14104: Can't create topics after #12818 using Pulsar master client and 2.9.x (or prior) broker (v3/persistent NOT FOUND)

Posted by GitBox <gi...@apache.org>.
eolivelli closed issue #14104:
URL: https://github.com/apache/pulsar/issues/14104


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on issue #14104: Can't create topics after #12818 using Pulsar master client and 2.9.x broker (v3/persistent NOT FOUND)

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #14104:
URL: https://github.com/apache/pulsar/issues/14104#issuecomment-1028956521


   So this comment is not correct
   https://github.com/apache/pulsar/pull/12818#discussion_r790706585


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on issue #14104: Can't create topics after #12818 using Pulsar master client and 2.9.x (or prior) broker (v3/persistent NOT FOUND)

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #14104:
URL: https://github.com/apache/pulsar/issues/14104#issuecomment-1029792263


   This was discussed in the Pulsar community meeting. Some notes from the discussion:
   - PR #12818 changes should be reverted so that API could be kept backwards compatible.
   - It’s possible to have the current v2 API for creating persistent topics to handle multiple different payload types
   The challenge seems to be that in the old method, the number of partitions was passed in the payload as a single integer without having a JSON object at all. This makes it harder to extend the existing API, but doesn’t make it impossible.
   - One possible solution is based on request’s “Content Type”
   `Content-Type: application/vnd.some-custom-identifier+json` on request, `@Consumes("application/vnd.some-custom-identifier+json")` on method that handles the new payload type. It also needs an annotation that the newer payload uses the custom mime type.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on issue #14104: Can't create topics after #12818 using Pulsar master client and 2.9.x (or prior) broker (v3/persistent NOT FOUND)

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #14104:
URL: https://github.com/apache/pulsar/issues/14104#issuecomment-1029836734


   > @lhotari would you please the PR with the revert? This way we will unblock downstream consumers of the master branch
   
   It might be simpler to create a PR to fix the issue. I can do that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org