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

Adds User-Agent header to requests #6065

Merged
merged 4 commits into from
Apr 19, 2023
Merged

Conversation

splch
Copy link
Contributor

@splch splch commented Apr 14, 2023

includes cirq and cirq_ionq versions for deprecation warnings

Copy link
Collaborator

@viathor viathor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rationale for sending all this information? I don't think the server needs to know client's OS to execute quantum circuits. Note that User-Agent header is not actually required (at least in HTTP 1.1), see section 14.43 of RFC 2616:

14.43 User-Agent

   The User-Agent request-header field contains information about the
   user agent originating the request. This is for statistical purposes,
   the tracing of protocol violations, and automated recognition of user
   agents for the sake of tailoring responses to avoid particular user
   agent limitations. User agents SHOULD include this field with
   requests. The field can contain multiple product tokens (section 3.8)
   and comments identifying the agent and any subproducts which form a
   significant part of the user agent. By convention, the product tokens
   are listed in order of their significance for identifying the
   application.

       User-Agent     = "User-Agent" ":" 1*( product | comment )

   Example:

       User-Agent: CERN-LineMode/2.15 libwww/2.17b3

Perhaps we can send cirq version only? WDYT? Ideally, we'd have an issue about it where we could discuss the problem and potential solutions.

@CirqBot CirqBot added the size: M 50< lines changed <250 label Apr 14, 2023
@splch
Copy link
Contributor Author

splch commented Apr 17, 2023

What is the rationale for sending all this information? I don't think the server needs to know client's OS to execute quantum circuits. Note that User-Agent header is not actually required (at least in HTTP 1.1), see section 14.43 of RFC 2616:

14.43 User-Agent

   The User-Agent request-header field contains information about the
   user agent originating the request. This is for statistical purposes,
   the tracing of protocol violations, and automated recognition of user
   agents for the sake of tailoring responses to avoid particular user
   agent limitations. User agents SHOULD include this field with
   requests. The field can contain multiple product tokens (section 3.8)
   and comments identifying the agent and any subproducts which form a
   significant part of the user agent. By convention, the product tokens
   are listed in order of their significance for identifying the
   application.

       User-Agent     = "User-Agent" ":" 1*( product | comment )

   Example:

       User-Agent: CERN-LineMode/2.15 libwww/2.17b3

Perhaps we can send cirq version only? WDYT? Ideally, we'd have an issue about it where we could discuss the problem and potential solutions.

The idea was to return a similar UA string, but we don't need OS for debugging user issues. We mostly need cirq and ionq versions, but the python version is useful for particularly unexpected bugs. How does Python, Cirq, and Cirq-Ionq versions sound to you?

@vtomole
Copy link
Collaborator

vtomole commented Apr 17, 2023

How does Python, Cirq, and Cirq-Ionq versions sound to you?

cirq and cirq-ionq versions are always the same so this will be redundant.

cirq-ionq/cirq_ionq/ionq_client.py Show resolved Hide resolved
@vtomole vtomole added automerge Tells CirqBot to sync and merge this PR. (If it's running.) and removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) labels Apr 19, 2023
@viathor viathor merged commit a96a98c into quantumlib:master Apr 19, 2023
@splch splch deleted the return-user-agent branch April 19, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Tells CirqBot to sync and merge this PR. (If it's running.) size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants