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(cmp): Print stderr output from command even on success #15921 #15973

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

peschmae
Copy link
Contributor

Always log stderr from command execution in cmp sidecar.

If the command executed succesfully, log everything written to stderr to the sidecard in Info level.
This makes developing and debugging plugins easier.

Fixes #15921

Checklist:

  • [x ] Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • [ x] The title of the PR states what changed and the related issues number (used for the release note).
  • [x ] The title of the PR conforms to the Toolchain Guide
  • [ x] I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • [ x] Does this PR require documentation updates?
  • [ x] I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • [ x] I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • [x ] I have added a brief description of why this PR is necessary and/or what this PR solves.

@peschmae peschmae requested review from a team as code owners October 14, 2023 16:10
@codecov
Copy link

codecov bot commented Oct 14, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (99a4bf0) 49.67% compared to head (d595cf2) 49.66%.
Report is 5 commits behind head on master.

❗ Current head d595cf2 differs from pull request most recent head 9682aea. Consider uploading reports for the commit 9682aea to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #15973      +/-   ##
==========================================
- Coverage   49.67%   49.66%   -0.01%     
==========================================
  Files         267      267              
  Lines       46383    46387       +4     
==========================================
+ Hits        23039    23040       +1     
- Misses      21084    21086       +2     
- Partials     2260     2261       +1     
Files Coverage Δ
cmpserver/plugin/plugin.go 80.47% <100.00%> (+0.26%) ⬆️

... and 2 files with indirect coverage changes

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

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

Thanks, @peschmae!

@crenshaw-dev crenshaw-dev merged commit 752004c into argoproj:master Oct 23, 2023
21 checks passed
@crenshaw-dev
Copy link
Member

crenshaw-dev commented Oct 23, 2023

I think this is a reasonable/safe cherry pick for 2.9.

@crenshaw-dev
Copy link
Member

/cherry-pick release-2.9

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Oct 23, 2023
…15973)

* feat(cmp): Print stderr output from command even on success

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

* docs(cmp): Document logging from cmp sidecard for development purposes

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

---------

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
crenshaw-dev pushed a commit that referenced this pull request Oct 23, 2023
…15973) (#16075)

* feat(cmp): Print stderr output from command even on success



* docs(cmp): Document logging from cmp sidecard for development purposes



---------

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
Co-authored-by: Mathias Petermann <mathias.petermann@gmail.com>
@peschmae peschmae deleted the feat/cmp-logging branch October 24, 2023 10:14
@crenshaw-dev
Copy link
Member

/cherry-pick release-2.8

@gcp-cherry-pick-bot
Copy link

Cherry-pick failed with Merge error 752004c8705578b450e04129a13f319a874b940b into temp-cherry-pick-a71f64-release-2.8

thomassandslyst pushed a commit to thomassandslyst/argo-cd that referenced this pull request Oct 26, 2023
…#15921) (argoproj#15973)

* feat(cmp): Print stderr output from command even on success

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

* docs(cmp): Document logging from cmp sidecard for development purposes

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

---------

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
thomassandslyst pushed a commit to thomassandslyst/argo-cd that referenced this pull request Oct 26, 2023
…#15921) (argoproj#15973)

* feat(cmp): Print stderr output from command even on success

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

* docs(cmp): Document logging from cmp sidecard for development purposes

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

---------

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
Signed-off-by: Thomas Sands <thomas.sands@ly.st>
crenshaw-dev pushed a commit that referenced this pull request Oct 26, 2023
…15973) (#16124)

* feat(cmp): Print stderr output from command even on success



* docs(cmp): Document logging from cmp sidecard for development purposes



---------

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
Signed-off-by: Thomas Sands <thomas.sands@ly.st>
Co-authored-by: Mathias Petermann <mathias.petermann@gmail.com>
ymktmk pushed a commit to ymktmk/argo-cd that referenced this pull request Oct 29, 2023
…#15921) (argoproj#15973)

* feat(cmp): Print stderr output from command even on success

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

* docs(cmp): Document logging from cmp sidecard for development purposes

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

---------

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
jmilic1 pushed a commit to jmilic1/argo-cd that referenced this pull request Nov 13, 2023
…#15921) (argoproj#15973)

* feat(cmp): Print stderr output from command even on success

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

* docs(cmp): Document logging from cmp sidecard for development purposes

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

---------

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com>
vladfr pushed a commit to vladfr/argo-cd that referenced this pull request Dec 13, 2023
…#15921) (argoproj#15973)

* feat(cmp): Print stderr output from command even on success

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

* docs(cmp): Document logging from cmp sidecard for development purposes

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

---------

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
…#15921) (argoproj#15973)

* feat(cmp): Print stderr output from command even on success

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

* docs(cmp): Document logging from cmp sidecard for development purposes

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

---------

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
Hariharasuthan99 pushed a commit to AmadeusITGroup/argo-cd that referenced this pull request Jun 16, 2024
…#15921) (argoproj#15973)

* feat(cmp): Print stderr output from command even on success

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

* docs(cmp): Document logging from cmp sidecard for development purposes

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>

---------

Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
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.

CMP write to container log
2 participants