[GODRIVER-2488] Deprecate `docbuilder` Architecture Created: 11/Jul/22 Updated: 25/Jul/22 |
|
| Status: | Backlog |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Preston Vasquez | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | techdebt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
Backgrounddocbuilder is a deprecated functionality of the Go Driver that was used to create the redirect HTML for go packages endpoints directed by the URL go.mongodb.org/mongo-driver. It does this with a combination of S3-hosted HTML files and using the url meta tag, like this:
docbuilder was removed from the Go Driver to resolve CVE-2021-44716. When reviewing the implications of removing docbuilder, it was discovered that certain newer packages in the Go Driver result in 404 redirects. For example: https://go.mongodb.org/mongo-driver/mongo/address . The underlying architecture is to redirect to https://pkg.go.dev/ using the HTML described in TECHOPS-6671 . ImplicationsThere are no functional implications to the 404 errors. The go-import meta tag is what is responsible for what is fetched by go get:
Our usage of go-import is static and directed to https://github.com/mongodb/mongo-go-driver.git . ProposalThere are at least two things that must be done to resolve this ticket: 1. Have the data in the existing S3 bucket migrated to an S3 bucket that the Go Driver team can access.
Local TestingTo test that the above HTML works for any package, or even arbitrary endpoints, you can extract the code from the attached zip file and run a python server locally. You will need to add this line to /etc/hosts:
|