mirror of
https://github.com/holos-run/holos.git
synced 2026-03-19 16:54:58 +00:00
Sometimes, but not always, the holos show buildplans command produces no output. ``` ❯ holos show buildplans --selector app.holos.run/cluster==w3 --log-level=debug finalized config from flags rendered platform in 13.458µs ``` It only happens when there's a selector. It doesn't happen without the selector flag. It only happens with ==, not with =. This test fails quickly. ``` while [[ $(holos show buildplans --selector app.holos.run/cluster==w3 --log-level=debug | wc -l) -eq 39 ]]; do true; done ``` This test runs until killed. ``` while [[ $(holos show buildplans --log-level=debug | wc -l) -eq 279 ]]; do true; done ``` Solution: The problem is the use of the map. Iterating over the keys happens in a random order. With the fix we check in an explicit order.
16 lines
375 B
Bash
16 lines
375 B
Bash
#! /bin/bash
|
|
|
|
TOPLEVEL="$(cd $(dirname "$0") && git rev-parse --show-toplevel)"
|
|
|
|
cd "${TOPLEVEL}"
|
|
|
|
# The text files use about 85% of the knowledge base.
|
|
mkdir -p tmp/claude
|
|
for x in $(git ls-files internal/\*.go api/author/v1alpha5/\*.go api/core/v1alpha5/\*.go doc/md/\*.md{,x}); do
|
|
y="${x//\//__}.txt"
|
|
|
|
[[ $y =~ "__ent__" ]] && continue
|
|
|
|
cp "$x" "tmp/claude/$y"
|
|
done
|