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

[Code] bundle git repo for functional test #44547

Merged
merged 2 commits into from
Sep 6, 2019
Merged

[Code] bundle git repo for functional test #44547

merged 2 commits into from
Sep 6, 2019

Conversation

mw-ding
Copy link
Contributor

@mw-ding mw-ding commented Aug 30, 2019

Summary

Currently, Code functional tests rely on importing github repositories on the fly to clone the git repository as the source of truth. This external dependency could potentially result in some flakiness to the functional tests. In this PR, we bundled zipped git bare repositories into the kibana source code and extract these repos to the right code data path instead of cloning from github.com.

https://github.com/elastic/code/issues/1605

Regarding the runtime installation path of kibana, we can integrate with @spalger 's draft PR #44552 to make it more reasonable.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@elasticmachine
Copy link
Contributor

Pinging @elastic/code

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@mw-ding mw-ding requested review from spalger and zfy0701 September 4, 2019 22:44
@mw-ding mw-ding marked this pull request as ready for review September 4, 2019 22:44
@mw-ding mw-ding added release_note:skip Skip the PR/issue when compiling release notes v7.5.0 v8.0.0 labels Sep 4, 2019
@@ -21,5 +21,5 @@ export { withProcRunner } from './proc_runner';
export { ToolingLog, ToolingLogTextWriter, pickLevelFromFlags } from './tooling_log';
export { createAbsolutePathSerializer } from './serializers';
export { CA_CERT_PATH, ES_KEY_PATH, ES_CERT_PATH } from './certs';
export { run, createFailError, createFlagError, combineErrors, isFailError } from './run';
export { run, createFailError, createFlagError, combineErrors, isFailError, Flags } from './run';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@spalger I just merged your PR (#44552) into this PR. Please take a look.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

Looking great, #44552 will be in shortly, then we can rebase this and I'd like to take another look (please re-request review).

};

const repoDir = (repoUri: string, kibanaDir: string) => {
return `${kibanaDir}/data/code/repos/${repoUri}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use path.resolve() here and in workspaceDir()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

import fs from 'fs';
import mkdirp from 'mkdirp';
import path from 'path';
import rimraf from 'rimraf';
Copy link
Contributor

Choose a reason for hiding this comment

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

I usually use del because it does the same thing and supports promises.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@mw-ding mw-ding requested a review from spalger September 5, 2019 21:18
@elasticmachine
Copy link
Contributor

💔 Build Failed

@mw-ding
Copy link
Contributor Author

mw-ding commented Sep 6, 2019

@spalger this should be good by now. can you take a second look?

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

Couple minor nits, but LGTM


await retry.tryForTime(300000, async () => {
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Extra block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just trying to differentiate 2 minor steps in this test case , which helps to be eyeballed.


await login(codeUser);
await retry.tryForTime(5000, async () => {
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Weird block

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants