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

Never default to a qualifier when none of them are set. #9148

Conversation

ph
Copy link
Contributor

@ph ph commented Nov 19, 2018

Remove default version qualifier and rename the environment variable to set it from BEAT_VERSION_QUALIFIER to VERSION_QUALIFIER this will align with other parts of the stack.

Tested with filebeat.

 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:39:01]
filebeat version 7.0.0 (amd64), libbeat 7.0.0 [0a0c267dd8c33dfce4b009a367b84297fc1a9b92 built 2018-11-19 13:38:15 +0000 UTC]

Without the patch

 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:40:07]
filebeat version 7.0.0-alpha1 (amd64), libbeat 7.0.0-alpha1 [b007837fde985832c257234b5a71bc863cbe2128 built 2018-11-19 13:39:59 +0000 UTC]

Fixes: #8384

NOTES: You may need to remove your ~/.magefile cache to see the changes.

By default if not qualifier were set by the build process the version
subcommand would default to [current version]+[alpha1].
@ph
Copy link
Contributor Author

ph commented Nov 19, 2018

@andrewkroh Don't review, I have to make a few more changes for #8384

@ph ph added in progress Pull request is currently in progress. and removed review labels Nov 19, 2018
@ph ph force-pushed the fix/make-sure-version-subcommand-doesnt-default-to-alpha1-qualifier branch from 4338232 to 0ea530b Compare November 19, 2018 14:44
@ph ph added review and removed in progress Pull request is currently in progress. labels Nov 19, 2018
@ph
Copy link
Contributor Author

ph commented Nov 19, 2018

@andrewkroh I believe i've removed all the trace from BEATS_VERSION_QUALIFIER,

I've tested it with the following:

export VERSION_QUALIFIER=testph2
mage build
functionbeat version 7.0.0-OKPH2 (amd64), libbeat 7.0.0-OKPH2 [4338232f4bfe8ba769d1eedffdbd243694373cbb built 2018-11-19 14:41:00 +0000 UTC]
 ❯ unset VERSION_QUALIFIER                                                                                                                                                                                                                                                                                                                                     
 ❯ mage build                                                                                                                                                                                                                                                                                                                                                  
 ❯ ./functionbeat version                                                                                                                                                                                                                                                                                                                                      [09:49:02]
functionbeat version 7.0.0 (amd64), libbeat 7.0.0 [3b2aac3b129234a2764c39ee705306c7f3d7b5f7 built 2018-11-19 14:48:52 +0000 UTC]

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

The changes LGTM.

Can you look into removing the version qualifier from version used in executing beats-tester? Currently it will consume the -alpha1 artifacts which are not actually the latest. See https://beats-ci.elastic.co/job/elastic+beats-tester+master/build?delay=0sec.

@ph
Copy link
Contributor Author

ph commented Nov 19, 2018

I've kick a PR package tests at https://beats-ci.elastic.co/job/elastic+beats+pull-request+package/10/ just to be sure.

@graphaelli
Copy link
Member

We could simplify a bit further if you'd like, since unset VERSION_QUALIFIER is now the same as VERSION_QUALIFIER=, as pointed out in #8310 (comment). I'm fine either way.

@ph
Copy link
Contributor Author

ph commented Nov 19, 2018

@andrewkroh I think this is what you meant for beat-tester elastic/beats-tester#96

@ph ph merged commit 0697bc6 into elastic:master Nov 19, 2018
@andrewkroh
Copy link
Member

@ph That did make important changes to beats-tester, but it only affects users that run it locally with the run-settings-XX.yml files.

There's still a change needed in elastic/infra to modify the default value of the version shown the Build Parameters page.

kaiyan-sheng added a commit that referenced this pull request Dec 17, 2018
* Never default to a qualifier when none of them are set. (#9148)

Remove default version qualifier and rename the environment variable to set it from `BEAT_VERSION_QUALIFIER` to `VERSION_QUALIFIER` this will align with other parts of the stack.

**Tested with filebeat.**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:39:01]
filebeat version 7.0.0 (amd64), libbeat 7.0.0 [0a0c267 built 2018-11-19 13:38:15 +0000 UTC]
```

**Without the patch**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:40:07]
filebeat version 7.0.0-alpha1 (amd64), libbeat 7.0.0-alpha1 [b007837 built 2018-11-19 13:39:59 +0000 UTC]
```

Fixes: #8384

* Add DeDot in add_docker_metadata processor

* Add dedot into config and default to be false

* Update changelog and documentation

* Add documentation into processors-using.asciidoc

* Run mage fmt update under x-pack filebeat

* Run mage fmt update on x-pack metricbeat

* Run update again

* Run make update fmt from top level dir

* Remove mistakes from rebase

* Remove repeated doc
kaiyan-sheng added a commit that referenced this pull request Dec 31, 2018
* Never default to a qualifier when none of them are set. (#9148)

Remove default version qualifier and rename the environment variable to set it from `BEAT_VERSION_QUALIFIER` to `VERSION_QUALIFIER` this will align with other parts of the stack.

**Tested with filebeat.**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:39:01]
filebeat version 7.0.0 (amd64), libbeat 7.0.0 [0a0c267 built 2018-11-19 13:38:15 +0000 UTC]
```

**Without the patch**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:40:07]
filebeat version 7.0.0-alpha1 (amd64), libbeat 7.0.0-alpha1 [b007837 built 2018-11-19 13:39:59 +0000 UTC]
```

Fixes: #8384

* Fix mysql slowlog template to support mysql 5.7.22

* Add changelog

* Remove changes introduced from rebasing that are not related to this change

* Add more log entries to test log file

* Add OR in multiline.pattern to remove # Time from mysql.slowlog.query

* Use CHANGELOG.next.asciidoc instead
kaiyan-sheng added a commit that referenced this pull request Jan 4, 2019
#9647) (#9843)

* Fix mysql slowlog template to support mysql 5.7.22 (#9647)

* Never default to a qualifier when none of them are set. (#9148)

Remove default version qualifier and rename the environment variable to set it from `BEAT_VERSION_QUALIFIER` to `VERSION_QUALIFIER` this will align with other parts of the stack.

**Tested with filebeat.**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:39:01]
filebeat version 7.0.0 (amd64), libbeat 7.0.0 [0a0c267 built 2018-11-19 13:38:15 +0000 UTC]
```

**Without the patch**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:40:07]
filebeat version 7.0.0-alpha1 (amd64), libbeat 7.0.0-alpha1 [b007837 built 2018-11-19 13:39:59 +0000 UTC]
```

Fixes: #8384

* Fix mysql slowlog template to support mysql 5.7.22

* Add changelog

* Remove changes introduced from rebasing that are not related to this change

* Add more log entries to test log file

* Add OR in multiline.pattern to remove # Time from mysql.slowlog.query

* Use CHANGELOG.next.asciidoc instead

(cherry picked from commit b29ddfc)

* Rerun test with GENERATE=1 and 6.x environment
kaiyan-sheng added a commit that referenced this pull request Jan 14, 2019
* Never default to a qualifier when none of them are set. (#9148)

Remove default version qualifier and rename the environment variable to set it from `BEAT_VERSION_QUALIFIER` to `VERSION_QUALIFIER` this will align with other parts of the stack.

**Tested with filebeat.**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:39:01]
filebeat version 7.0.0 (amd64), libbeat 7.0.0 [0a0c267 built 2018-11-19 13:38:15 +0000 UTC]
```

**Without the patch**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:40:07]
filebeat version 7.0.0-alpha1 (amd64), libbeat 7.0.0-alpha1 [b007837 built 2018-11-19 13:39:59 +0000 UTC]
```

Fixes: #8384

* Add Dedot for Kubernetes labels and annotations

* Add dedot options in libbeat kubernetes metadata

* Update changelog

* Refactor TestGenerateMapStrFromEvent

* Update shared-autodiscover.asciidoc with dedot params

* Add names for each unit test case in event_test.go

* Fix rebase errors
DStape pushed a commit to DStape/beats that referenced this pull request Aug 20, 2019
* Never default to a qualifier when none of them are set. (elastic#9148)

Remove default version qualifier and rename the environment variable to set it from `BEAT_VERSION_QUALIFIER` to `VERSION_QUALIFIER` this will align with other parts of the stack.

**Tested with filebeat.**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:39:01]
filebeat version 7.0.0 (amd64), libbeat 7.0.0 [0a0c267 built 2018-11-19 13:38:15 +0000 UTC]
```

**Without the patch**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:40:07]
filebeat version 7.0.0-alpha1 (amd64), libbeat 7.0.0-alpha1 [b007837 built 2018-11-19 13:39:59 +0000 UTC]
```

Fixes: elastic#8384

* Add DeDot in add_docker_metadata processor

* Add dedot into config and default to be false

* Update changelog and documentation

* Add documentation into processors-using.asciidoc

* Run mage fmt update under x-pack filebeat

* Run mage fmt update on x-pack metricbeat

* Run update again

* Run make update fmt from top level dir

* Remove mistakes from rebase

* Remove repeated doc
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.

3 participants