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

Check for go mod inconsistencies #1368

Merged
merged 5 commits into from
Oct 25, 2021
Merged

Check for go mod inconsistencies #1368

merged 5 commits into from
Oct 25, 2021

Conversation

lvrach
Copy link
Member

@lvrach lvrach commented Oct 25, 2021

Motivation

This PR is meant to solve two problems behind go.mod inconsistencies:

  1. Forgetting to commit go.mod after introducing a dependency
  2. Differences between go.mod when running go mod tidy with and without enterprise code. This is especially problematic when running Dependabot.

Solution

The solution regarding enterprise code is not ideal, but is a quick one.

The problem with enterprise code is around exclusive dependencies, packages that are only required in enterprise code and not in the open source repo.

To solve this, a new file was added that includes those exclusive dependencies. Following the tools.go trick golang/go#25922.

The github action here runs without enterprise code, thus enforcing that a go.mod generated with enterprise code will be the same with the one without.

Output on error:

Screenshot 2021-10-25 at 1 39 41 PM

Screenshot 2021-10-25 at 1 40 05 PM

@codecov
Copy link

codecov bot commented Oct 25, 2021

Codecov Report

Merging #1368 (5f8d6f9) into master (109a9cb) will increase coverage by 0.39%.
The diff coverage is 47.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1368      +/-   ##
==========================================
+ Coverage   22.45%   22.84%   +0.39%     
==========================================
  Files         116      116              
  Lines       22148    22244      +96     
==========================================
+ Hits         4973     5082     +109     
+ Misses      16857    16851       -6     
+ Partials      318      311       -7     
Impacted Files Coverage Δ
event-schema/event_schema.go 0.00% <0.00%> (ø)
event-schema/setup.go 0.00% <0.00%> (ø)
...stomdestinationmanager/customdestinationmanager.go 0.00% <0.00%> (ø)
services/stats/stats.go 0.00% <ø> (ø)
services/streammanager/kafka/kafkamanager.go 0.00% <0.00%> (ø)
services/streammanager/streammanager.go 0.00% <0.00%> (ø)
router/batchrouter/batchrouter.go 31.75% <33.33%> (-0.03%) ⬇️
jobsdb/jobsdb.go 49.71% <71.15%> (+3.58%) ⬆️
gateway/gateway.go 47.92% <100.00%> (+0.17%) ⬆️
jobsdb/jobsdb_utils.go 67.76% <100.00%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f557ea9...5f8d6f9. Read the comment docs.

@chandumlg chandumlg merged commit 7590372 into master Oct 25, 2021
@chandumlg chandumlg deleted the enterprise-mod branch October 25, 2021 11:32
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