Skip to content

Netwcfg API - #46

Merged
nephio-prow[bot] merged 4 commits into
nephio-project:mainfrom
nokia:netwcfg
Jun 15, 2023
Merged

Netwcfg API#46
nephio-prow[bot] merged 4 commits into
nephio-project:mainfrom
nokia:netwcfg

Conversation

@henderiw

Copy link
Copy Markdown
Contributor

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

@johnbelamaric

Copy link
Copy Markdown
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

Copy link
Copy Markdown
ContributorAuthor

this is new.

  1. the config CRD is the CRD that is the one providing the config of the network device
  2. the networkConfig is a CRD that is for the network people deploying the networks. They have default for various scenario's. Like pick prefix length x is it is an internal link, etc.

@johnbelamaric

Copy link
Copy Markdown
Member

/approve
/lgtm

@nephio-prow

Copy link
Copy Markdown
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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nephio-prow
nephio-prowBot merged commit ceb0d10 into nephio-project:mainJun 15, 2023
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>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@henderiw@johnbelamaric