Skip to content

Makefile and go.mod: update flagrun dependency to v0.0.6; refactor er… - #33

Merged
kazeburo merged 2 commits into
masterfrom
feat/improve-flagrun
Aug 16, 2026
Merged

Makefile and go.mod: update flagrun dependency to v0.0.6; refactor er…#33
kazeburo merged 2 commits into
masterfrom
feat/improve-flagrun

Conversation

@kazeburo

@kazeburo kazeburo commented Aug 16, 2026

Copy link
Copy Markdown
Member

User description

…ror handling in main.go


PR Type

Enhancement, Bug fix


Description

  • Continue reporting available metrics after stat failures

  • Adopt flagrun v0.0.6 error-return interface

  • Remove build-time commit metadata injection


Diagram Walkthrough

flowchart LR
  Proc["Process metrics collection"]
  CPU["CPU stat"]
  FDS["File descriptor stat"]
  MEM["Memory stat"]
  Output["Available metric output"]
  Notice["Non-fatal error notice"]
  Proc -- "collects" --> CPU
  Proc -- "collects" --> FDS
  Proc -- "collects" --> MEM
  CPU -- "prints when available" --> Output
  FDS -- "prints when available" --> Output
  MEM -- "prints when available" --> Output
  CPU -- "logs failures" --> Notice
  FDS -- "logs failures" --> Notice
  MEM -- "logs failures" --> Notice
Loading

File Walkthrough

Relevant files
Error handling
main.go
Continue metric reporting after individual stat failures 

main.go

  • Update Opt.Run to return error and an exit status.
  • Treat CPU, file-descriptor, and memory stat failures as notices.
  • Print each successfully collected metric independently.
  • Remove commit metadata from flagrun initialization.
+19/-14 
Configuration changes
Makefile
Remove commit metadata from build flags                                   

Makefile

  • Remove Git commit discovery and linker injection.
  • Keep only version metadata in build flags.
+1/-2     
Dependencies
go.mod
Upgrade flagrun and add indirect dependency                           

go.mod

  • Upgrade github.com/monitoring-forge/flagrun to v0.0.6.
  • Add indirect github.com/mackerelio/checkers dependency.
+3/-1     

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@github-actions

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

@kazeburo
kazeburo merged commit b8a388c into master Aug 16, 2026
3 checks passed
@kazeburo
kazeburo deleted the feat/improve-flagrun branch August 16, 2026 01:53
@github-actions github-actions Bot mentioned this pull request Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant