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

[packages] Migrate @kbn/test to Bazel #103122

Merged
merged 28 commits into from
Jun 30, 2021
Merged

[packages] Migrate @kbn/test to Bazel #103122

merged 28 commits into from
Jun 30, 2021

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Jun 23, 2021

One step forward on #69706

That PR moves the @kbn/test into Bazel by pushing a BUILD file for that package.
After merging this the package will be consumed from within bazel-bin folder.

@jbudz jbudz added Team:Operations Team label for Operations Team v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jun 23, 2021
@jbudz jbudz requested a review from a team as a code owner June 23, 2021 15:58
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@jbudz
Copy link
Member Author

jbudz commented Jun 24, 2021

@spalger I'm a little out of my depth here - type check failures are due to conflicting types between mocha and jest. @mistic mentioned you may have some ideas - I see some references to fake mocha types already. Do you have any background info on this?

Partial snippet:

      packages/kbn-test/src/functional_test_runner/functional_test_runner.ts:66:48 - error TS2345: Argument of type 'Mocha.Suite' is not assignable to parameter of type 'import("/home/jon/dev/kibana/packages/kbn
-test/src/functional_test_runner/fake_mocha_types").Suite'.                                                                                                                                                        
                                                                                                                                                                                                                   
      66       await this.lifecycle.beforeTests.trigger(mocha.suite);                                                                                                                                              
                                                        ~~~~~~~~~~~                                                                                                                                                
                                                                                                                                                                                                                   
      packages/kbn-test/src/functional_test_runner/functional_test_runner.ts:69:45 - error TS2345: Argument of type 'Mocha' is not assignable to parameter of type 'import("/home/jon/dev/kibana/packages/kbn-test/
src/functional_test_runner/fake_mocha_types").Mocha'.                                                                                                                                                              
        The types of 'run(...).failures' are incompatible between these types.                                                                                                                                     
          Type 'number' is not assignable to type 'any[]'.                                                                                                                                                         
                                                                                                                                                                                                                   
      69       return await runTests(this.lifecycle, mocha);                                                                                                                                                       
                                                     ~~~~~                                                                                                                                                         
                                                                                                                                                                                                                   
      packages/kbn-test/src/functional_test_runner/functional_test_runner.ts:102:31 - error TS2345: Argument of type 'Mocha.Suite' is not assignable to parameter of type 'import("/home/jon/dev/kibana/packages/kb
n-test/src/functional_test_runner/fake_mocha_types").Suite'.                                                                                                                                                       
        Property 'suiteTag' is missing in type 'Mocha.Suite' but required in type 'import("/home/jon/dev/kibana/packages/kbn-test/src/functional_test_runner/fake_mocha_types").Suite'.                            
                                                                                                                                                                                                                   
      102         testCount: countTests(mocha.suite),  

@@ -1,24 +1,17 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"incremental": false,
"allowJs": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

@jbudz I think this is the cause of the issues, several JS files are used here to avoid types from mocha and jest from both being loaded.

@jbudz jbudz requested review from a team as code owners June 28, 2021 18:01
@mistic
Copy link
Member

mistic commented Jun 28, 2021

@elasticmachine merge upstream

@mistic
Copy link
Member

mistic commented Jun 29, 2021

@elasticmachine merge upstream

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Stack Management changes LGTM (import path changed in snapshot_policy_actions.ts)

@tylersmalley
Copy link
Contributor

tylersmalley commented Jun 29, 2021

I verified the junit report is being generated now.

@jbudz
Copy link
Member Author

jbudz commented Jun 29, 2021

@elasticmachine merge upstream

@jbudz
Copy link
Member Author

jbudz commented Jun 29, 2021

retest

@jbudz jbudz requested a review from mistic June 29, 2021 19:35
@jbudz jbudz enabled auto-merge (squash) June 29, 2021 19:36
Copy link
Member

@mistic mistic left a comment

Choose a reason for hiding this comment

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

LGTM

@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

1 similar comment
@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@jbudz
Copy link
Member Author

jbudz commented Jun 29, 2021

retest

@jbudz
Copy link
Member Author

jbudz commented Jun 29, 2021

@elasticmachine run elasticsearch-ci/docs

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@jbudz jbudz merged commit bed5b6d into elastic:master Jun 30, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 30, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 30, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
@mistic mistic mentioned this pull request Jul 1, 2021
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants