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

feat: fix ci / makefile #2320

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rabbitprincess
Copy link
Contributor

Overview

fix / cleanup makefile and correcting several commands.
Related to #2319 #2316

@rabbitprincess rabbitprincess marked this pull request as ready for review February 12, 2025 01:57
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!

Changes look good for the most part. Main comment pertains to keeping the grandfathered linter commit

with:
go-version: ${{ env.GO_VERSION }}

- name: Check out source
uses: actions/checkout@v2
uses: actions/checkout@v4
Copy link
Member

Choose a reason for hiding this comment

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

👍


LINT_COMMIT := v1.18.0
GOACC_COMMIT := 80342ae2e0fcf265e99e76bcc4efd022c7c3811b
Copy link
Member

Choose a reason for hiding this comment

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

So this is important, as it absolves any linter violations before that commit. Otherwise, we'll have to have a PR which fixes every linter violation.

In lnd, we use golangci which still supports this feature: https://github.com/lightningnetwork/lnd/pull/9382/files

@@ -1,17 +0,0 @@
#!/bin/bash

SUBMODULES=$(find . -mindepth 2 -name "go.mod" | cut -d'/' -f2)
Copy link
Member

Choose a reason for hiding this comment

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

Why remove? Given that it's able to locate sub-modules automatically?

In the new diff, we need to enumerate them all by hand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just thought it was simple approach. Other commands, such as unit / unit-cover, are still done entirely by hand. It works perfectly as long as nested go.mod is not added.

Makefile Outdated

LINT = $(LINT_BIN) run -v $(LINT_WORKERS)
LINT = $(LINT_BIN) run -v $(LINT_WORKERS) --timeout=$(LINT_TIMEOUT) --issues-exit-code=0
Copy link
Member

Choose a reason for hiding this comment

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

Why's issues-exit-code needed now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It just exits with code 0 when a lint error occurs. It's not needed, so better to remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved in bdf7318

@@ -14,8 +14,6 @@ GOTEST_DEV = go test -v -tags=$(DEV_TAGS)
GOTEST := go test -v
GOMODTIDY := go mod tidy

GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
Copy link
Member

Choose a reason for hiding this comment

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

👍 it's been years since we vendor'd deps

@@ -146,7 +146,7 @@ func TestClientConnectedToWSServerRunner(t *testing.T) {
}

testTable := []TestTableItem{
TestTableItem{
{
Copy link
Member

Choose a reason for hiding this comment

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

Were these the only instances in violation? If so then, perhaps we don't need that lint commit hash after all.

Was pretty sure we had some PRs merged in recent times that did things like violate the 80 char column limit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not know about commit history, but it is only change about make fmt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not make lint - As far as I know, Go lint only gives warnings and doesn't change the code automatically.

@yyforyongyu
Copy link
Collaborator

Is this still under development?

@rabbitprincess
Copy link
Contributor Author

@yyforyongyu It is still in development, but it would be good to recreate the PR to follow Ideal Git Commit Structure.

@yyforyongyu
Copy link
Collaborator

@rabbitprincess Cool thanks - I think it's better to do a force push on this PR once you fix the commit structure, it's easier that way as we won't lose the context/comments from this PR.

@coveralls
Copy link

coveralls commented Mar 10, 2025

Pull Request Test Coverage Report for Build 13760443534

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2191 unchanged lines in 43 files lost coverage.
  • Overall coverage decreased (-4.0%) to 51.29%

Files with Coverage Reduction New Missed Lines %
blockchain/validate.go 1 73.44%
mining/policy.go 1 91.38%
addrmgr/log.go 3 66.67%
blockchain/indexers/log.go 3 66.67%
blockchain/log.go 3 66.67%
btcec/pubkey.go 3 28.13%
connmgr/log.go 3 66.67%
database/ffldb/driver.go 3 88.37%
mempool/log.go 3 42.86%
mining/log.go 3 66.67%
Totals Coverage Status
Change from base Build 13719035689: -4.0%
Covered Lines: 27763
Relevant Lines: 54129

💛 - Coveralls

@rabbitprincess
Copy link
Contributor Author

@yyforyongyu this pr and #2307 are force-pushed. can you review again?

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