-
Notifications
You must be signed in to change notification settings - Fork 178
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
chore: Improves Update Atlas SDK cache issues #1922
Changes from 2 commits
c21a032
a40eaa4
5dbef55
19e9f4a
19bf411
ac1413a
a73d367
4763192
d3bef88
e67e45d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -17,9 +17,12 @@ | |||||
set -euo pipefail | ||||||
|
||||||
LATEST_SDK_TAG=$(curl -sSfL -X GET https://api.github.com/repos/mongodb/atlas-sdk-go/releases/latest | jq -r '.tag_name') | ||||||
|
||||||
LATEST_SDK_RELEASE=$(echo "${LATEST_SDK_TAG}" | cut -d '.' -f 1) | ||||||
echo "==> Updating SDK to latest major version ${LATEST_SDK_TAG}" | ||||||
|
||||||
echo "==> Updating SDK to latest major version tag: ${LATEST_SDK_TAG}, release: ${LATEST_SDK_RELEASE}" | ||||||
curl -sSfL -X GET "https://proxy.golang.org/go.mongodb.org/atlas-sdk/${LATEST_SDK_RELEASE}/@v/${LATEST_SDK_TAG}.info" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI this may trigger the go proxy to do a fetch but it happens in the background so the next step may still fail
lantoli marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
GOPROXY=direct | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pick an approach, skipping the proxy or asking the proxy to update There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WDYT about the latest version, i go for skipping proxy, but at the end asking the proxy to update so it'll benefit others edit: i'm going to go to ask update because skipping proxy is failing, e.g.: https://github.com/mongodb/terraform-provider-mongodbatlas/actions/runs/7820266017/job/21334559930 |
||||||
echo "Using GOPROXY: $GOPROXY" | ||||||
gomajor get "go.mongodb.org/atlas-sdk/${LATEST_SDK_RELEASE}@${LATEST_SDK_TAG}" | ||||||
go mod tidy | ||||||
echo "Done" | ||||||
echo "Done" |
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.
Could you clarify what was the issue and how the improvement should help with? Thanks!
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.
as an example a new Atlas Go SDK version was released this morning, but it took many hours until the script was successful because Go caches. We want to try to avoid/minimize that delay