Add containerlab best practices skills - #3256
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3256 +/- ##
==========================================
+ Coverage 56.67% 56.80% +0.13%
==========================================
Files 244 244
Lines 25517 25535 +18
==========================================
+ Hits 14461 14505 +44
+ Misses 9390 9360 -30
- Partials 1666 1670 +4
🚀 New features to boost your workflow:
|
| return nil | ||
| } | ||
|
|
||
| if link, ok := l.(runtimeEndpointProvider); ok { |
There was a problem hiding this comment.
this is bad. try to avoid type casts... add the GetRuntimeEndpoints to the Link interface and use it straight away.
remove the runtimeEndpointProvider.
type Link interface {
// ...
GetEndpoints() []Endpoint
// GetRuntimeEndpoints returns endpoints apply/deploy may create, discover, or remove.
// Parent-only and remote metadata endpoints are excluded where applicable.
GetRuntimeEndpoints() []Endpoint
}
The branch mixes:
better pull at least some of it into distinct PRs. |
| return nil, nil, fmt.Errorf("failed to resolve host veth component for vxlan-stitch") | ||
| } | ||
|
|
||
| // host endpoint is always the 2nd element in the Endpoints slice |
There was a problem hiding this comment.
eps[1] assumes LinkHostRaw.Resolve always returns [node, host]. That's true today but implicit. We already know hostIface here — selecting by ep.GetIfaceName() == hostIface (or a small helper) would make the stitch endpoint choice explicit and order-independent.
|
This PR is now only about agent skills/rules |
## Summary - move apply runtime endpoint selection onto the `links.Link` contract with `GetRuntimeEndpoints()` - keep stitched-link capability in the `links` package and update apply/deploy callers - persist apply state and reset resolved links for idempotent apply paths - remove short kind aliases from the apply docs table - select the VXLAN stitch endpoint by interface name instead of endpoint slice order ## Validation - `go test ./links ./core ./cmd` Split out from #3256 so that PR can stay focused on agent skills only. --------- Co-authored-by: hellt <dodin.roman@gmail.com>
No description provided.