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/06/26 03:45:57 UTC

[GitHub] [pulsar] michaeljmarshall opened a new pull request, #16222: Update/fix Swagger Annotation for param: authoritative

michaeljmarshall opened a new pull request, #16222:
URL: https://github.com/apache/pulsar/pull/16222

   ### Motivation
   
   The current swagger documentation for the `authoritative` parameter is confusing and misleading. The field is meant to indicate to the serving broker whether the call was redirected by the leader broker. This has certain consequences for cases where topics or namespaces have not yet been assigned to a broker. It's possible for end users to set the field, but it is not recommended. The current documentation almost suggests a security vulnerability, which is why it is especially important to adjust.
   
   This work needs to be cherry picked to all active branches to ensure that the new generated swagger docs are correct. I'll follow up with a PR to update the existing swagger docs since the doc changes do not need to be cherry picked.
   
   ### Modifications
   
   * Replace `Is authentication required to perform this operation` with `Whether leader broker redirected this call to this broker. For internal use.`
   * Additionally, so `isGlobal` methods were documented with the wrong annotation, so I fixed the annotation.
   
   ### Verifying this change
   
   Reading through the source code makes it clear how the `authoritative` command works. Here are two good references:
   
   https://github.com/apache/pulsar/blob/ce24db11adaf60d9cfb302ce39e76cdc9e43bd2d/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/LookupOptions.java#L28-L31
   
   https://github.com/apache/pulsar/blob/ce24db11adaf60d9cfb302ce39e76cdc9e43bd2d/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java#L628-L642
   
   ### Does this pull request potentially affect one of the following parts:
   
   This is just a documentation change.
   
   ### Documentation
   
   - [x] `doc` 
   


-- 
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] michaeljmarshall commented on pull request #16222: Update/fix Swagger Annotation for param: authoritative

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on PR #16222:
URL: https://github.com/apache/pulsar/pull/16222#issuecomment-1178219822

   @merlimat @eolivelli @codelipenghui - PTAL


-- 
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] BewareMyPower commented on pull request #16222: Update/fix Swagger Annotation for param: authoritative

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on PR #16222:
URL: https://github.com/apache/pulsar/pull/16222#issuecomment-1198897587

   @michaeljmarshall Could you cherry-pick this PR to branch-2.8? It looks like to have too many conflicts to resolve.


-- 
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] github-actions[bot] commented on pull request #16222: Update/fix Swagger Annotation for param: authoritative

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #16222:
URL: https://github.com/apache/pulsar/pull/16222#issuecomment-1177036520

   @michaeljmarshall Please provide a correct documentation label for your PR.
   Instructions see [Pulsar Documentation Label Guide](https://docs.google.com/document/d/1Qw7LHQdXWBW9t2-r-A7QdFDBwmZh6ytB4guwMoXHqc0).


-- 
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] michaeljmarshall commented on pull request #16222: Update/fix Swagger Annotation for param: authoritative

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on PR #16222:
URL: https://github.com/apache/pulsar/pull/16222#issuecomment-1198908409

   @BewareMyPower - done.


-- 
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] merlimat merged pull request #16222: Update/fix Swagger Annotation for param: authoritative

Posted by GitBox <gi...@apache.org>.
merlimat merged PR #16222:
URL: https://github.com/apache/pulsar/pull/16222


-- 
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] BewareMyPower commented on pull request #16222: Update/fix Swagger Annotation for param: authoritative

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on PR #16222:
URL: https://github.com/apache/pulsar/pull/16222#issuecomment-1198933322

   I see, thanks!


-- 
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] michaeljmarshall commented on pull request #16222: Update/fix Swagger Annotation for param: authoritative

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on PR #16222:
URL: https://github.com/apache/pulsar/pull/16222#issuecomment-1198898251

   @BewareMyPower - of course. I will look at cherry picking this now.


-- 
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] michaeljmarshall closed pull request #16222: Update/fix Swagger Annotation for param: authoritative

Posted by GitBox <gi...@apache.org>.
michaeljmarshall closed pull request #16222: Update/fix Swagger Annotation for param: authoritative
URL: https://github.com/apache/pulsar/pull/16222


-- 
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