Skip to content
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

fix(goenv.GOMOD): never rely on the environment variable #384

Merged
merged 18 commits into from
Nov 12, 2024

Conversation

RomainMuller
Copy link
Contributor

@RomainMuller RomainMuller commented Nov 7, 2024

The value of go env GOMOD changes depending on the working directory
where the command is executed. Instead of relying on the environment
variable, always spawn go env GOMOD in an explicitly selected
directory.

@RomainMuller RomainMuller requested a review from a team as a code owner November 7, 2024 13:24
@RomainMuller RomainMuller self-assigned this Nov 7, 2024
@RomainMuller RomainMuller marked this pull request as draft November 7, 2024 13:24
@RomainMuller RomainMuller force-pushed the romain.marcadier/APPSEC-55160/rework-instrument-test branch 2 times, most recently from f839238 to 892a8af Compare November 8, 2024 09:04
…EC-55160/rework-instrument-test

# Conflicts:
#	internal/pin/auto.go
#	internal/pin/gomod.go
#	internal/pin/pin.go
#	internal/pin/pin_test.go
…work-instrument-test' into romain.marcadier/APPSEC-55160/rework-instrument-test
The value of `go env GOMOD` changes depending on the working directory
where the command is executed. Instead of relying on the environment
variable, always spawn `go env GOMOD` in an explicitly selected
directory.
@RomainMuller RomainMuller force-pushed the romain.marcadier/APPSEC-55160/goenv.GOMOD-dir branch from adbbf0f to bd172b3 Compare November 12, 2024 10:02
@RomainMuller RomainMuller marked this pull request as ready for review November 12, 2024 10:03
internal/ensure/requiredversion.go Outdated Show resolved Hide resolved
internal/pin/pin.go Outdated Show resolved Hide resolved
Base automatically changed from romain.marcadier/APPSEC-55160/rework-instrument-test to main November 12, 2024 11:07
@RomainMuller RomainMuller added this pull request to the merge queue Nov 12, 2024
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 88.46154% with 3 lines in your changes missing coverage. Please review.

Project coverage is 60.86%. Comparing base (3d60a25) to head (7a7eade).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
instrument/opname.go 88.88% 1 Missing and 1 partial ⚠️
internal/ensure/requiredversion.go 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #384      +/-   ##
==========================================
+ Coverage   60.85%   60.86%   +0.01%     
==========================================
  Files         174      175       +1     
  Lines       12341    12343       +2     
==========================================
+ Hits         7510     7513       +3     
+ Misses       4350     4349       -1     
  Partials      481      481              
Components Coverage Δ
Generators 76.91% <ø> (ø)
Instruments 88.05% <88.88%> (ø)
Go Driver 73.94% <100.00%> (+0.47%) ⬆️
Toolexec Driver 70.66% <ø> (ø)
Aspects 71.85% <ø> (ø)
Injector 73.74% <ø> (ø)
Job Server 64.02% <ø> (ø)
Integration Test Suite 54.24% <ø> (ø)
Other 60.86% <88.46%> (+0.01%) ⬆️
Files with missing lines Coverage Δ
instrument/instrument.go 66.66% <ø> (-11.12%) ⬇️
internal/goenv/goenv.go 76.92% <100.00%> (+10.25%) ⬆️
internal/pin/pin.go 57.86% <100.00%> (ø)
internal/ensure/requiredversion.go 70.00% <80.00%> (+0.23%) ⬆️
instrument/opname.go 88.88% <88.88%> (ø)

Merged via the queue into main with commit e6d1010 Nov 12, 2024
23 checks passed
@RomainMuller RomainMuller deleted the romain.marcadier/APPSEC-55160/goenv.GOMOD-dir branch November 12, 2024 14:54
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.

2 participants