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

scaffold: printVersion includes operator's Version #1953

Merged
merged 2 commits into from
Oct 16, 2019

Conversation

drnic
Copy link
Contributor

@drnic drnic commented Sep 21, 2019

Description of the change:

The scaffold for Operator bootstrapping now includes the Operator's version.Version.

Motivation for the change:

Currently an Operator built from scaffold does not print the Operator's version.Version

(This is my first PR; sorry if there is additional context you need, or if you're not looking for this type of PR)

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 21, 2019
@openshift-ci-robot
Copy link

Hi @drnic. Thanks for your PR.

I'm waiting for a operator-framework or openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 21, 2019
@estroz
Copy link
Member

estroz commented Sep 23, 2019

@drnic thanks for submitting a PR! This change is a nice-to-have.

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 23, 2019
@drnic
Copy link
Contributor Author

drnic commented Sep 25, 2019 via email

@drnic
Copy link
Contributor Author

drnic commented Sep 26, 2019 via email

@estroz
Copy link
Member

estroz commented Sep 27, 2019

/test e2e-aws-go
/test e2e-aws-ansible

@drnic
Copy link
Contributor Author

drnic commented Sep 28, 2019

Hurray! The simple delights of CI passing.

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

Hi @djzager,

Thank you for your contribution.

It is missing the CHANGELOG entry. Could you please add it?
Also, IMHO it would be better Operator Version instead of just Version in order to make clear from where came the version. Do not you agree? WDYT?

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

It was tested locally and all worked fine.
Asked for a few nits and add Changelog.

/lgtm
/approve

 $ operator-sdk up local 
INFO[0000] Running the operator locally.                
INFO[0000] Using namespace default.                     
{"level":"info","ts":1570560195.7755609,"logger":"cmd","msg":"Version: 0.0.1"}
{"level":"info","ts":1570560195.775807,"logger":"cmd","msg":"Go Version: go1.12.10"}
{"level":"info","ts":1570560195.775821,"logger":"cmd","msg":"Go OS/Arch: darwin/amd64"}
{"level":"info","ts":1570560195.775827,"logger":"cmd","msg":"Version of operator-sdk: v0.10.0+git"}
{"level":"info","ts":1570560195.776957,"logger":"leader","msg":"Trying to become the leader."}
{"level":"info","ts":1570560195.7769878,"logger":"leader","msg":"Skipping leader election; not running in a cluster."}

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 8, 2019
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 9, 2019
@drnic
Copy link
Contributor Author

drnic commented Oct 9, 2019

Fixed minor suggestions + rebased against master.

@camilamacedo86
Copy link
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 9, 2019
Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

LGTM once CHANGELOG is updated.

@camilamacedo86
Copy link
Contributor

Hi @drnic,

It still missing the changelog entry. The commit for it maybe needs to be pushed.

@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 9, 2019
@drnic
Copy link
Contributor Author

drnic commented Oct 9, 2019

Sorry, I missed the request for CHANGELOG update earlier.

CHANGELOG.md Outdated Show resolved Hide resolved
@camilamacedo86 camilamacedo86 added approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. labels Oct 10, 2019
CHANGELOG.md Outdated
@@ -8,6 +8,7 @@
- Ansible based operators now gather and serve metrics about each custom resource on port 8686 of the metrics service. ([#1723](https://github.com/operator-framework/operator-sdk/pull/1723))
- Added the Go version, OS, and architecture to the output of `operator-sdk version` ([#1863](https://github.com/operator-framework/operator-sdk/pull/1863))
- Added support for `ppc64le-linux` for the `operator-sdk` binary and the Helm operator base image. ([#1533](https://github.com/operator-framework/operator-sdk/pull/1533))
- Added `Operator Version: X.Y.Z` information in the operator logs.([#1953](https://github.com/operator-framework/operator-sdk/pull/1953))
Copy link
Contributor

@camilamacedo86 camilamacedo86 Oct 13, 2019

Choose a reason for hiding this comment

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

Since we have the release of 0.11.
In order, we are able to merge its required: rebase the PR with the master branch and move this entry for the UNRELEASED section. Could you help us with @drnic? Also, in order to avoid rebase conflicts I would suggest to you keep the update changelog in a another commit, is it possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@camilamacedo86 ok, done

Copy link
Contributor

Choose a reason for hiding this comment

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

HI @drnic,

I think maybe you forget to push the change. This entry needs to be moved for here.

And really tks for your contribution 🥇
iIt is very important to us.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh you released 0.11 without this PR. Sorry.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept the PR as two commits and fixed/updated your CHANGELOG update commit.

@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2019
@camilamacedo86
Copy link
Contributor

/test e2e-aws-go
/test e2e-aws-ansible

@camilamacedo86 camilamacedo86 added the lgtm Indicates that a PR is ready to be merged. label Oct 14, 2019
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

My only concern here is that I'm not sure how many SDK users are aware of the version package that gets scaffolded into their projects. However, since this affects only scaffolded code that can be changed by users and only newly scaffolded projects, it isn't really a problem.

LGTM, after fixing nits in CHANGELOG.

CHANGELOG.md Outdated Show resolved Hide resolved
drnic and others added 2 commits October 15, 2019 08:00
Currently an Operator built from scaffold does not
print the Operator's version.Version
Co-Authored-By: Camila Macedo <cmacedo@redhat.com>
@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 14, 2019
@camilamacedo86 camilamacedo86 merged commit 99021fa into operator-framework:master Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants