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

Add version cli argument #118

Merged
merged 1 commit into from
Nov 10, 2020
Merged

Add version cli argument #118

merged 1 commit into from
Nov 10, 2020

Conversation

aerialls
Copy link
Contributor

@aerialls aerialls commented Sep 4, 2020

Proposed changes

Add a new flag version to display the current version. This is useful to check if the exporter needs an update without trying to launch the exporter.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING guide
  • I have proven my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have ensured the README is up to date
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch on my own fork

@lucacome
Copy link
Member

lucacome commented Sep 4, 2020

Hi @aerialls

Thanks for the PR! I think we should keep printing the version on startup too and exit right after if the flag is set. What do you think?

@aerialls
Copy link
Contributor Author

aerialls commented Sep 4, 2020

Hello 👋🏻
This is what i wanted to do until I saw the "Starting ...". This is why I decided to split in two phrases. But I can rollback this change if needed 😄

@pleshakov pleshakov self-requested a review September 4, 2020 23:25
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

Hi @aerialls

Thanks for the PR!

In addition to @lucacome 's comment, could you also update the main README the usage section with the description of the new cli argument - https://github.com/nginxinc/nginx-prometheus-exporter#command-line-arguments ?

Also, we don't usually start commit messages with tags like feat(flag). Please take a look at the commit history https://github.com/nginxinc/nginx-prometheus-exporter/commits/master Could you update the commit message? Something like Add version cli argument or Add version flag would make sense.

Cheers

@aerialls aerialls force-pushed the help_cmd branch 3 times, most recently from d40db8b to a1cc26e Compare November 2, 2020 17:45
@aerialls aerialls changed the title feat(flag): add new help command @aerialls Add version cli argument Nov 2, 2020
@aerialls aerialls changed the title @aerialls Add version cli argument Add version cli argument Nov 2, 2020
@aerialls
Copy link
Contributor Author

aerialls commented Nov 2, 2020

Hello @pleshakov.
Sorry for the (huge) delay. I've updated the PR following your feedbacks. I hope it's ok now 👍
Thanks!

Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

Hi @aerialls

Thanks for addressing the feedback! I have one comment before we merge it. Thanks

exporter.go Outdated Show resolved Hide resolved
@aerialls
Copy link
Contributor Author

aerialls commented Nov 6, 2020

Hi @pleshakov,
I've updated the PR with your feedback!

@pleshakov pleshakov added the enhancement Pull requests for new features/feature enhancements label Nov 10, 2020
@pleshakov pleshakov merged commit f5a5f80 into nginxinc:master Nov 10, 2020
@pleshakov
Copy link
Contributor

@aerialls Thank you!

@lucacome lucacome added the minor label Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests for new features/feature enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants