-
Notifications
You must be signed in to change notification settings - Fork 33
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
FR: history explorer for looking at old runs #224
Comments
Yeah, the history features in stestr at this point is just what testr gave us, which was never much. My intent when I forked from testr was to expand it and leverage all the features that subunit2sql provided for doing this (which is why the experimental subunit2sql backend is there). I just got side tracked and never firmed up the subunit2sql support so I never made any further progress on this. You probably could leverage this a bit today by using That being said I'm definitely in favor of doing something like this, and I think the 3 use cases you've outlined are a good starting point to start discussing what this should look like and how we go about writing it. I also think we should decouple it's implementation from the subunit2sql backend (because there is still work to do on the subunit2sql side around generating an output subunit stream from the DB with attachments) which might double the future work, but at least will enable us to move forward on this. |
As an aside one thing you bring up is in the second example is that right now we don't track sha1 or anything from git at all. It would be cool as a simple starting point to add initial support for tracking git sha1s at |
Cool, thanks. Yes it should definitely be independent of the backend if possible. @mtreinish commented on February 26, 2019 7:29 PM:
Yes, this is a problem. One simple solution (or at least way to dodge the issue) would just be to append |
This commit adds repository APIs around storing and accessing run metadata strings. The concept being that you can store a metadata string to identify a run by some other identifier then the run id. The example use case in mind for this feature is using it to store a VCS commit hash (like a git sha1) or identifier. The APIs in this commit allow storing metadata at run creation time, accessing the metadata for a run, and finding run_ids by a metadata value. This is implemented for both the file and sql repository types. The memory repository type does not have this implemented, as it is more limited. Related to: #224
This commit adds repository APIs around storing and accessing run metadata strings. The concept being that you can store a metadata string to identify a run by some other identifier then the run id. The example use case in mind for this feature is using it to store a VCS commit hash (like a git sha1) or identifier. The APIs in this commit allow storing metadata at run creation time, accessing the metadata for a run, and finding run_ids by a metadata value. This is implemented for both the file and sql repository types. The memory repository type does not have this implemented, as it is more limited. Related to: #224
This commit adds repository APIs around storing and accessing run metadata strings. The concept being that you can store a metadata string to identify a run by some other identifier then the run id. The example use case in mind for this feature is using it to store a VCS commit hash (like a git sha1) or identifier. The APIs in this commit allow storing metadata at run creation time, accessing the metadata for a run, and finding run_ids by a metadata value. This is implemented for both the file and sql repository types. The memory repository type does not have this implemented, as it is more limited. Related to: #224
This commit adds a new command to stestr, history. The history command is used for interacting with the history of results in the repository. Prior to this commit you could only interact with the most recent run in the repository via the last command, but anything older was just taking up disk space and never used. The history command to start has 3 subcommands, 'list', 'show', and 'remove'. List will generate a table of all the contents of the repository that will show the run id, the result of the run, when it started, how long it took, and optionally show any metadata for the run. Show will show a run in the repository, this is equivalent to 'stestr last', but takes an optional run id instead of just unconditionally showing the last run. Remove is used to remove runs from the repository, this is useful if you don't need the history anymore and want to clean up some disk space. Fixes #303 Starts #224
Just a heads up I got a start to this in #306. It doesn't do the VCS integration component yet (so I didn't mark this as fixing this issue), but it adds a |
Nice! Thanks for the update and hope you're well :-) |
This commit adds a new command to stestr, history. The history command is used for interacting with the history of results in the repository. Prior to this commit you could only interact with the most recent run in the repository via the last command, but anything older was just taking up disk space and never used. The history command to start has 3 subcommands, 'list', 'show', and 'remove'. List will generate a table of all the contents of the repository that will show the run id, the result of the run, when it started, how long it took, and optionally show any metadata for the run. Show will show a run in the repository, this is equivalent to 'stestr last', but takes an optional run id instead of just unconditionally showing the last run. Remove is used to remove runs from the repository, this is useful if you don't need the history anymore and want to clean up some disk space. Fixes #303 Starts #224
This commit adds a new command to stestr, history. The history command is used for interacting with the history of results in the repository. Prior to this commit you could only interact with the most recent run in the repository via the last command, but anything older was just taking up disk space and never used. The history command to start has 3 subcommands, 'list', 'show', and 'remove'. List will generate a table of all the contents of the repository that will show the run id, the result of the run, when it started, how long it took, and optionally show any metadata for the run. Show will show a run in the repository, this is equivalent to 'stestr last', but takes an optional run id instead of just unconditionally showing the last run. Remove is used to remove runs from the repository, this is useful if you don't need the history anymore and want to clean up some disk space. Fixes #303 Starts #224
This commit adds a new command to stestr, history. The history command is used for interacting with the history of results in the repository. Prior to this commit you could only interact with the most recent run in the repository via the last command, but anything older was just taking up disk space and never used. The history command to start has 3 subcommands, 'list', 'show', and 'remove'. List will generate a table of all the contents of the repository that will show the run id, the result of the run, when it started, how long it took, and optionally show any metadata for the run. Show will show a run in the repository, this is equivalent to 'stestr last', but takes an optional run id instead of just unconditionally showing the last run. Remove is used to remove runs from the repository, this is useful if you don't need the history anymore and want to clean up some disk space. Fixes #303 Starts #224
This commit adds a new command to stestr, history. The history command is used for interacting with the history of results in the repository. Prior to this commit you could only interact with the most recent run in the repository via the last command, but anything older was just taking up disk space and never used. The history command to start has 3 subcommands, 'list', 'show', and 'remove'. List will generate a table of all the contents of the repository that will show the run id, the result of the run, when it started, how long it took, and optionally show any metadata for the run. Show will show a run in the repository, this is equivalent to 'stestr last', but takes an optional run id instead of just unconditionally showing the last run. Remove is used to remove runs from the repository, this is useful if you don't need the history anymore and want to clean up some disk space. Fixes #303 Starts #224
Forgive me if I'm missing something here, but it seems that stestr goes to a fair bit of trouble to store old test runs in the file- or sqlite-backed database, but doesn't actually facilitate accessing that history in any way except
stestr last
for looking at the most recent run. Is that right? If so it would be really nice to have a new subcommand (e.g.stestr history
) for exploring old runs.Example user stories
As a developer who is trying to track down a heisenbug, I would like to be able to type something like
stestr history --failing=my.test.which.triggers.awkward.heisenbug
in order to obtain a list of all historical test runs where the heisenbug was triggered.As a developer who has made a mess and broken his local git branch, I would like to be able to find the exact time of the last run where all the tests passed, via something like
stestr history --passing --limit 1
, in order to use the git reflog to restore the code to that point.As a developer who is trying to pin down a strange issue stemming from the interaction of tests A and B, I would like to be able to simultaneously view in different terminals the test outputs from:
The text was updated successfully, but these errors were encountered: