Skip to content

Conversation

@rigidit
Copy link

@rigidit rigidit commented Nov 20, 2025

For workspace initialization from connection string, regex is updated to handle both v1 and v2 workspaces.

For non connection strings, if user provided resource id or params to build the resource id, we call ARM to fetch the workspace and get location and endpoint information. In case there is not enough params to build resource id, but workspace name is provided, we try to query ARG.

@rigidit rigidit changed the title Support v2 endpoints when creating workspace from connection string Workspace creation supports v2 endpoints Dec 2, 2025
@rigidit rigidit marked this pull request as ready for review December 11, 2025 00:16
@rigidit rigidit requested a review from a team as a code owner December 11, 2025 00:16
@rigidit rigidit changed the title Workspace creation supports v2 endpoints Add support for v2 endpoints in Workspace initialization Dec 11, 2025
@rigidit rigidit changed the title Add support for v2 endpoints in Workspace initialization Add support for workspace v2 endpoints Dec 11, 2025
WorkspaceName=(?P<workspace_name>[^\s;]+);
ApiKey=(?P<api_key>[^\s;]+);
QuantumEndpoint=(?P<quantum_endpoint>https://(?P<location>[^\s\.]+).quantum(?:-test)?.azure.com/);
QuantumEndpoint=(?P<quantum_endpoint>https://(?P<location>[^\s\.]+?)(?:-v2)?.quantum(?:-test)?.azure.com/);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since part of the reason to start discovering endpoints was to stop hardcoding them in the codebase. I think to that end, we could just verify that the overall URL structure is correct without hardcoding quantum,v2,azure.com in it. I understand that here we verify the connection string, but I don't know if we're gaining much by hardcoding the URL again here.

Copy link
Author

Choose a reason for hiding this comment

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

I think it's more about security: we are validating string coming from user environment which is used to generate a URL and fail fast if invalid data is detected

@rigidit
Copy link
Author

rigidit commented Dec 11, 2025

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 702 in repo microsoft/azure-quantum-python

@pavelbraginskiy
Copy link

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rigidit rigidit requested a review from katymccl December 11, 2025 20:14
@rigidit rigidit requested a review from kikomiss December 11, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants