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

Add storage for TestSuitesSource #958

Merged
merged 71 commits into from
Aug 3, 2022
Merged

Conversation

nulls
Copy link
Member

@nulls nulls commented Jul 22, 2022

  • storage for test suites source
  • combined standard and git test suites

@nulls nulls self-assigned this Jul 22, 2022
@nulls nulls force-pushed the feature/test-suites-source-storage branch from 32282a0 to b440965 Compare July 22, 2022 15:20
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 72 potential problems in the proposed changes. Check the Files changed tab for more details.

@nulls nulls force-pushed the feature/test-suites-source-storage branch from b440965 to 3900d23 Compare July 22, 2022 16:07
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 71 potential problems in the proposed changes. Check the Files changed tab for more details.

@nulls nulls force-pushed the feature/test-suites-source-storage branch from 3900d23 to e54f8b6 Compare July 24, 2022 01:55
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 71 potential problems in the proposed changes. Check the Files changed tab for more details.

@nulls nulls force-pushed the feature/test-suites-source-storage branch from e54f8b6 to a78ce7e Compare July 25, 2022 09:42
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 71 potential problems in the proposed changes. Check the Files changed tab for more details.

@nulls nulls force-pushed the feature/test-suites-source-storage branch from a78ce7e to 0831e19 Compare July 25, 2022 11:24
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 83 potential problems in the proposed changes. Check the Files changed tab for more details.

@nulls nulls force-pushed the feature/test-suites-source-storage branch from 0831e19 to 4201bce Compare July 25, 2022 15:51
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 81 potential problems in the proposed changes. Check the Files changed tab for more details.

@nulls nulls force-pushed the feature/test-suites-source-storage branch from 88fa215 to 4e00cf8 Compare July 26, 2022 10:29
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 81 potential problems in the proposed changes. Check the Files changed tab for more details.

@orchestr7
Copy link
Member

lgtm. No chance that we can properly review this PR, so probably we need to merge it

@orchestr7
Copy link
Member

Overview

Introduced a new entity TestSuitesSource. It's a source to fetch and detect test suites and tests. TestSuitesSource describes only where tests are placed A snapshot of TestSuitesSource is a zip archive of files are pulled from source with some specific version.

So, TestSuitesSource is git credentials (Git entity) + branch + relative path in repo. Version is sha1 or hash commit in git repository.

We store snapshots on backend side (it saves them to file system), it will be moved to S3 in future.

The main goal of this task is to add storage for TestSutiesSource: we split fetching test suites with files and run them. Currently, the UI is not changed -- user still can choice standard tests suites or provide git url for personal tests.

For seamless transition, we create TestSuitesSource on the fly. User inputs git-url, git-branch and testRootPath and we search source with such values or create a new one (the same approach for standard test suites, values are hardcoded)

How run looks now:

Standard test suites

They still fetch periodically by preprocessor. We detect test suites and save them in backend + save snapshot of repository

When user runs a new run on standard test suites, we take the latest available version on backend (max by creation time of commit) and run common run using this version

Git test suites

User can input branch or commit\hash\sha1. If user inputs branch, we search or create a new test source for it and then detect a latest commit in git repository. Then we fetch test suites for this version and then trigger a common run using this version If user inputs version, we fetch test suites for this version and then trigger a common run using this version

Common run

We put selected testSuiteIds on execution and execute tests for them (create TestExecution), then initialize agent. Orchestrator downloads additional files (binary for evaluated tools) + test suites sources to a tmp folder. Then orchestrator creates volume using this folder.

Orchestrator download logic

Orchestrator create a tmp directory in format /save-execution-{id}. Then create a sub folder '/save-execution-{id}/test-suites' and download additional files there. Orchestrator download all test suites source snapshot to folder with name in format /save-execution-{id}/test-suites/test-suites-source-{index} (index can be changed to test suites source id in future to simplify debugging). Then orchestrator creates a synthecit toml config in /save-execution-{id}/test-suites/save.toml and run save cli with parameter --include-suites

This should be in some developer's readme 😄
Or inside the code - for example as a Kdoc to some of your classes

@nulls nulls closed this Aug 2, 2022
@nulls nulls reopened this Aug 2, 2022
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 11 potential problems in the proposed changes. Check the Files changed tab for more details.

@nulls nulls enabled auto-merge (squash) August 3, 2022 13:32
@nulls nulls merged commit cec6c76 into master Aug 3, 2022
@nulls nulls deleted the feature/test-suites-source-storage branch August 3, 2022 15:07
petertrr added a commit that referenced this pull request Aug 4, 2022
…e used (#996)

After #958 this property is no more used; orchestrator doesn't need a shared mount with preprocessor anymore

* Remove property
* Remove mount in Docker
* Remove mount in k8s; preprocessor and orchestrator probably can run on different nodes now!
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.

6 participants