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

RFC: manifest file #1338

Merged
merged 6 commits into from
Jul 21, 2023
Merged

RFC: manifest file #1338

merged 6 commits into from
Jul 21, 2023

Conversation

cbeauchesne
Copy link
Collaborator

This PR will be used for the very first iteration of manifest file.

The goal is to provide a alternative way to declare versions, using one file per components.

@cbeauchesne cbeauchesne changed the title RFC for manifest file RFC: manifest file Jul 3, 2023
@cbeauchesne cbeauchesne force-pushed the cbeauchesne/rfc-manifest branch 3 times, most recently from 57170b4 to daf41ef Compare July 7, 2023 13:11
@cbeauchesne cbeauchesne force-pushed the cbeauchesne/rfc-manifest branch from daf41ef to ad12991 Compare July 10, 2023 10:02
Copy link
Member

@smola smola left a comment

Choose a reason for hiding this comment

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

The idea sounds good, however:

  • I think that without proper tooling to validate these files, things may get worse. So let's keep an eye on tooling that helps getting things right, and not committing wrong manifests.
  • Having different ways to declare file-level and class-level (manifest file) and test-level (in code) sounds a bit like keeping some of the bad things of both worlds?

test_distributed.py:
Test_FeatureA: v1.14 # declare a version for a class

Test_FeatureB: flaky # skip a class with bug, flaky, irrelevant ...
Copy link
Member

Choose a reason for hiding this comment

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

No version qualifier for bug/missing_feature, etc?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think that without proper tooling to validate these files, things may get worse. So let's keep an eye on tooling that helps getting things right, and not committing wrong manifests.

-> f09d34c

Having different ways to declare file-level and class-level (manifest file) and test-level (in code) sounds a bit like keeping some of the bad things of both worlds?

It's a compromise. The main issue with tests methods is that their names change a lot. Every time you change a test method name, you'll need to update all manifest files, spamming all teams. Lot of people complain already about being over notified by system tests. And as you can only have one declaration per component at method level, conflict is more managable.

Actually, I even hesitated to only allow version declaration in the manifest (no bug, flaky....). But as it did not complexify the data model, I thought it was a good middle point.


## Supported features

Will suport:
Copy link
Member

Choose a reason for hiding this comment

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

IMHO this should land together with a script that:

  • Checks if manifest files are in sync with tests (e.g. not referencing missing classes).
  • Ideally, also a way to add missing entries based on tests (or a way to list tests disabled for a language).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

-> f09d34c

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

or a way to list tests disabled for a language

It's the dashboard job :)

@pawelchcki pawelchcki requested a review from katiehockman July 11, 2023 09:31
@simon-id
Copy link
Member

Is file level skipping a good idea ? the problem imo is that you might and up skipping test classes that are written after the file is skipped. If we skip classes individually instead of whole files, at least we have a chance to notice new tests in XPASS results for example.

Copy link
Member

@simon-id simon-id left a comment

Choose a reason for hiding this comment

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

Amazing! and just in case you didn't know @Hellzy worked on an implementation of that for innovation week.

@cbeauchesne
Copy link
Collaborator Author

Is file level skipping a good idea ? the problem imo is that you might and up skipping test classes that are written after the file is skipped. If we skip classes individually instead of whole files, at least we have a chance to notice new tests in XPASS results for example.

Great power, great responsabilities :) The use case for that is C++ that does not have any ASM feature, and I would be please if can avoid this ugly skip:

if context.library == "cpp":
    pytestmark = pytest.mark.skip("not relevant")

But I agree, it should not be used with bug or missing_feature. We can either limit the usage for file to irrelevant with the format, or trust that it won't happen. WDYT is best ?

@cbeauchesne
Copy link
Collaborator Author

Amazing! and just in case you didn't know @Hellzy worked on an implementation of that for innovation week.

It's actually the continuation of its work (but I chose a different implementation, using the capacity of pytest to skip tests on the fly)

"type": "object",
"patternProperties": {
"Test_.+": {
"$comment": "It can be a version number, a skip reason, or an object with weblog variant as keys",
Copy link
Member

Choose a reason for hiding this comment

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

Is this comment field for each language team to write, for example, "this test is skipped until PR #123 is released", or for the test file declaration?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

in json-schema, $comment means a comment in the schema itself (as JSON does not allow comments).

The way to add a comment will be something like :

Test_Feature: bug (JIRA-666)

Pro :

- Will solve the majority of conflict during test activation PRs
- each team will have ownership of its manifest file, easing the PR preview process
Copy link
Member

Choose a reason for hiding this comment

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

I'm thinking we just avoid renaming tests mostly, and update comments instead to better reflect test changes if needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, as folders and test class names are the identifier of features, renaming are rare, so it's why I think it's acceptable.

@cbeauchesne cbeauchesne marked this pull request as ready for review July 21, 2023 09:28
@cbeauchesne cbeauchesne requested a review from a team as a code owner July 21, 2023 09:28
@cbeauchesne cbeauchesne merged commit a9ffc10 into main Jul 21, 2023
@cbeauchesne cbeauchesne deleted the cbeauchesne/rfc-manifest branch July 21, 2023 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants