From 4b29e2c485befe1f5a780657cf777722fda183eb Mon Sep 17 00:00:00 2001 From: Adam Krpan Date: Mon, 23 Nov 2020 10:47:58 -0800 Subject: [PATCH 1/2] Changed the default query size to 1000 if not specified This fixes a bug where fleets with >10 devices would only show the first 10 (filters would show the rest) --- pkg/clients/elastic/arrays.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/clients/elastic/arrays.go b/pkg/clients/elastic/arrays.go index 244b7247..9ac3d8e9 100644 --- a/pkg/clients/elastic/arrays.go +++ b/pkg/clients/elastic/arrays.go @@ -40,6 +40,10 @@ func (c *Client) FindArrays(query *resources.ArrayQuery) ([]*resources.Array, er searchService := c.esclient.Search(arraysIndexName).Type("_doc").Query(query.GenerateElasticQueryObject()).From(query.Offset).IgnoreUnavailable(true).AllowNoIndices(true) if query.Limit > 0 { searchService.Size(query.Limit) + } else { + // Default to 1000 results if not specified (should be bigger than any "practical" fleet size to ensure returning + // all results) + searchService.Size(1000) } if len(query.Sort) > 0 { sortParam, err := query.GetSortParameter() From c6dd8da24d916fc0f83c0c5c1163663358bab1b7 Mon Sep 17 00:00:00 2001 From: Adam Krpan Date: Mon, 23 Nov 2020 10:48:54 -0800 Subject: [PATCH 2/2] Fixes for build pipeline --- images/lorax-build/Dockerfile | 2 +- scripts/build/build_lorax_image.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/images/lorax-build/Dockerfile b/images/lorax-build/Dockerfile index 04a30023..eca3de10 100644 --- a/images/lorax-build/Dockerfile +++ b/images/lorax-build/Dockerfile @@ -32,7 +32,7 @@ RUN yum update -y && yum install -y \ # Note we install kubeadm only so we can snag a list of its required images with the config shipped # for this version of kubeadm (matches the one we install with our installer iso). -RUN gem install --no-ri --no-rdoc fpm +RUN gem install --no-ri --no-rdoc fpm -f COPY images/lorax-build/lorax.conf /etc/lorax/ diff --git a/scripts/build/build_lorax_image.sh b/scripts/build/build_lorax_image.sh index 04e23c55..7b522602 100755 --- a/scripts/build/build_lorax_image.sh +++ b/scripts/build/build_lorax_image.sh @@ -19,6 +19,7 @@ if [[ -z "${KUBEVERSION}" ]]; then fi docker build \ + --no-cache \ -t lorax-build:${VERSION} \ --build-arg "KUBERNETES_VERSION=${KUBEVERSION}" \ -f ${REPO_ROOT}/images/lorax-build/Dockerfile \