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: Update build system #1888

Merged

Conversation

MisterMX
Copy link
Collaborator

@MisterMX MisterMX commented Oct 6, 2023

Description of your changes

Bump golangci-lint to v1.54.0

Superseedes #1859

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

@MisterMX MisterMX requested a review from chlunde October 6, 2023 17:17
@chlunde
Copy link
Collaborator

chlunde commented Oct 6, 2023

 Received 504542006 of 504542006 (100.0%), 159.8 MBs/sec
  Error: /usr/bin/tar: ../../../go/pkg/mod/dario.cat/[email protected]/issue230_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/dario.cat/[email protected]/merge_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/dario.cat/[email protected]/issue220_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/dario.cat/[email protected]/issue138_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/dario.cat/[email protected]/issue100_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/dario.cat/[email protected]/map.go: Cannot open: File exists

golangci/golangci-lint-action#23 (comment)

I think we need to rewrite the lint action

The reference code from README.md is just https://github.com/golangci/golangci-lint-action#golangci-lint-action

  golangci:
    name: lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-go@v4
        with:
          go-version: '1.21'
          cache: false
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v3
        with:
          version: v1.54

@MisterMX MisterMX force-pushed the chore/bump-build-module-1.54.0 branch 3 times, most recently from 1553f5a to 63b2a1c Compare October 9, 2023 09:39
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@MisterMX MisterMX force-pushed the chore/bump-build-module-1.54.0 branch 5 times, most recently from e4220e4 to 780565f Compare October 9, 2023 16:07
@MisterMX
Copy link
Collaborator Author

MisterMX commented Oct 9, 2023

I extended this PR with the following:

  • Use Go v1.21.2

    • Add ignore opts to some tests because they failed due to the unexported context.backgroundCtx struct
  • Bump golangci-lint to v1.54.2

  • Bump build submodule

  • Copy (most of) .golancilint.yml from github.com/crossplane/crossplane and fix the linter issues accordingly.
    Go import order is now

    1. Go standard packages
    2. 3rd party packages
    3. local packages

@chlunde can you check again?

@MisterMX MisterMX mentioned this pull request Oct 9, 2023
2 tasks
@@ -259,43 +324,53 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'

steps:
- name: Cleanup Disk
uses: jlumbroso/free-disk-space@main
Copy link
Collaborator

Choose a reason for hiding this comment

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

pin this? Doubly so because I have not heard of it :D

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, makes sense. Thanks for pointing that one out 👍

* Use Go v1.21.2
** Add ignore opts to some tests because they failed due to the
   unexported context.backgroundCtx struct
* Bump golangci-lint to v1.54.0
* Bump build submodule

Copy (most of) .golancilint.yml from github.com/crossplane/crossplane
and fix the linter issues accordingly.

Go import order is now
1. Go standard packages
2. 3rd party packages
3. local packages

Signed-off-by: Maximilian Blatt (external expert on behalf of DB Netz) <[email protected]>
Co-authored-by: ivan katliarchuk <[email protected]>
@MisterMX MisterMX force-pushed the chore/bump-build-module-1.54.0 branch from 780565f to 5e2d8dd Compare October 10, 2023 08:56
@MisterMX MisterMX merged commit 694d2f9 into crossplane-contrib:master Oct 10, 2023
11 checks passed
@MisterMX MisterMX changed the title chore: Bump submodule chore: Update build system Oct 10, 2023
@MisterMX MisterMX mentioned this pull request Oct 13, 2023
2 tasks
@MisterMX MisterMX deleted the chore/bump-build-module-1.54.0 branch October 19, 2023 08:49
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