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

Update ocpaths.proto with releases and yang version #3545

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

arista-allan
Copy link

Add a richer definition of a release identifier via new message, which has the original timestamp,
but adds an optional version number, which is typically how they are formally identified, plus an
optional moniker, which is how they are sometimes informally identified.

Add to ocpath three optional release identifiers: one for origination (the release when a path became
available from a vendor), one for deprecation (the release when a path is deprecated by a vendor),
and one for removal (when a path is no longer supported by a vendor).

Add to ocpath an optional yangModelVersion, which is typically the public YANG model version when
a path appears in a model, typically an OpenConfig consortium model - this is vendor independent.

Add definition of Release as a timestamp plus two optionals
Add to ocpath: 
  origination, deprecation, removal
  yangModelVersion
Update ocpaths.proto with releases and yang version
@arista-allan arista-allan requested a review from a team as a code owner October 28, 2024 21:35
Copy link

google-cla bot commented Oct 28, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@OpenConfigBot
Copy link

OpenConfigBot commented Oct 28, 2024

Pull Request Functional Test Report for #3545 / 1d9ac4a

No tests identified for validation.

Help

@dplore dplore self-assigned this Oct 28, 2024
@coveralls
Copy link

coveralls commented Oct 29, 2024

Pull Request Test Coverage Report for Build 11583791684

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 55.268%

Totals Coverage Status
Change from base Build 11582679859: 0.0%
Covered Lines: 1983
Relevant Lines: 3588

💛 - Coveralls

Copy link
Contributor

@LimeHat LimeHat left a comment

Choose a reason for hiding this comment

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

In general, it would be good to hear more on the motivation for these changes.

A concern I have is that the concept of nosimage.proto moves from a snapshot of supported features in a given release/platform combo to an abstract, database-like mechanism that keeps track of history of changes, some of which are not even related to vendor changes.

// not mutually exclusive with deprecation.
optional Release removal = 8;

// the YANG model version that first defined this path. this is typically
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any value in tracking this for each vendor/sw/hw release? looks like vendors will need to maintain a database with such information in order export it..?

or is the expectation that the data will be provided by OC community and not used by vendors?

Copy link
Author

Choose a reason for hiding this comment

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

Not the OC community - this is vendor-specific. I'll update the comments to make this clear.
That database would be the NOS images from previous releases. External logic would walk those
NOS images and calculate any origination/deprecation/removal dates to populate the current NOS
image. As a vendor, it is fairly common for our customers to ask for this information. But it is marked
as optional (I saw your later comment on this - I'll comment there) as a reminder that a vendor can
release a NOS image without this information.

Copy link
Contributor

@LimeHat LimeHat Oct 30, 2024

Choose a reason for hiding this comment

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

Not the OC community - this is vendor-specific.

// the YANG model version that first defined this path.

In that case perhaps I don't understand how the "yang model version" is defined. We, as a vendor, don't have any additional versioning of OC models. Or perhaps you're talking about your PR in general but not about the specific field?
That question is related to the field only (unfortunately I quoted the first line of the comment which didn't produce a nice preview). As for the overall PR reasoning, I left a comment above.

Copy link
Author

Choose a reason for hiding this comment

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

that yangModelVersion typically identifies the OpenConfig consortium model that defines this leaf.

Copy link
Contributor

Choose a reason for hiding this comment

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

that yangModelVersion typically identifies the OpenConfig consortium model that defines this leaf.

That brings me back to the original question: what is the value of tracking it per vendor/platform? :-)

Copy link
Author

Choose a reason for hiding this comment

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

tracking this was a specific requirement handed to us by G

Copy link
Contributor

Choose a reason for hiding this comment

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

@dplore would you be able to provide context?

proto/ocpaths.proto Outdated Show resolved Hide resolved
proto/ocpaths.proto Outdated Show resolved Hide resolved
proto/ocpaths.proto Outdated Show resolved Hide resolved
Comment on lines +35 to +40
// the optional version of the release, typically numbers and dots.
optional string version = 2;

// the optional moniker (nickname) for the release
optional string name = 3;
}
Copy link
Contributor

@LimeHat LimeHat Oct 29, 2024

Choose a reason for hiding this comment

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

// Vendor network operating system version.
// This should match the output of the OpenConfig Path
// /system/state/software-version.
string software_version = 3;

there are no nicknames for releases in nosimage.proto; also slightly different definition of the version field.

Copy link
Author

Choose a reason for hiding this comment

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

Good point. The concept of the release triplet was not spread around to the rest of the
schema. You could rightly make the point that it should be. I have some reviewers coming
from G that I'll ask about that. Thanks for raising.

Copy link
Author

Choose a reason for hiding this comment

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

per comments, this does have a constraint on the value to match /system/state/software-version

google.protobuf.Timestamp date = 1;

// the optional version of the release, typically numbers and dots.
optional string version = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

in proto3 syntax there's no need to use optional syntax unless you need an explicit presence indicator for the field (any field can be omitted)

Copy link
Author

Choose a reason for hiding this comment

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

TIL. Thanks for pointing that out. Boy do I have mixed feelings about that.

As a general critique, its fine if every field is optional but then IMO there needs to be some way to specify required (singly or for multiple attributes) and mutual exclusion. Oh, well. I wasn't on the proto committee when it was designed. :-)

I wanted to show that a timestamp was required and that the other two might be there or not. Any way to do this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Usually, comments (or a separate README/API contract document) are used to indicate mandatory fields when there's a need. I think you already did that in the parent comment (above the message Release). I don't think there's a way to enforce it in the syntax.

Although I wouldn't necessarily agree that specifying a release date without a release version is a great idea :)

and mutual exclusion.

this can be done via oneof

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.

5 participants