Skip to content

Conversation

@adzpm
Copy link

@adzpm adzpm commented Nov 24, 2025

refactor(runtime-go): introduce Runtime-based parsing and module fetching

  • Replaced global parse and fetchModule functions with Runtime methods.
  • Added goEnv helper to manage and override Go environment variables.
  • Introduced goCacheDir for versioned Go cache management.
  • Updated tests to use the new Runtime helpers.

- Excluded from list `GOCACHE`, `GOCACHEPROG`.
- Moved commented-out environment variables to the bottom of the exclusion list for better readability.
- Adjusted formatting for consistency.
…tching

- Replaced global `parse` and `fetchModule` functions with `Runtime` methods.
- Added `goEnv` helper to manage and override Go environment variables.
- Introduced `goCacheDir` for versioned Go cache management.
- Updated tests to use the new `Runtime` helpers.
@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 32.55814% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.75%. Comparing base (9165d9b) to head (8b06c83).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
internal/workdir/runtimes/runtime-go/runtime_go.go 30.76% 16 Missing and 2 partials ⚠️
internal/workdir/runtimes/runtime-go/private.go 35.29% 11 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #74      +/-   ##
==========================================
+ Coverage   29.56%   31.75%   +2.18%     
==========================================
  Files          19       20       +1     
  Lines        2212     1751     -461     
==========================================
- Hits          654      556      -98     
+ Misses       1491     1126     -365     
- Partials       67       69       +2     

☔ 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.

- Replaced `goCacheDir` string with `optional.Val` to handle optional cache directory paths.
- Updated `New` constructor to accept an `optional.Val` for `goCacheDir`.
- Adjusted `goEnv` logic to include `GOCACHE` only if `goCacheDir` is set.
- Simplified tests with `optional.Empty` and `optional.New` usage.
- Consolidated `goCache.Get` and directory creation steps into a single conditional.
- Replaced explicit permissions with `fsh.DefaultDirPerm` for consistency.
@kazhuravlev kazhuravlev merged commit 7c0d82f into kazhuravlev:main Nov 24, 2025
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants