-
Notifications
You must be signed in to change notification settings - Fork 149
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
Delete feature.textproto #2793
base: main
Are you sure you want to change the base?
Delete feature.textproto #2793
Conversation
Pull Request Test Coverage Report for Build 11813971511Details
💛 - Coveralls |
Personal opinion: The FeatureProfile is useful for explicitly identifying the branch points for features / subfeatures / sub-subfeatures etc, as well as providing metadata about each given Feature. This use is separable from whether or not the FeatureProfile is also used for tracking OC paths. |
I generally think it sounds less than ideal for the official mechanism for determining if a path is covered by a test is "parse the readme markdown, look for section X, parse the body of the section as yaml, marshal it into proto paths, and validate the paths exist". Regardless, the contents of feature.textproto is actively validated against OC models. The tooling around this would need to be removed if this is being deprecated: Lines 17 to 24 in 8856fd8
Lines 178 to 181 in 8856fd8
featureprofiles/.github/workflows/protobufs.yml Lines 87 to 123 in 8856fd8
And the validation code in |
It seems to me that test authors should document a subset of the total paths exercised in a test, as a way to indicate which paths are specific to the Feature (vs setting up context for the test). I believe there is no good way to know that programmatically, unless the author specifies it. It's also true that, in many cases, configuration of a Feature requires a set of paths which is greater than any one test might exercise. (example: BGP, counter-example: NTP) And, like tests, there is no good way to know programmatically which paths are essential to the Feature, unless they are specified by somebody who is an expert in the Feature. (If it were possible to say something simple like "Feature X requires all paths in this branch / model / whatever" then that might not be true, but that doesn't seem to be the case for many features today.) So, I think that a) we need feature.textproto to include a set of paths that are essential to the Feature, and b) we need a PR check to ensure that all paths in a README are also included in the feature.textproto for the Feature being tested. It's possible to use (b) to automatically add paths to feature.textproto, and perhaps thus auto-generate it. But if that's the only way that paths are populated in feature.textproto then it wouldn't necessarily possess the quality that I described in the 2nd paragraph. |
If the goal of featureprofiles is to document the set of paths that belongs to a feature, then that is necessarily manually curated. As Brandon pointed out I think an easier way to have a single SoT for features is to have a tool that parses the proposed YAML and auto-populates feature.textproto so that no tooling will break. A CI check can be created to make sure feature.textproto is kept up-to-date. So I think the right steps are 1. Decide where to store the manual SoT (source-of-truth) for feature paths, 2. Start creating them (e.g. README/YAML), 3. Start to auto-gen feature.textproto where the new SoT has been defined for feature paths. On the other hand, if the longer term proposal is rather to move the proto-format documentation of feature paths to a different place (metadata.textproto?), then we would still need to migrate such tooling, but I don't see a significant advantage to doing that because at the end of the day the difference is two proto files vs. one proto file. |
@wenovus proposal seems reasonable, with one caveat: if feature.textproto paths are populated by merging the paths from all subtending tests (e.g. READMEs) then it's unclear whether feature.textproto can be reliable as a Feature definition; feature.textproto would only be complete if the Feature has complete path coverage by subtending tests. I think you're correct to say that CI should verify that README paths are also in feature.textproto, and it's probably reasonable to say that missing paths should be auto-added to feature.textproto. But I would stop short of saying that feature.textproto is completely autogenerated. Rather, it should be seen as a curated list, with some human ownership. |
Following up on my previous comment, and proposing details in response to this:
|
Hmm thanks for pointing out the caveat, I agree with your analysis. If we want to manually curate the overall list of paths within a feature so that it's independent of whether test coverage is complete, then your revised proposal and its details makes sense to me. However, I want to see if I can challenge this: do we want to manually curate the overall list, or should it simply be the union of "intended Covered Paths" listed by all READMEs within a feature? Such that we implicitly have the following policy: "if a test is not defined, then its covered paths are not part of the featureprofile."? Doing this means we guarantee that each featureprofile path is mapped to a test, whether proposed or implemented. It also avoids the maintenance burden of having to manually maintain the overall list of feature paths -- only the covered paths in each constituent test needs to be maintained as proposed by OP. |
Thanks for your response @wenovus. First, I would assert that we do need a single list of mandatory paths for any given Feature, so that implementations (e.g. vendors) have a clear definition of compliance. Eventually that compliance may be described as "just pass all the tests", but that would be inadequate until we know that the tests are completely covering a Feature's paths. And how do we know that a Feature has all of its paths covered by Tests? Today, feature.textproto is that definition of coverage compliance. More specifically responding to your challenge, I would ask: what is the roadmap for Test coverage (Test development)? I think that the desired end-state is for a collection of subtending Tests to exercise all of the paths that are required to implement a Feature, but initially there are no tests... In my view, a human-curated feature.textproto might be used as a roadmap which indicates all of the paths that MUST be implemented for a Feature and SHOULD be covered by subtending Tests. If we adopt the policy that you described ("if a test is not defined, then its covered paths are not part of the featureprofile") then would we, instead, need to have all of those paths defined in a "roadmap README" for each Feature until they are included in specific test READMEs? That seems to be effectively the same as just documenting them in the feature.textproto in the first place. 🤓 |
Thanks @bensons, having feature.textproto partially manually-maintained in order to record paths in the roadmap makes sense to me. Having a roadmap README to maintain would create a similar maintenance burden until the roadmap README can be deleted. I think all my questions are addressed, so I'll let the author and other reviewers chime in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the discussions above are important -- but I'm not clear that these files are actually doing anything today (or are updated regularly!).
@dplore's proposal #2863 seems to give us a way to define paths that are required for a test that will be related to that test specifically. It is also closer to the test such that we can say "this test said it should cover path X but it doesn't!
more easily. So, Darren's proposed approach seems preferable to me.
Adding LGTM for that reason. 👍🏼
@dplore - this looks like can be merged. Any concerns with doing so? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if proto/feature.proto
should be removed as well (along with the related proto/feature_go_proto
and build rules for it)? If we remove all the feature.textproto entries, there are no users of feature.proto in this repo any longer.
This proposes to deprecate the feature.textproto files from this repository.
These files were intended to assert some list of paths that were convenient for people to refer to when describing some feature of a network device. These would in turn guide the organization of functional/ondatra tests to be created.
In practice, we document the intended OC paths to be tested in README. The feature.textprotos are sometimes maintained and other times not so they are not kept up to date. Having two places in the repository which are maintained by hand leads to problems with keeping things in sync.
A proposed step to aid in ensuring the OC paths specified in README are formatted properly and are valid is to use a YAML format embedded in the readme which could be automatically parsed and checked. See #2746 for an example work in progress.