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

cannier: implement parts (features, model, test set) #3930

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

dhiller
Copy link
Contributor

@dhiller dhiller commented Jan 30, 2025

What this PR does / why we need it:

Implements the code parts required for the CANNIER approach 1 .

Creates cannier subcommands required to execute:

  • extract
    • features - extracts the feature vector from the test code for a given test case
      • extraction code done
      • feature extraction fully implemented
    • testname - extracts the names for the changed ginkgo tests for a range of commits
  • generate
    • model - generates the random forest model from a set of test cases
  • host
    • model

Defines the format of the feature vector. Note: most of the values returned are mocked currently.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Creates the first command `cannier extract` that defines the interface
of the feature vector.

Nearly all of the values returned are mocked.

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
Adds retrieval of the ast.CallExpr that is the test
declaration by name.

Refactoring: moves outline generation into robots/pkg/ginkgo

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
initial approach to generate classification for test flakiness

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
also finding test file by test name now works

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
Signed-off-by: Daniel Hiller <dhiller@redhat.com>
We now have the commands:

* `generate model` - saves the model data to disk
* `generate classes`
* `host model` - takes a data file and serves the model

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
plan: create a GET handler that gives a statistical overview about the
model data, i.e.
* number of classes and their appearance
* min, max, average of each feature

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
Signed-off-by: Daniel Hiller <dhiller@redhat.com>
adds a handler for /stats that emits statistics for the model data.

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
Since we can't rely on the name alone we add support for finding tests
by test_id.

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
Signed-off-by: Daniel Hiller <dhiller@redhat.com>
Signed-off-by: Daniel Hiller <dhiller@redhat.com>
Signed-off-by: Daniel Hiller <dhiller@redhat.com>
Creates the required data we need for mapping tests towards file
changes.

This change holds an automatic expansion of a git repository inside
testdata so that we can unit test git operations.

Also updates the unit tests for blame.

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
Signed-off-by: Daniel Hiller <dhiller@redhat.com>
@kubevirt-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jan 30, 2025
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from dhiller. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants