[GODRIVER-1973] Don't pull AWS SDK dependency if it's not necessary Created: 21/Apr/21 Updated: 28/Oct/23 Resolved: 12/May/21 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Authentication, Internal |
| Affects Version/s: | 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.5.1 |
| Fix Version/s: | 1.6.0 |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Dušan Borovčanin | Assignee: | Isabella Siu (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Any Go project that uses vendoring and MongoDB driver. |
||
| Issue Links: |
|
||||
| Backwards Compatibility: | Minor Change | ||||
| Documentation Changes: | Needed | ||||
| Description |
|
I have recently updated the Mongo Go driver from v1.3.5 to v1.4.6 and I have noticed that the vendor directory pulled some 35.5k lines of code. After further inspection, I noticed that most of the updated code has nothing to do with Mongo driver, but its dependency on AWS SDK. Please note that I’m not using AWS to run my code. After deeper dive into the code, I noticed that AWS SDK is used only for AuthN/AuthZ. The driver is using an interface abstraction called Authenticator and AWS authenticator is used in the init method in auth package to register authenticator. That is - instead of registering all the Authenticators and recognizing which one to use by its name, Authenticator can be passed directly as a field in ClientOptions. That way, the user will be in control of choosing Authenticator implementation and pull AWS Authenticator only if needed. You can take a look at the forum discussion. |
| Comments |
| Comment by Githook User [ 12/May/21 ] |
|
Author: {'name': 'Isabella Siu', 'email': 'isabella.siu@mongodb.com', 'username': 'iwysiu'}Message: |
| Comment by Dušan Borovčanin [ 23/Apr/21 ] |
|
Hello, Isabella,
Thanks for helping. You can take a look at the comment here: https://developer.mongodb.com/community/forums/t/mongo-go-driver-aws-sdk-dependency/101869/8.
I'm afraid it will be impossible to make it in backwards compatible way, but maybe you can come up with new ideas. |
| Comment by Isabella Siu (Inactive) [ 23/Apr/21 ] |
|
Hi dusan.borovcanin@mainflux.com! As an update, I'm currently investigating a couple leads we have on reducing the dependency. |