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

sync: If a test case was added that reimplements another case, print the reimplemented UUID as well #61

Open
cmccandless opened this issue Oct 20, 2020 · 6 comments
Labels
cmd: sync kind: feature User-facing enhancement

Comments

@cmccandless
Copy link

cmccandless commented Oct 20, 2020

Related to #44

For this example, assume that the grains case 10f45584-2fc3-4875-8ec6-666065d1163b reimplements another case b4bacc5a-3c12-43b6-ab17-d5ec78d70a15

As of configlet 4.0.0-beta.5:

$ configlet sync --tests --verbosity=detailed
[...]
[warn] grains: missing 2 test cases
       - grains on square 3 (10f45584-2fc3-4875-8ec6-666065d1163b)

Proposed

Put reimplemented case description and UUID on following line (for human readability)

$ configlet sync --tests --verbosity=detailed
[...]
[warn] grains: missing 2 test cases
       - grains on square 3 (10f45584-2fc3-4875-8ec6-666065d1163b)
         - reimplements: square 3 grains (b4bacc5a-3c12-43b6-ab17-d5ec78d70a15)

Alternative notation

Put reimplemented case UUID on same line (simpler to parse for scripts)

$ configlet sync --tests --verbosity=detailed
[...]
[warn] grains: missing 2 test cases
       - grains on square 3 (10f45584-2fc3-4875-8ec6-666065d1163b -> b4bacc5a-3c12-43b6-ab17-d5ec78d70a15)
@ErikSchierboom
Copy link
Member

Put reimplemented case UUID on same line (simpler to parse for scripts)

IMHO we should optimize this for readability, not for the parsing by scripts. If it turns out that is something people want to do, we should perhaps look at a JSON output option.

@cmccandless
Copy link
Author

My personal use-case for scripting: I want to create an automated workflow that does the following nightly:

  1. Scans for missing test cases
  2. For each missing case, create a PR that includes that case and runs the track's test generator

@ee7
Copy link
Member

ee7 commented Oct 21, 2020

If a test case was added that reimplements another case, print the reimplemented UUID as well

Good idea.

we should perhaps look at a JSON output option.

I agree - I don't think people should consider the --check output as stable enough to parse, at least right now.

I want to create an automated workflow that does the following nightly

It'd be great if we can support this kind of workflow.

@ErikSchierboom
Copy link
Member

@cmccandless Could you open an issue for that?

@ErikSchierboom
Copy link
Member

I've tried output several notations

Option 1:

[warn] grains: missing 2 test cases
       - grains on square 3 (10f45584-2fc3-4875-8ec6-666065d1163b)
         - reimplements: square 3 grains (b4bacc5a-3c12-43b6-ab17-d5ec78d70a15)

Option 2:

[warn] grains: missing 2 test cases
       - grains on square 3 (10f45584-2fc3-4875-8ec6-666065d1163b) (reimplements b4bacc5a-3c12-43b6-ab17-d5ec78d70a15)

Option 3:

[warn] grains: missing 2 test cases
       - grains on square 3 (uuid: 10f45584-2fc3-4875-8ec6-666065d1163b, reimplements: b4bacc5a-3c12-43b6-ab17-d5ec78d70a15)

I'm sure we could come up with other variants. @ee7 @cmccandless what would be your preference?

@cmccandless
Copy link
Author

1 or 2 would be my preference

@ee7 ee7 changed the title If a test case was added that reimplements another case, print the reimplemented UUID as well sync: If a test case was added that reimplements another case, print the reimplemented UUID as well May 9, 2021
@ee7 ee7 added cmd: sync kind: feature User-facing enhancement labels May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd: sync kind: feature User-facing enhancement
Projects
None yet
Development

No branches or pull requests

3 participants