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

[chore]: dont set path for go in validate #6273

Merged
merged 9 commits into from
Oct 25, 2022

Conversation

sakshi1215
Copy link
Contributor

@sakshi1215 sakshi1215 commented Oct 11, 2022

Signed-off-by: sakshi1215 [email protected]

Description:

Removing setting path in validate

Link to tracking Issue: fixes #6030

Signed-off-by: sakshi1215 <[email protected]>
@sakshi1215 sakshi1215 requested review from a team and dmitryax October 11, 2022 06:17
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 11, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@sakshi1215
Copy link
Contributor Author

@dmitryax can you please trigger the CI on this? Also, I am unable to sign CLA as individual contributor.

@jpkrohling
Copy link
Member

I could trigger this, but I don't think this is the right solution -- the mismatch is that the name "Validate" implies a function that does not change the state. Setting the path is indeed correct, so perhaps we just need to change the name of the function?

@sakshi1215
Copy link
Contributor Author

sakshi1215 commented Oct 11, 2022 via email

Signed-off-by: sakshi1215 <[email protected]>
@sakshi1215
Copy link
Contributor Author

@jpkrohling Can you please check again?

@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Base: 92.30% // Head: 91.79% // Decreases project coverage by -0.51% ⚠️

Coverage data is based on head (3c9091c) compared to base (3875a92).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6273      +/-   ##
==========================================
- Coverage   92.30%   91.79%   -0.52%     
==========================================
  Files         219      235      +16     
  Lines       13463    13454       -9     
==========================================
- Hits        12427    12350      -77     
- Misses        806      876      +70     
+ Partials      230      228       -2     
Impacted Files Coverage Δ
cmd/builder/internal/builder/config.go 68.49% <100.00%> (+0.88%) ⬆️
obsreport/obsreport_receiver.go 63.58% <0.00%> (-36.42%) ⬇️
pdata/plog/pb.go 71.42% <0.00%> (-28.58%) ⬇️
pdata/ptrace/pb.go 71.42% <0.00%> (-28.58%) ⬇️
pdata/pmetric/pb.go 71.42% <0.00%> (-28.58%) ⬇️
pdata/ptrace/json.go 53.33% <0.00%> (-26.67%) ⬇️
pdata/pmetric/json.go 53.33% <0.00%> (-26.67%) ⬇️
pdata/plog/json.go 73.33% <0.00%> (-26.67%) ⬇️
exporter/loggingexporter/factory.go 88.88% <0.00%> (-11.12%) ⬇️
internal/obsreportconfig/obsreportconfig.go 96.90% <0.00%> (-3.10%) ⬇️
... and 54 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: sakshi1215 <[email protected]>
CHANGELOG.md Outdated Show resolved Hide resolved
@sakshi1215 sakshi1215 changed the title fix: dont set path for go in validate [chore]: dont set path for go in validate Oct 12, 2022
@sakshi1215 sakshi1215 requested a review from dmitryax October 12, 2022 12:58
cmd/builder/internal/builder/config.go Outdated Show resolved Hide resolved
@sakshi1215 sakshi1215 requested a review from dmitryax October 13, 2022 15:58
@sakshi1215
Copy link
Contributor Author

Can we merge this @dmitryax ?

@bogdandrutu
Copy link
Member

@jpkrohling are you ok with this?

// Validate checks whether the current configuration is valid
func (c *Config) Validate() error {
// ValidateAndSetGoPath checks whether the current configuration is valid and sets go path
func (c *Config) ValidateAndSetGoPath() error {
Copy link
Member

Choose a reason for hiding this comment

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

I think I would prefer to split this function into two:

  • SetGoPath
  • Validate

The current callers of Validate will then need to call both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 20, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

Signed-off-by: Sakshi Patle <[email protected]>
@sakshi1215 sakshi1215 requested review from jpkrohling and removed request for dmitryax October 20, 2022 21:50
@sakshi1215
Copy link
Contributor Author

@jpkrohling I have fixed it please check

@bogdandrutu
Copy link
Member

Please fix tests.

Signed-off-by: Sakshi Patle <[email protected]>
@sakshi1215 sakshi1215 requested review from dmitryax and bogdandrutu and removed request for jpkrohling and dmitryax October 25, 2022 01:25
@sakshi1215
Copy link
Contributor Author

@bogdandrutu Please review this again, I have fixed tests

@bogdandrutu bogdandrutu merged commit db0c250 into open-telemetry:main Oct 25, 2022
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.

[builder] Remove setting of the Go executable from Validate()
4 participants