Skip to content

Fix metricbeat generator test to use mage test#18086

Merged
blakerouse merged 4 commits intoelastic:masterfrom
blakerouse:fix-generator-test-3
May 4, 2020
Merged

Fix metricbeat generator test to use mage test#18086
blakerouse merged 4 commits intoelastic:masterfrom
blakerouse:fix-generator-test-3

Conversation

@blakerouse
Copy link
Copy Markdown
Contributor

@blakerouse blakerouse commented Apr 29, 2020

What does this PR do?

Updates the generated custom metricbeat to use mage test instead of make unit.

Why is it important?

So the generator tests pass.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

@blakerouse blakerouse added bug Team:Platforms Label for the Integrations - Platforms team labels Apr 29, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/integrations-platforms (Team:Platforms)

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 29, 2020
@blakerouse blakerouse removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 29, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Apr 29, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

Steps errors

Expand to view the steps failures

  • Name: Make -C generator/_templates/metricbeat test

    • Description: make -C generator/_templates/metricbeat test

    • Result: FAILURE

    • Duration: 1 min 57 sec<

    • Start Time: 2020-05-04T14:55:12.071+0000

  • Name: Make -C generator/_templates/beat test

    • Description: make -C generator/_templates/beat test

    • Result: FAILURE

    • Duration: 1 min 53 sec<

    • Start Time: 2020-05-04T14:58:46.891+0000

  • Name: Make -C generator/_templates/metricbeat test

    • Description: make -C generator/_templates/metricbeat test

    • Result: FAILURE

    • Duration: 1 min 18 sec<

    • Start Time: 2020-05-04T15:12:44.341+0000

  • Name: Make -C generator/_templates/beat test

    • Description: make -C generator/_templates/beat test

    • Result: FAILURE

    • Duration: 6 min 39 sec<

    • Start Time: 2020-05-04T15:29:59.791+0000

@blakerouse
Copy link
Copy Markdown
Contributor Author

Got it further but it seems to be breaking on building the packaging now. With _meta/kibana.generated not being found.

@blakerouse
Copy link
Copy Markdown
Contributor Author

run beats-ci/package

@jsoriano
Copy link
Copy Markdown
Member

Got it further but it seems to be breaking on building the packaging now. With _meta/kibana.generated not being found.

Maybe generators magefiles need to use PackageKibanaDashboardsFromBuildDir now?

@andrewkroh
Copy link
Copy Markdown
Member

run tests

@andrewkroh
Copy link
Copy Markdown
Member

It looks like we are dealing with two separate failures. We merged one change that broke the generators and then while it was broken merged another change that caused a new failure.

I think @jsoriano is correct, that PackageKibanaDashboardsFromBuildDir is needed because the dashboards are generated by mage which puts them into build/ dir instead of _meta/kibana.generated (where Make used to put them).

The other failure has something to with the k8s dependencies in the go.mod / go.sum of the "new beat". The error I'm seeing looks like it's getting the wrong version of k8s.io/apimachinery?

# k8s.io/client-go/tools/clientcmd/api/v1
../../../pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/clientcmd/api/v1/conversion.go:29:15: scheme.AddConversionFuncs undefined (type *runtime.Scheme has no field or method AddConversionFuncs)
../../../pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/clientcmd/api/v1/conversion.go:31:12: s.DefaultConvert undefined (type conversion.Scope has no field or method DefaultConvert)
../../../pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/clientcmd/api/v1/conversion.go:34:12: s.DefaultConvert undefined (type conversion.Scope has no field or method DefaultConvert)
../../../pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/clientcmd/api/v1/conversion.go:37:12: s.DefaultConvert undefined (type conversion.Scope has no field or method DefaultConvert)
../../../pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/clientcmd/api/v1/conversion.go:40:12: s.DefaultConvert undefined (type conversion.Scope has no field or method DefaultConvert)
../../../pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/clientcmd/api/v1/conversion.go:43:12: s.DefaultConvert undefined (type conversion.Scope has no field or method DefaultConvert)
../../../pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/clientcmd/api/v1/conversion.go:46:12: s.DefaultConvert undefined (type conversion.Scope has no field or method DefaultConvert)
../../../pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/clientcmd/api/v1/conversion.go:49:12: s.DefaultConvert undefined (type conversion.Scope has no field or method DefaultConvert)
../../../pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/clientcmd/api/v1/conversion.go:52:12: s.DefaultConvert undefined (type conversion.Scope has no field or method DefaultConvert)

@blakerouse blakerouse force-pushed the fix-generator-test-3 branch from f2af20f to 3a109a5 Compare May 4, 2020 19:08
Copy link
Copy Markdown
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.

LGTM

@blakerouse blakerouse changed the title Fix metricbeat generator test to use make unit-test Fix metricbeat generator test to use mage test May 4, 2020
@blakerouse blakerouse marked this pull request as ready for review May 4, 2020 20:54
@blakerouse blakerouse merged commit 9e7321a into elastic:master May 4, 2020
@blakerouse blakerouse deleted the fix-generator-test-3 branch May 4, 2020 20:55
blakerouse added a commit to blakerouse/beats that referenced this pull request May 4, 2020
* Use mage unit-test.

* Should be make.

* Update mage test.

* Add PackageKibanaDashboardsFromBuildDir.

(cherry picked from commit 9e7321a)
blakerouse added a commit that referenced this pull request May 5, 2020
* Use mage unit-test.

* Should be make.

* Update mage test.

* Add PackageKibanaDashboardsFromBuildDir.

(cherry picked from commit 9e7321a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Team:Platforms Label for the Integrations - Platforms team v7.8.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants