Closed Avey777 closed 1 year ago
@justinclift
What should I do next to merge the data successfully?
@Avey777 Not sure, my head space is more into Go programming than jsx at the moment. @gaecoli Any ideas? :smile:
Not sure, my head space is more into Go programming than jsx at the moment. @gaecoli Any ideas?
My local testing is normal, what is the reason why the code cannot be merged?
@gaecoli Can you review this code merge?
@gaecoli Can you review this code merge?
I think some scenarios are not tested from the code
@gaecoli Can you review this code merge?
I think some scenarios are not tested from the code
@Avey777
I think this is a PR with a relatively large impact, so it needs to pass the CI test.
Can you post some renderings? @Avey777 It makes others understand what do you want to do. Thank you!
@gaecoli I have optimized the code and tested it locally.
Wonder if we should add a new Cypress test (or tests) for it, to make sure it's always working as intended?
Wonder if we should add a new Cypress test (or tests) for it, to make sure it's always working as intended?
@gaecoli I can't understand the test file. I just made a small change to the presentation of the sharing page. Can I merge the code directly?
What should I do now to make it pass the test?
Can you post some renderings? @Avey777 It makes others understand what do you want to do. Thank you!
I've just restarted the failing end-to-end test piece. It uses a javascript test framework called Cypress. It's generally ok, but does seem to be unreliable.
As in, when first starting out with adding Cypress tests to a project it seems reliable. But once you have a reasonable number of tests then it's fairly common for them to just occasionally fail when running. :frowning:
That being said I've only used it on this project and one other, so maybe other places have it run more reliably. I'm not sure. :smile:
Can I merge the code directly?
Nah, lets make sure it doesn't break the test suite. If it keeps on causing the testing to fail, then there's probably an actual problem that needs fixing. :smile:
Ahhh. It looks like the tests are actually failing now, because they're expecting a user interface element to be present... but it's now hidden:
AssertionError: Timed out retrying: Expected to find element: `[data-test="ParameterApplyButton"]`, but never found it.
I'm guessing we'll probably need to remove that specific piece of the test.
Ahhh. It looks like the tests are actually failing now, because they're expecting a user interface element to be present... but it's now hidden:
AssertionError: Timed out retrying: Expected to find element: `[data-test="ParameterApplyButton"]`, but never found it.
I'm guessing we'll probably need to remove that specific piece of the test.
"I will handle this."
Cool. As a data point, the version of Cypress being used by Redash is fairly old. Version 5.3.0, while the current version of Cypress is 12.14.0.
So, if you need to read Cypress docs make sure you read the appropriate ones for the old version.
Btw, there were some major changes around Cypress version 10, so it's not straight forward for us to just switch to a recent version. :wink:
Cool. As a data point, the version of Cypress being used by Redash is fairly old. Version 5.3.0, while the current version of Cypress is 12.14.0.
So, if you need to read Cypress docs make sure you read the appropriate ones for the old version.
Btw, there were some major changes around Cypress version 10, so it's not straight forward for us to just switch to a recent version. π
It seems that we have a lot of dependencies that need to be gradually upgraded to slightly higher versions. The times are changing, and versions that are too outdated cannot effectively move us forward. A lot of time is wasted on dealing with these trivial matters.
Yeah. I think that once we have things in a reasonable state, we'll need to look at a better approach to all this.
My feeling is that the dependency management for Redash might be more complicated (at present) than code development. Mainly because some updated dependencies need their own changes in Redash's code, and we seem to only find that out when things break. :frowning:
@gaecoli How to restart the test? It has been fixed now.
To restart the test, click on the failed one to open the right page. Then there's a button to rerun the tests.
Ahhh, this one was a bit different. It needed a button to be clicked on to "run the workflow". I've just done that, so lets see how this goes... :smile:
To restart the test, click on the failed one to open the right page. Then there's a button to rerun the tests.
Ahhh, this one was a bit different. It needed a button to be clicked on to "run the workflow". I've just done that, so lets see how this goes... π
I have done my best to resolve all the errors that I could understand. However, I do not understand what the problem is with this current issue. @gaecoli
I didn't see the button to execute the test on the page you mentioned. Could you please take a screenshot and show it to me? @gaecoli
I didn't see the button to execute the test on the page you mentioned. Could you please take a screenshot and show it to me? @gaecoli
I started it.
Seems to be only a single test failure now:
The test it mentions is the one here:
That's showing a "time out" error, which can sometimes be a real error, or can sometimes be a false positive failure.
@gaecoli is running it again now, so hopefully it passes this time around.
I didn't see the button to execute the test on the page you mentioned. Could you please take a screenshot and show it to me? @gaecoli
I started it.
I'm struggling too much and haven't even touched this part of the code. I currently don't have any solutions in mind.
I noticed that the 'PublicAccessEnabled' element is not being used in the code. I'm having trouble making changes to this part, could you help me figure out how to modify it? @gaecoli
Yeah, there's a bunch of stuff to get the hang of. Don't give up yet though. :smile:
For the re-running of a failed job, the button is here:
It's the "Re-run jobs" button on the right hand side. It can either re-run all the tasks, or just the failed ones. For our purposes, they're both similar though it's a bit faster to just do the failed ones.
Looking at the latest test run, it's failed in two places:
For fixing that first one, probably the best approach is to:
The Cypress GUI is used here as it'll show you visually what the test is trying to do. So you can either modify the test, or modify your code.
Looking over the Cypress tests that Redash has... they're a bit more advanced than the simple tests I'm more familiar with. I can probably help out a bit, but it'll be in a few hours time as I'm doing some other stuff at the moment.
Oh, be aware that running the Cypress tests manually from the GUI will generally require you to have built and started the docker image before hand. It uses that running docker image to do the tests on.
@justinclift There is no "restart" button on my interface, so I'm planning to try it out within my fork.
@Avey777 Ahhh, that's right. You didn't accept the group invite, so you don't have permissions to run stuff. Gimme a minute, I'll send it again. :smile:
Invite sent. If you accept that, then you should have the "Re-run ..." button show up when you visit that page. :smile:
@Avey777 Ahhh, that's right. You didn't accept the group invite, so you don't have permissions to run stuff. Gimme a minute, I'll send it again. π
Invite sent. If you accept that, then you should have the "Re-run ..." button show up when you visit that page. π
Yes, I have accepted the invitation now.
Cool. The "Rerun ..." button is showing up for you now yeah?
Cool. The "Rerun ..." button is showing up for you now yeah?
yeah
I am a bit skeptical about whether the previous code can pass the test normally, and I have not made any modifications to the errors reported
PerfectοΌ Code has passed the tests. @gaecoli
@justinclift
Can you merge it?
I merged it.
Sounds great. π Thank you!
Awesome, well done! :smile:
I merged it.
As a tip for the future, when merging a PR there are two main options:
The 2nd option is generally the one to choose when there are many commits in the PR. Otherwise the commit history for the repo gets messy and a bit harder to work with.
That's only a neatness thing, and doesn't really affect things all that badly. It's something to get the hang of over time though as we work on stuff. :smile:
What type of PR is this?
Description
How is this tested?
Related Tickets & Documents
27
Mobile & Desktop Screenshots/Recordings (if there are UI changes)