Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache buster broken for releases #1363

Closed
JeffBolle opened this issue Mar 18, 2022 · 9 comments · Fixed by #1371
Closed

Cache buster broken for releases #1363

JeffBolle opened this issue Mar 18, 2022 · 9 comments · Fixed by #1371
Labels
bug Something isn't working

Comments

@JeffBolle
Copy link

JeffBolle commented Mar 18, 2022

Update

Previous title: Dashboards Discover blank after upgrade to 1.3.0
Problem: Release builds are always building OpenSearch Dashboards with a build number equal to 1 which breaks the cache buster
Workaround: Clear cache
Issue: opensearch-project/opensearch-build#1769


Describe the bug

After upgrading to OpenSearch Dashboards 1.3.0, users are unable to use the discover tab, although the Dashboard tab still works.

To Reproduce
Steps to reproduce the behavior:
0. Upgrade from a working 1.2.0 Dashboards installation

  1. Go to The Discover tab
  2. If no index patterns are loaded, the tab will load.
  3. create an index pattern
  4. Go back to the discover tab.
  5. See that nothing is there.

Expected behavior
To see the index pattern chooser and search results.

OpenSearch Version
1.3.0

Dashboards Version
1.3.0

Plugins
Standard install.

Screenshots
Screenshot from 2022-03-18 17-19-07

Here is the error from the browser console:

osd-ui-shared-deps.js:434 TypeError: Cannot read properties of undefined (reading 'kueryQuerySyntax')
at QueryBarTopRow (:5601/1/bundles/plugin/data/data.chunk.4.js:1:137586)
at ua (:5601/1/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:434:59332)
at Ms (:5601/1/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:434:104414)
at gl (:5601/1/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:434:90018)
at fl (:5601/1/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:434:89943)
at ol (:5601/1/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:434:87291)
at :5601/1/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:434:45733
at t.unstable_runWithPriority (:5601/1/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:442:3462)
at Hi (:5601/1/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:434:45442)
at Gi (:5601/1/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:434:45678)
ds @ osd-ui-shared-deps.js:434

Host/Environment (please complete the following information):

  • OS: Dashboards docker container hosted on Google container optimized os.
  • Browser and version [e.g. 22]
Google Chrome 99.0.4844.51 (Official Build) (64-bit)
Revision d537ec02474b5afe23684e7963d538896c63ac77-refs/branch-heads/4844@{#875}
OS Linux
JavaScript V8 9.9.115.8
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36

Additional context

I've heard from some users that they do not have the problem. However a large number do.

@JeffBolle JeffBolle added bug Something isn't working untriaged labels Mar 18, 2022
@JeffBolle
Copy link
Author

I'm not sure how to adequately raise the awareness on this, but this is a terrible issue that has rendered Dashboards unusable for most of our users. Attempts to downgrade to 1.2.0 were unsuccessful. Any assistance with remediating or addressing this would be appreciated.

@kavilla
Copy link
Member

kavilla commented Mar 18, 2022

Hello @JeffBolle,

Thank you for opening this issue! Sorry that you are seeing this issue.

Would you be willing share some information on all your index-pattern looks like? Did you successfully migrated from 1.0 to 1.1, and 1.1 to 1.2? Or did you onboard with 1.2? There is an issue with caching: opensearch-project/opensearch-build#1769 that you could be running into.

@JeffBolle
Copy link
Author

I'm happy to share whatever is needed.

I cleared out my personal .kibana tenant index and have been testing with that. When I clear it out I can load the discover tab, but as soon as I add any index pattern, I can no longer load the discover tab.

I believe we started with OpenSearch 1.2.

What should I try to mitigate the caching issue?

@kavilla
Copy link
Member

kavilla commented Mar 18, 2022

If you are able to mitigate the caching issue and resolves it please let me know. If it is a caching issue then that's something we dropped the ball on it and I apologize for that, and we should definitely work on prioritizing opensearch-project/opensearch-build#1769

@JeffBolle
Copy link
Author

I just loaded dashboards in an Incognito window and that worked! Thank you, I sincerely appreciate the help late in the day on a Friday. For now its definitely feasible to have our users flush their cache, but that gave us quite the scare!

@kavilla
Copy link
Member

kavilla commented Mar 18, 2022

@JeffBolle, I really apologize for the caching issue and the scare! It was an huge oversight when we were building out our build system, I will ensure that for whatever next release that the cache breaker will be fixed. But thank you for opening this issue it really helps with making the case to prioritize the issue!

@JeffBolle
Copy link
Author

@kavilla No worries! Hopefully this issue also helps others that run into it solve it quickly. The 1.3.0 upgrade (to get continuous transforms) was a key step in our process of migrating from ElasticSearch 7.10.2 to OpenSearch. We've now moved our largest data system over and so far it is going very smoothly, all things considered. We appreciate the hard work being done by all of the teams involved.

@kavilla
Copy link
Member

kavilla commented Mar 18, 2022

Thanks for migrating so quickly and thanks for opening this issue. I'm going to retitle it and pin into the repo for visibility.

@kavilla kavilla changed the title Dashboards Discover blank after upgrade to 1.3.0 Cache buster broken for releases Mar 18, 2022
@kavilla kavilla removed the untriaged label Mar 18, 2022
@kavilla kavilla pinned this issue Mar 18, 2022
kavilla added a commit to kavilla/OpenSearch-Dashboards-1 that referenced this issue Mar 23, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

Issues resolved:
* opensearch-project/opensearch-build#1769
* opensearch-project#1363

Signed-off-by: Kawika Avilla <[email protected]>
kavilla added a commit to kavilla/OpenSearch-Dashboards-1 that referenced this issue Mar 23, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

Issues resolved:
* opensearch-project/opensearch-build#1769
* opensearch-project#1363

Signed-off-by: Kawika Avilla <[email protected]>
kavilla added a commit to kavilla/OpenSearch-Dashboards-1 that referenced this issue Mar 23, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* opensearch-project#1363

Signed-off-by: Kawika Avilla <[email protected]>
@kavilla kavilla linked a pull request Mar 23, 2022 that will close this issue
7 tasks
kavilla added a commit that referenced this issue Mar 24, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this issue Mar 24, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 797d988)
kavilla added a commit that referenced this issue Mar 24, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 797d988)

Co-authored-by: Kawika Avilla <[email protected]>
@seanneumann seanneumann unpinned this issue Mar 30, 2022
opensearch-trigger-bot bot pushed a commit that referenced this issue Mar 30, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 797d988)
kavilla added a commit that referenced this issue Mar 31, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 797d988)

Co-authored-by: Kawika Avilla <[email protected]>
@kavilla
Copy link
Member

kavilla commented Apr 8, 2022

@JeffBolle, we have released 1.3.1 that should resolve the cache breaking issue (and will continue going forward).

opensearch-trigger-bot bot pushed a commit that referenced this issue Apr 14, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 797d988)
opensearch-trigger-bot bot pushed a commit that referenced this issue Apr 14, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 797d988)
opensearch-trigger-bot bot pushed a commit that referenced this issue Apr 14, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 797d988)
kavilla added a commit that referenced this issue Apr 25, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 797d988)

Co-authored-by: Kawika Avilla <[email protected]>
kavilla added a commit that referenced this issue Apr 25, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 797d988)

Co-authored-by: Kawika Avilla <[email protected]>
kavilla added a commit that referenced this issue Apr 25, 2022
When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 797d988)

Co-authored-by: Kawika Avilla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants