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

Dashboard: Redirects for old (pre 7.0) edit & view panel urls #25653

Merged
merged 1 commit into from Jun 17, 2020

Conversation

torkelo
Copy link
Member

@torkelo torkelo commented Jun 17, 2020

Closes #25459

@torkelo torkelo added this to the 7.1 milestone Jun 17, 2020
@torkelo torkelo requested a review from a team as a code owner June 17, 2020 09:27
@torkelo torkelo requested review from marefr and removed request for a team June 17, 2020 09:27
@@ -55,4 +55,21 @@ func TestMiddlewareDashboardRedirect(t *testing.T) {
})
})
})

Convey("Given the dashboard legacy edit panel middleware", t, func() {
Copy link
Contributor

@aknuds1 aknuds1 Jun 17, 2020

Choose a reason for hiding this comment

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

We might want to rewrite this using the standard testing library, since we're committed to getting rid of Convey.

Copy link
Member Author

Choose a reason for hiding this comment

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

Then we have to convert this whole file, what test runners are you using?

Copy link
Contributor

Choose a reason for hiding this comment

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

@torkelo We just use go test for running tests. In this case, I think it would be easy to write this test without Convey. That's what I usually do when adding new tests, just write them with the standard library, in addition to the existing Convey ones (which I guess we'll clean up at some point).

Copy link
Member Author

Choose a reason for hiding this comment

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

go test is terrible, have scroll a bunch to see what failed due to stack traces that are more than a screen long, and it does not rerun tests on file change (no watch), so the whole experience I find very poor. Like having a test runner in a tmux split that runs tests on file change and print failures in readable form.

I tried to rewrite this to go testing library but sadly it depends on middlewareScenario which uses GoConvey so have to rewrite hundreds of tests to go testing library to convert this test :(

Copy link
Member

@marefr marefr left a comment

Choose a reason for hiding this comment

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

LGTM

Any scenario where fullscreen param is not provided since this will only apply when fullscreen param is provided. Someone having old links maybe with only panelId param set?

@torkelo
Copy link
Member Author

torkelo commented Jun 17, 2020

no the old urls always had panelId & fullscreen, and then edit no edit depending on view/edit mode. which is why I simplified the state a big for 7.0 to just have editPanel and viewPanel to cover both states with just two states instead of 3 properties

@torkelo torkelo merged commit d6ed8c5 into master Jun 17, 2020
@torkelo torkelo deleted the panel-edit-redirect branch June 17, 2020 10:51
@torkelo torkelo modified the milestones: 7.1, 7.0.4 Jun 24, 2020
torkelo added a commit that referenced this pull request Jun 24, 2020
dprokop pushed a commit that referenced this pull request Jun 25, 2020
@dprokop dprokop mentioned this pull request Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support old panelId urls for view & edit panel
4 participants