Unexpected behavior when accessing cluster with older API version
When trying to search buffers in a 0.5.3 cluster with CLI since v0.6.0, tyger buffer list no longer searches by tag.
To reproduce, run the following script
#!/bin/bash
buf1=$(tyger buffer create --tag mytag=myval)
buf2=$(tyger buffer create)
buf_search=$(tyger buffer list --limit 1 --tag mytag=myval | jq -r '.[0].id')
echo "buf1: $buf1"
echo "buf2: $buf2"
echo "buf_search: $buf_search"
if [ "$buf1" != "$buf_search" ]; then
echo "Buffer search failed"
exit 1
fi
echo "Buffer search succeeded"
It succeeds with v0.5.3 and fails with v0.6.0 and later.
The issue here is that we updated the API.
Actually the problem here is that we change the API from tag.<tagname> to tag[<tagname> so that we would have an openAPI compatible schema for code generation. So I think the issue is that maybe there should perhaps be a check, the API versions are not compatible. This causes some unexpected behavior when using a new client with a not updated cluter.
We should maybe have a version check in general.
Resolved with #206