Uh oh!
There was an error while loading. Please reload this page.
Netwcfg API - #46
Merged
Merged
Conversation
johnbelamaric
commented
Jun 12, 2023
Member
There seem to be some other commits mixed in. What's the new part, is it possible to split out that? The networks CRD for example we already have, also those "cond" changes look familiar, I think they are already merged. |
henderiw
commented
Jun 13, 2023
ContributorAuthor
this is new.
|
johnbelamaric
commented
Jun 15, 2023
Member
/approve |
Contributor
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johnbelamaric The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
thc1006 added a commit
to thc1006/api-1
that referenced
this pull request
Aug 16, 2026
Unknown() is named, documented and reasoned as reporting an unknown state, but it returned metav1.ConditionFalse. Failed() a few lines below returns the same status, so the two were distinguishable only by their Reason, and a consumer switching on Status read "not known yet" as "definitely failed". metav1.ConditionUnknown exists for exactly the state this constructor names. The generated CRDs already advertise the third state. The manifests under config/crd/bases whose status is built from these packages carry status: description: status of the condition, one of True, False, Unknown. enum: ["True", "False", Unknown] so the published schema promises a tri-state that the one constructor meant to produce it could not emit. ConditionReasonUnknown was declared and used while metav1.ConditionUnknown appeared nowhere in either package. This is not a regression. infra/v1alpha1/condition.go was introduced by 3316d8b (nephio-project#23) on 2023-05-11 and the line has not been modified since; cfg/v1alpha1/condition.go is a later whole-file copy of it, added by ceb0d10 (nephio-project#46) on 2023-06-15. Both packages are fixed together. They export a helper of the same name with the same documented contract, so correcting only one would make the returned status depend on which package a caller imports, which is worse than the uniform defect it replaces. cfg/v1alpha1 has no importers I could find while infra/v1alpha1 has many, but both are published API. TestUnknown asserts the status alone, which is the field this change alters. The constructors were already executed by TestConditionedStatusEqual and TestSetConditions, so they were at 100% statement coverage before this change; what was missing was any assertion on the value they return. No in-tree or publicly indexed caller of Unknown() was found, in this repository, in nephio, in oai, or in the public importers of this module. That is a narrower claim than no impact: this changes the observable behaviour of an exported function, and unindexed consumers may exist. Left alone deliberately. ConditionedStatus.GetCondition() collapses the same tri-state in the other direction by synthesising ConditionFalse when no condition of the requested type exists, which is a separate API decision. The whole-file duplication between the two packages is the reason one defect could exist twice, but deduplicating them is a refactor. The pinned nokia/k8s-ipam dependency carries the same defect in its own copy and has active callers that persist it; that belongs upstream, not here. Signed-off-by: thc1006 <hctsai1006@cs.nctu.edu.tw>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
provides config CRD to configure network devices
provide additional configuration to the network API. Parameters that are not necessarily exposed to the intent creator. These are params for the engineers