Skip to content

Update go-getter to the latest version - #1441

Merged
Andriy Knysh (aknysh) merged 21 commits into
mainfrom
update-go-getter
Sep 3, 2025
Merged

Andriy Knysh (aknysh) merged 21 commits into
mainfrom
update-go-getter

Conversation

@aknysh

@aknysh Andriy Knysh (aknysh) commented Sep 2, 2025 •

Copy link
Copy Markdown
Member

what

  • Update go-getter to the latest version
  • Make DisableSymlinks configurable on the git client

why

@aknysh Andriy Knysh (aknysh) self-assigned this Sep 2, 2025
@aknysh
Andriy Knysh (aknysh) requested a review from a team as a code owner September 2, 2025 20:05
@aknysh Andriy Knysh (aknysh) added the minor New features that do not break anything label Sep 2, 2025
@github-actions github-actions Bot added the size/l Large size PR label Sep 2, 2025
@mergify

mergify Bot commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

Important

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

@mergify mergify Bot added the needs-cloudposse Needs Cloud Posse assistance label Sep 2, 2025

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

golangci-lint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@codecov

codecov Bot commented Sep 2, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.75896% with 56 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.98%. Comparing base (5e2f1c3) to head (b612d26).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/downloader/get_git.go 81.39% 45 Missing and 11 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1441      +/-   ##
==========================================
+ Coverage   55.59%   55.98%   +0.38%     
==========================================
  Files         273      274       +1     
  Lines       28626    28928     +302     
==========================================
+ Hits        15916    16194     +278     
- Misses      10927    10940      +13     
- Partials     1783     1794      +11     
Flag Coverage Δ
unittests 55.98% <81.75%> (+0.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot added size/xl Extra large size PR and removed size/l Large size PR labels Sep 2, 2025
@aknysh Andriy Knysh (aknysh) changed the title Update go-getter to th latest version Update go-getter to the latest version Sep 2, 2025
@mergify

mergify Bot commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

Warning

This PR exceeds the recommended limit of 1,000 lines.

Large PRs are difficult to review and may be rejected due to their size.

Please verify that this PR does not address multiple issues.
Consider refactoring it into smaller, more focused PRs to facilitate a smoother review process.

Comment thread pkg/downloader/get_git_test.go Fixed
Comment thread pkg/downloader/get_git_test.go Fixed

// Also verify we indeed got an ExitError with a WaitStatus behind the scenes
var ee *exec.ExitError
if !errors.As(err, &ee) {

Check warning

Code scanning / golangci-lint

`if !errors.As(err, &ee)` has complex nested blocks (complexity: 4)

`if !errors.As(err, &ee)` has complex nested blocks (complexity: 4)
Comment thread pkg/downloader/get_git_test.go Fixed

dir := t.TempDir()
var fname string
if runtime.GOOS == "windows" {

Check warning

Code scanning / golangci-lint

`if runtime.GOOS == "windows"` has complex nested blocks (complexity: 7)

`if runtime.GOOS == "windows"` has complex nested blocks (complexity: 7)
* test: increase test coverage for go-getter downloader to 77.7%

- Add comprehensive tests for GetCustom() method covering various scenarios (89.1% coverage)
- Add tests for git operations: clone (90.9%), update (86.5%), checkout (100%), fetchSubmodules (100%)
- Add tests for findRemoteDefaultBranch() method (100% coverage)
- Add tests for CustomGitGetter.Get() method (100% coverage)
- Define static errors in errors/errors.go to comply with golangci-lint err113
- Format code with gofumpt
- Overall package coverage increased from 46.1% to 77.7%

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* [autofix.ci] apply automated fixes

* updates

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: aknysh <[email protected]>
Comment thread pkg/downloader/get_git.go Fixed
Comment thread pkg/downloader/get_git_test.go Fixed
Comment thread pkg/downloader/git_getter_test.go Fixed

dir := t.TempDir()
var fname string
if runtime.GOOS == "windows" {

Check warning

Code scanning / golangci-lint

`if runtime.GOOS == "windows"` has complex nested blocks (complexity: 5)

`if runtime.GOOS == "windows"` has complex nested blocks (complexity: 5)
- Replace deprecated io/ioutil with os.CreateTemp
- Add constants for magic numbers (base10, portBitSize, sshKeyFileMode)
- Add constants for repeated strings (gitCommand, originRemote, gitArgSeparator)
- Create gitOperationParams struct to reduce function arguments
- Fix invalid URL construction in tests
- Remove unused return values from test helper functions
- Fix potential index out of bounds issue
- Add #nosec comments for validated subprocess commands
- Apply gofumpt formatting

Reduces linting issues from 20 to 6 (remaining are complexity warnings)
Comment thread pkg/downloader/get_git.go
return nil
}

func (g *CustomGitGetter) update(params *gitOperationParams) error {

Check failure

Code scanning / golangci-lint

function-length: maximum number of lines per function exceeded; max 60 but got 71

function-length: maximum number of lines per function exceeded; max 60 but got 71
@aknysh
Andriy Knysh (aknysh) merged commit 4c89983 into main Sep 3, 2025
@aknysh
Andriy Knysh (aknysh) deleted the update-go-getter branch September 3, 2025 05:10
@mergify mergify Bot removed the needs-cloudposse Needs Cloud Posse assistance label Sep 3, 2025
@github-actions

github-actions Bot commented Sep 3, 2025

Copy link
Copy Markdown

These changes were released in v1.189.0.

Erik Osterman (Cloud Posse) (osterman) added a commit that referenced this pull request Sep 5, 2025
- Resolve conflict in .gitignore by combining both test artifact entries
- Includes latest main branch changes:
  - Update go-getter to latest version (#1441)
  - Make inline atmos config override config from imports (#1447)
  - Replace t.Skip with t.Skipf throughout codebase (#1449)
- Maintains all gotcha-related changes from feature branch
Erik Osterman (Cloud Posse) (osterman) added a commit that referenced this pull request Sep 23, 2025
* updates

* updates

* updates

* updates

* updates

* updates

* [autofix.ci] apply automated fixes

* updates

* [autofix.ci] apply automated fixes

* updates

* updates

* updates

* updates

* test: increase test coverage for go-getter downloader to 77.7% (#1443)

* test: increase test coverage for go-getter downloader to 77.7%

- Add comprehensive tests for GetCustom() method covering various scenarios (89.1% coverage)
- Add tests for git operations: clone (90.9%), update (86.5%), checkout (100%), fetchSubmodules (100%)
- Add tests for findRemoteDefaultBranch() method (100% coverage)
- Add tests for CustomGitGetter.Get() method (100% coverage)
- Define static errors in errors/errors.go to comply with golangci-lint err113
- Format code with gofumpt
- Overall package coverage increased from 46.1% to 77.7%

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* [autofix.ci] apply automated fixes

* updates

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: aknysh <[email protected]>

* fix: resolve golangci-lint issues in pkg/downloader (#1445)

- Replace deprecated io/ioutil with os.CreateTemp
- Add constants for magic numbers (base10, portBitSize, sshKeyFileMode)
- Add constants for repeated strings (gitCommand, originRemote, gitArgSeparator)
- Create gitOperationParams struct to reduce function arguments
- Fix invalid URL construction in tests
- Remove unused return values from test helper functions
- Fix potential index out of bounds issue
- Add #nosec comments for validated subprocess commands
- Apply gofumpt formatting

Reduces linting issues from 20 to 6 (remaining are complexity warnings)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
Co-authored-by: Claude <[email protected]>

This branch was successfully deployed

No deployments
preview — b612d269 Deployed Sep 3, 2025 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features that do not break anything size/xl Extra large size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants