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

Dashboards: Change the way dashboard not found error is handled #98950

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

dprokop
Copy link
Member

@dprokop dprokop commented Jan 14, 2025

This changes the way how dashboard/public dash/snapshots/solo view 404 issue is handled. Before this PR, such a view would be rendered as a "regular" dashboard, would require fake 404 dashboard modelcreation etc. With this PR:

  • errors are thrown and captured by the DashboardScenePageStateManager and rendered accordingly
  • the old architecture code is updated to handle this
  • dashboardNotFound metadata is removed
  • AnnoKeyDashboardNotFound k8s client annotation is removed

TODO:

  • update tests
  • Make sure public dashboard tag is shown

@torkelo
Copy link
Member

torkelo commented Jan 14, 2025

@dprokop nice! I remember spending half a day or something on thing a few months ago, gave up when fixing all the tests looked to take me another day or so, hope you have better luck because this is a really good change!

@dprokop dprokop marked this pull request as ready for review January 15, 2025 10:39
@dprokop dprokop requested review from a team and grafanabot as code owners January 15, 2025 10:39
@dprokop dprokop requested review from juanicabanas, AgnesToulet, joshhunt and aocenas and removed request for a team January 15, 2025 10:39
@dprokop dprokop requested a review from onprem January 15, 2025 10:39
@github-actions github-actions bot added this to the 11.5.x milestone Jan 15, 2025
@dprokop dprokop added no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Jan 15, 2025
Copy link
Contributor

@Sergej-Vlasov Sergej-Vlasov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

TODO - Remove left behind comments

Tested with various cases:

  • load non-existent dashboard/snapshot
  • navigate to non-existent dashboard
  • adjust dashboard/panel share link to non-existent dashboard
  • use dashboard link to navigate to non-existent dashboard

Could not test:

  • embeded dashboard/panel

Issues encountered:

  • when you navigate to non-existent panel via dashboard/panel link the top actions bar remains
    • probably not related to this but lacks clean up from scenes dashboard
Screen.Recording.2025-01-15.at.16.50.38.mov

@Sergej-Vlasov
Copy link
Contributor

/deploy-to-hg

@ephemeral-instances-bot
Copy link

  • Preparing your instance. A comment containing your instance's url will be added to this PR when the instance is ready.
  • Your instance will be ready in ~10 minutes. Follow the workflow progress
  • Slack channel: #proj-ephemeral-hg-instances
  • Building instance with schemav2-refactor-not-found oss branch and main enterprise branch. How to choose a branch

@ephemeral-instances-bot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants