Skip to content

chore: Initialize logging early and print version at startup#846

Draft
jannfis wants to merge 1 commit intomainfrom
chore/print-version-first
Draft

chore: Initialize logging early and print version at startup#846
jannfis wants to merge 1 commit intomainfrom
chore/print-version-first

Conversation

@jannfis
Copy link
Copy Markdown
Collaborator

@jannfis jannfis commented Mar 27, 2026

What does this PR do / why we need it:

This PR moves logging initialization to be the first thing on startup of both agent and principal, so that even a non-starting pod (i.e. due to missing certificates) will log its version information before any error aborts the execution.

Which issue(s) this PR fixes:

Fixes #?

How to test changes / Special notes to the reviewer:

Checklist

  • Documentation update is required by this PR (and has been updated) OR no documentation update is required.

Signed-off-by: jannfis <jann@mistrust.net>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0cf537e4-6e06-432c-b7f0-a7a6be182929

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/print-version-first

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.25%. Comparing base (3e7bb73) to head (d4799c1).

Files with missing lines Patch % Lines
cmd/argocd-agent/agent.go 0.00% 13 Missing ⚠️
cmd/argocd-agent/principal.go 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #846      +/-   ##
==========================================
- Coverage   45.27%   45.25%   -0.02%     
==========================================
  Files         118      118              
  Lines       16633    16635       +2     
==========================================
- Hits         7530     7528       -2     
- Misses       8410     8413       +3     
- Partials      693      694       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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