Pylons / deform

A Python HTML form library.
Other
416 stars 160 forks source link

Add some commands to troubleshoot #494

Closed sydoluciani closed 3 years ago

stevepiercy commented 3 years ago

I cancelled the latest workflow as it appeared to have hung on tox -e functional3 after about 5 minutes.

stevepiercy commented 3 years ago

BTW, I use this page to get all the Actions in a list, reloading after each push, and opening the specific job in a new tab to monitor its progress. It also shows immediate failures that do not show up in the PR page.

sydoluciani commented 3 years ago

I cancelled the latest workflow as it appeared to have hung on tox -e functional3 after about 5 minutes.

I have added DISPLAY environment variable to GHA global environment in here, however the check in deformdemo in here didn't print out in workflow output, so I am not sure if the sudden exit is the cause of hang, or other problems, so added an else statement to see if DISPLAY is set. if yes, then there are other variables needs to be checked. please merge latest deformdemo pull request that contains the else clause to print DISPLAY number.

sydoluciani commented 3 years ago

To import TOX environment variables to GHA, added equivalant of this line in here but not sure if it is correct.

stevepiercy commented 3 years ago

I merged the deformdemo branch, then restarted the build here in Deform. It partly fails and appears to still stall on functional3 tests.

stevepiercy commented 3 years ago

Hey, it looks like you got it! The functional tests just don't provide any feedback until exit. I pushed a fix for the matrix to your branch.

stevepiercy commented 3 years ago

To follow up on those suggestions from Keybase:

Suggestion 1

    - name: Install webdriver
      run: |
        sudo apt-get update
        sudo apt-get -yqq install firefox firefox-geckodriver

firefox is already installed in ubuntu, but it doesn't hurt to specify it and ensures that it does get installed in case it gets removed in a future release.

Also we did not install firefox-geckodriver, but chose to install it through a manual step. I'll try this suggestion.

It can also be installed via webdrivermanager and pip:

https://stackoverflow.com/a/61084589/2214933

Suggestion 2

Instead you'll want to grab a docker image and run the whole stack using docker-compose to run all the tests.

For example: https://hub.docker.com/r/selenium/standalone-firefox

The nice thing is that you'll be able to use the same docker-compose setup to run tests locally as well.

You'll need to the use selenium protocol instead of geckodriver directly. But you'll have to do some work for connecting to the selenium tcp/ip port.

This one looks interesting and worth a separate branch for trying out.

stevepiercy commented 3 years ago

Suggestion 1 was successful!

I'm going to try a couple more things to see if they are really necessary.

stevepiercy commented 3 years ago

Tip: I just discovered that GHA will run all actions in the queue, unlike Travis and Appveyor. You can push a series of commits, and they will all run simultaneously.

stevepiercy commented 3 years ago

I'm going to merge this PR, then let the parent PR sit for a while before merging to master. I want to try out the docker option on a separate branch.

stevepiercy commented 3 years ago

Thank you for your work on this @sydoluciani.

I don't know much about the docker option from Suggestion 2 above, but I'll take a look tomorrow.

sydoluciani commented 3 years ago

Thank you for your work on this @sydoluciani.

I don't know much about the docker option from Suggestion 2 above, but I'll take a look tomorrow.

@stevepiercy it took us two days to figure it out, but now I know Github Actions, thank you :smile:

We considerably did lots of commits to troubleshoot different senarios, are you going to rebase and remove those tests or you are going to create a new pull request to eliminate those unnecessary commits from history of commits and reduce the pollutions ?

I am going to check starting a container from within Github Actions some time today evening, will let you know if I have any progress.

stevepiercy commented 3 years ago

I can do a squash commit on merge.

Screen Shot 2020-11-09 at 12 19 32 PM

I have a few more commits to push to my PR, then I'll merge it. The Pyramid maintainers made some improvements to coverage on the 1.10-branch. I also want to backport this to the 2.0-branch.

Thanks for picking up the Docker container experiment!