[GODRIVER-858] Document dep behavior with 1.0.0-rc1 Created: 01/Mar/19  Updated: 27/Oct/23  Resolved: 07/Mar/19

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Unassigned
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Based on GODRIVER-847 and GODRIVER-857, it seems like

dep ensure -add go.mongodb.org/mongo-driver/mongo

fetches the third beta release rather than 1.0.0-rc1. The behavior should be investigated to see if we can change this to fetch the right release and should be documented in the README if not.



 Comments   
Comment by Ian Whalen (Inactive) [ 07/Mar/19 ]

Given that we can't change the behavior here we've updated the README and release notes to clarify the proper way to use dep:

https://github.com/mongodb/mongo-go-driver/commit/82905e3077cb5ce7f194748a47b55bf7fff65ccf#diff-04c6e90faac2675aa89e2176d2eec7d8R34

Comment by Junaid Warwani [ 06/Mar/19 ]

I'm actually also seeing an issue with dep, but a different error:

$ dep ensure -add go.mongodb.org/mongo-driver/mongo
Fetching sources...
 
 
Failed to add the dependencies:
 
 
  ✗ could not infer project root from dependency path: go.mongodb.org/mongo-driver/mongo: unable to deduce repository and source type for "go.mongodb.org/mongo-driver/mongo": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://go.mongodb.org/mongo-driver/mongo?go-get=1": Get https://go.mongodb.org/mongo-driver/mongo?go-get=1: x509: certificate signed by unknown authority
 
 
adding dependencies failed

https://go.mongodb.org/mongo-driver/mongo/ returns a 200, and then redirects to https://godoc.org/go.mongodb.org/mongo-driver//mongo, which returns a 301, and redirects to https://godoc.org/go.mongodb.org/mongo-driver/mongo. I think the redirect isn't being done properly (or at least, in a way that's unexpected by dep) and the dep add is therefore breaking 

Generated at Thu Feb 08 08:35:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.