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

Document re-evaluating existing robustness test reports #17733

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

serathius
Copy link
Member

@serathius serathius force-pushed the robustness-document-re-evaluate branch from de2768c to 0592de2 Compare April 8, 2024 08:12
Copy link
Contributor

@MadhavJivrajani MadhavJivrajani left a comment

Choose a reason for hiding this comment

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

Non-blocking comment but--
Feels a little odd to just have an empty testdata dir. Thoughts on using a ROBUSTNESS_TESTDATA env var instead so that folks don't have to bother with the copying? Or maybe both, defaulting the value of the env var to testdata, still feels odd but atleast we won't have the copying.

@serathius
Copy link
Member Author

Heh cannot use https://github.com/orgs/community/discussions/16925 because of failures in static analysis @jmhbnz

'markdown_marker' started at Mon Apr  8 08:14:18 UTC 2024
% 'marker' '--skip-http' '--allow-absolute-paths' '--root' '/home/runner/work/etcd/etcd' '-e' './CHANGELOG' '-e' './etcdctl' '-e' 'etcdutl' '-e' './tools'
FAIL: (code:1):
  % 'marker' '--skip-http' '--allow-absolute-paths' '--root' '/home/runner/work/etcd/etcd' '-e' './CHANGELOG' '-e' './etcdctl' '-e' 'etcdutl' '-e' './tools'
Found broken reference (!NOTE -> ) at /home/runner/work/etcd/etcd/tests/robustness/README.md:41
Found broken reference (!NOTE -> ) at /home/runner/work/etcd/etcd/tests/robustness/README.md:55
FAIL: 'run marker --skip-http --allow-absolute-paths --root /home/runner/work/etcd/etcd -e ./CHANGELOG -e ./etcdctl -e etcdutl -e ./tools' checking failed (!=0 return code)
FAIL: 'markdown_marker' FAILED at Mon Apr  8 08:14:18 UTC 2024
make: *** [Makefile:153: verify-markdown-marker] Error 255

@serathius serathius force-pushed the robustness-document-re-evaluate branch from 0592de2 to cdcf3de Compare April 8, 2024 08:28
@serathius
Copy link
Member Author

Non-blocking comment but-- Feels a little odd to just have an empty testdata dir.

The directory already exist, I just previously kept 1 report there for regression testing. Unfortunately it's hard maintain and use for testing performance (validation of report took locally 2 seconds on my local machine, and over 2 minutes on CI).

Thoughts on using a ROBUSTNESS_TESTDATA env var instead so that folks don't have to bother with the copying? Or maybe both, defaulting the value of the env var to testdata, still feels odd but atleast we won't have the copying.
pying.

Reproducing the CI failures that are main motivator for this documentation, not local tests. I just add them for completeness. I don't like idea of writing all reports to the testdata directory. It's normal to run tens or hundreds of runs to reproduce/validate some issue. We either always override the previous results (current approach) or create a separate report for each run which will overwhelm the directory. By default reports are stored in /tmp/ directory as they can be pretty large (100MB+) as they include both WAL and bbolt data files. We would quickly run out of disk space if not overriding previous reports.

@serathius
Copy link
Member Author

@MadhavJivrajani Could you check if the documentation is detailed enough for re-evaluating results from github CI?

Comment on lines +1 to +2
*
!.gitignore
Copy link
Member

Choose a reason for hiding this comment

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

Can we just ignore the tests/robustness/testdata directory in the top level .gitignore?

Copy link
Member Author

@serathius serathius Apr 8, 2024

Choose a reason for hiding this comment

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

I wanted to have the directory present, for that I need at least one file in it. Git doesn't stores information about directories, only about files. Proposed to have .gitignore.

Copy link
Contributor

@MadhavJivrajani MadhavJivrajani left a comment

Choose a reason for hiding this comment

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

Leaving a couple of comments based on what I noticed trying to follow the instructions.

tests/robustness/validate/validate_test.go Show resolved Hide resolved
Comment on lines +2 to +3
test-robustness-reports:
cd ./tests && go test ./robustness/validate -v --run TestDataReports
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this depends on setup to setup, but we should add in a toolchain directive in the go.mod under tests/: https://github.com/etcd-io/etcd/blob/main/tests/go.mod

Reason for this is similar to: golang/go#62278

And I had to add this directive to make it work since go will try to download the toolchain that is specified by the go directive of the go.mod in the directory you're running in. It will take the go directive if the toolchain is missing. So we probably need to do something similar to what was done in the go.mod at the root.

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't understand what you are proposing. If you want to propose to add toolchain directive, please file an issue. Don't think we should block this PR on this.

Copy link
Contributor

Choose a reason for hiding this comment

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

What I mean is if I run the code here following the instructions this is what I get:

❯ make test-robustness-reports
cd ./tests && go test ./robustness/validate -v --run TestDataReports
go: downloading go1.22 (darwin/amd64)
go: download go1.22 for darwin/amd64: toolchain not available
make: *** [test-robustness-reports] Error 1

and the above linked issue explains why.

Created a PR here @serathius: #17734

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you, I didn't know that the command could not work on some golang setups.

Copy link
Member

@jmhbnz jmhbnz Apr 9, 2024

Choose a reason for hiding this comment

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

Would an alternative be to do something like:

test-robustness-reports:
-	cd ./tests && go test ./robustness/validate -v --run TestDataReports
+	cd ./tests && GOTOOLCHAIN=$(cat ../.go-version) go test ./robustness/validate -v --run TestDataReports

We put a lot of effort removing a bunch of duplicated hardcoded versions in the main repo so we only had one main file to update when we bump go. Keen to try and keep that simplicity if possible.

tests/robustness/README.md Outdated Show resolved Hide resolved
tests/robustness/README.md Show resolved Hide resolved
@serathius serathius mentioned this pull request Apr 8, 2024
@serathius serathius force-pushed the robustness-document-re-evaluate branch from cdcf3de to b2fe33a Compare April 8, 2024 12:22
@serathius
Copy link
Member Author

/retest

@serathius serathius force-pushed the robustness-document-re-evaluate branch from b2fe33a to c4751f2 Compare April 8, 2024 14:57
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
Copy link
Contributor

@MadhavJivrajani MadhavJivrajani left a comment

Choose a reason for hiding this comment

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

Thank you @serathius!

@siyuanfoundation
Copy link
Contributor

siyuanfoundation commented Apr 8, 2024

Non-blocking for this PR, but I think it would be nice to save the cluster and failpoint configurations for a report along side the report.

@jmhbnz
Copy link
Member

jmhbnz commented Apr 8, 2024

Heh cannot use https://github.com/orgs/community/discussions/16925 because of failures in static analysis @jmhbnz

Interesting find @serathius, this is the first time I have looked properly at the markdown_marker section of ./test.sh and we are actually using a rust crate here.

We might want to look at using a more golang native approach for how we do linting for markdown. We might also want to customize markdown linting rules to allow github flavored markdown as GitHub do things outside of the standard markdown spec.

@serathius
Copy link
Member Author

Non-blocking for this PR, but I think it would be nice to save the cluster and failpoint configurations for a report along side the report.

Right, that definitely be useful, but I would wait until the API stabilizes more.

@serathius serathius merged commit 65ac859 into etcd-io:main Apr 9, 2024
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants