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

Pull Makefile-initiated linting checks *or* move to a monthly schedule #149

Open
32 of 33 tasks
atc0005 opened this issue Aug 30, 2023 · 3 comments
Open
32 of 33 tasks

Comments

@atc0005
Copy link
Owner

atc0005 commented Aug 30, 2023

Overview

The recent bug with the v2.17.0 release of the gosec linter (bundled with golangci-lint v1.54.2) triggered false-positive linting failures across several projects using the workflows from this repo.

The go-ci based containers were updated to rollback golangci-lint to v1.54.1 which resolved the container based linting false-positives.

The linting jobs using project Makefiles however continue to fail. This is because of two reasons:

  1. The project Makefiles install the latest stable release of golangci-lint
  2. The upstream project does not appear to (quickly?) rollback bundled linters when a confirmed problem exists
    • the project appears to primarily wait on their upstream sources to resolve the problem before generating a new release

I originally intended for the Makefiles to serve two purposes:

  • allow me to easily orchestrate common development tasks (linting, building)
  • allow others to (somewhat easily) generate builds

I still use project Makefiles to generate assets (mostly using containers now), but no longer use Makefiles for local linting tasks.

As noted in the GH issue title, it's probably worth first dropping the Makefile linting checks as regular CI jobs. To begin with I'd add them to the monthly scheduled tasks, but might end up dropping them entirely, leaving them in the Makefile but generally disused.

TODO

  • Disable Lint codebase using Makefile job by default
  • Enable Lint codebase using Makefile job as monthly task
  • Wait a sufficient length of time to observe changes
  • Consider removing CI Makefile-initiated linting tasks
    • rely on container-based linting only
    • would need to update workflow to lint using go-ci container-provided linting settings and then as a separate task (or job) lint using the project-specific linting configuration
      • might be worth dropping project-specific linting configuration?

Projects to update

Drop branch protection rule requirement for the Makefile / Lint codebase using Makefile status check:

  • atc0005/brick
  • atc0005/bridge
  • atc0005/check-cert
  • atc0005/check-illiad
  • atc0005/check-mail
  • atc0005/check-ntpt
  • atc0005/check-path
  • atc0005/check-process
  • atc0005/check-restart
  • atc0005/check-rsat
  • atc0005/check-ssh
  • atc0005/check-statuspage
  • atc0005/check-vmware
  • atc0005/check-whois
  • atc0005/dnsc
  • atc0005/elbow
  • atc0005/go-ci
  • atc0005/go-ezproxy
  • atc0005/go-lockss
  • atc0005/go-template
  • atc0005/hello-world
  • atc0005/mysql2sqlite
  • atc0005/go-nagios
  • atc0005/go-teams-notify
  • atc0005/nagios-debug
  • atc0005/query-meta
  • atc0005/safelinks
  • atc0005/send2teams
  • atc0005/tsm-pass
@atc0005
Copy link
Owner Author

atc0005 commented Aug 30, 2023

Looking over the current setup the easiest path forward is to mark the job as optional just like the Makefile / Build codebase using Makefile all recipe has been marked. That job is then explicitly enabled for the monthly scheduled workflow.

atc0005 added a commit that referenced this issue Aug 30, 2023
Disable by default, explicitly set Makefile-initiated linting
job as monthly job.

refs GH-149
@atc0005
Copy link
Owner Author

atc0005 commented Feb 23, 2024

  • Consider removing CI Makefile-initiated linting tasks

I'm thinking that by keeping this limited to a monthly schedule it remains useful as a proof against Makefiles "degrading" and no longer properly running the linting tasks.

  • might be worth dropping project-specific linting configuration?

This is worth considering. Since we're using the go-ci project images which bundle a standardized golangci-lint config file we don't necessarily need project-specific config files unless those config files apply stricter linting standards than the standardized linter config.

Said another way, if we remove the linter config file from each project we should probably also remove the Makefile-initiated linting tasks from CI (currently a monthly schedule).

For now, it's probably worth leaving everything as it is until I think on this further.

@atc0005
Copy link
Owner Author

atc0005 commented Feb 23, 2024

So to recap, next steps would include (if at all):

  • dependent projects
    • remove .golangci.yml file from all projects using this repo
    • keep .markdownlint.yml file within each project
      • some projects may need to override default settings
  • this project
    • remove lint_code_with_makefile job from .github/workflows/lint-and-build-using-make.yml
    • rename .github/workflows/lint-and-build-using-make.yml
      • option 1: .github/workflows/build-using-make.yml
      • option 2: .github/workflows/makefile-tasks.yml
        • currently linting and builds are the two tasks, but it might be that we introduce further tasks later
        • downside is that the filename becomes less self-documenting at a glance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant