Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't use dashboard cache if url is different (#841)
* fix: lift restriction on having both url and grafanacom specified in a dashboard spec There's a fallback logic in (r *DashboardPipelineImpl) obtainJson() that allows a user to have multiple sources for configuration with falling back to the next one in case of an error. For unknown reasons, having both url and grafanacom in spec was not allowed. This restriction should be lifted. * fix: don't use dashboard cache if URL is different, and other minor fixes - for code simplification, moved from &metav1.Duration to metav1.Duration where the former was not really needed (GrafanaDashboardStatus, GrafanaSpec); - fix: for unknown reasons, NewDashboardPipeline would fallback to 24h instead of 0(=infinity) if dashboard.Spec.ContentCacheDuration is not defined. Removed that; - moved cache extraction from obtainJson() to loadDashboardFromURL(). - I think that location makes more sense; - fix: don’t use dashboard cache if url is different.
- Loading branch information
Showing
8 changed files
with
135 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters