-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(storage): support Azure connection string for presigned URLs #2997
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR fixes Azure Blob Storage presigned URL generation when using connection strings and adds embedding dimension optimization. The core bug fix properly parses Azure connection strings to extract credentials needed for SAS token generation, resolving failures when only Key Changes:
Critical Issue:
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant App as Application
participant Client as BlobClient
participant Parser as parseConnectionString()
participant Getter as getAccountCredentials()
participant Azure as Azure Blob Storage
Note over App,Azure: Presigned URL Generation Flow
App->>Client: getPresignedUrl(key, expiresIn)
Client->>Getter: getAccountCredentials()
alt Connection String Available
Getter->>Parser: parseConnectionString(connectionString)
Parser->>Parser: Extract AccountName via regex
Parser->>Parser: Extract AccountKey via regex
Parser-->>Getter: {accountName, accountKey}
else Account Name/Key Available
Getter-->>Getter: Return {accountName, accountKey}
end
Getter-->>Client: credentials
Client->>Client: Create StorageSharedKeyCredential
Client->>Client: Generate SAS token with credentials
Client->>Azure: Sign URL with SAS token
Azure-->>Client: Presigned URL
Client-->>App: Presigned URL
Note over App,Azure: Embedding Generation with Custom Dimensions
App->>Client: generateEmbeddings(texts, model)
Client->>Client: supportsCustomDimensions(modelName)
alt Model supports dimensions (embedding-3)
Client->>Azure: Request with dimensions: 1536
else Model doesn't support
Client->>Azure: Request without dimensions
end
Azure-->>Client: Embeddings
Client-->>App: Embeddings array
|
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.
4 files reviewed, 4 comments
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Summary
AZURE_CONNECTION_STRINGwas setType of Change
Testing
Tested manually
Checklist