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

Issue with GitHub integration #100

Closed
chgad opened this issue Jan 15, 2018 · 13 comments
Closed

Issue with GitHub integration #100

chgad opened this issue Jan 15, 2018 · 13 comments
Labels

Comments

@chgad
Copy link

chgad commented Jan 15, 2018

  • safety version: GitHub integration
  • Python version: 2.7.x
  • Operating System:

Description

We have an status integrated for varryfying each PR going into the master branch.

I now encounter that this status is Pending for over 12 hours.

Is there currently a server issue or am I doing something wrong with the integration?

@jayfk
Copy link
Contributor

jayfk commented Jan 15, 2018

There are currently no (known) global server issues. The most reasonable explanation is that one of the worker processes wasn't able to correctly set the commit status.

Is this on a private repo? If so, could you sent me the repo name and the commit sha via mail to support@pyup.io?

If not, please send me a link to the PR on GitHub and I'll have a look at it.

@jayfk jayfk closed this as completed Jan 15, 2018
@chgad
Copy link
Author

chgad commented Jan 23, 2018

Well,
I "reencounter" this Problem, but i found smth which seeems like a bug to me.
So the pyup/saftey Integration works fine when using feature branches and Pr them into our develop branch. Now when Pring into master it stays on "waiting for satus report".

But if i do a normal commit on the develop branch (which i'd like to prevent in the future) and push this commit, the status is reported immediately.
This really looks like a Bug. @jayfk reopen this Issue ?

@jayfk
Copy link
Contributor

jayfk commented Jan 23, 2018

Could you check if there are any webhooks not being sent to pyup.io and/or are throwing errors?

If you go into your repos settings, you should see a webhook pointing to pyup.io. A click on edit should show you all calls to the api (you need to scroll down a bit).

@jayfk jayfk reopened this Jan 23, 2018
@chgad
Copy link
Author

chgad commented Jan 24, 2018

Strangely,

it seems that all Request were succesfull even if i encountered "perma-pending" statuses.

I'll track this for now.

@chgad
Copy link
Author

chgad commented Feb 3, 2018

Update:

I first thought it might be an issue of "not calling the hook when creating the PR". But i doubled checked it and yes, I'm calling the hook when a PR is opened etc. . And the Response looks fine to me.

But still, pending.

@katherine-black
Copy link

katherine-black commented Feb 7, 2018

Running into something similar, if I rebase my branch and force push it, the commit status will hang in pending, but if I make a new commit and push it everything will run as expected.

To add to this, it seems like safety-ci is only looking at the first commit of multiple that are part of that webhook call, in my case the very first commit actually failed safety-ci so I'm not sure if that would cause an issue.

Let me know if I can provide any more info.

@jayfk
Copy link
Contributor

jayfk commented Feb 8, 2018

Running into something similar, if I rebase my branch and force push it, the commit status will hang in pending, but if I make a new commit and push it everything will run as expected.

Thanks, that helps a lot. I'm struggling to reproduce this on a minimal test repo. Maybe that will help.

I'll keep you posted.

@jayfk
Copy link
Contributor

jayfk commented Feb 15, 2018

I've just deployed some changes that hopefully fix this issue.

@chgad @ilyavw could you try reproducing the bug on one of your repos? If it still doesn't work, could you give me the exact steps that you were doing?

- git branch foo
- git checkout foo
- touch bar.txt
- git commit -a -m 'baz'
- git push origin foo
- [created PR on GitHub through UI]
- ...
- ...

@chgad
Copy link
Author

chgad commented Feb 15, 2018

I'm currently on vacation. I'll try it as soon as I'm back.

@katherine-black
Copy link

katherine-black commented Feb 15, 2018

Unfortunately I was able to still reproduce this. Here are my steps:

- git checkout -b test-branch
- vim README.md
- git commit -am "test commit 1"
- vim README.md
- git commit -am "test commit 2"
- vim tox.ini
- git commit -am "test commit 3"
- git push
-- PR Created in github UI
-- At this point the 3 commits are pushed together and safety ci still works, as the job only runs on the last commit

- vim tox.ini
- git commit -am "test commit 3" --amend
- git push --force
-- Still working

- vim tox.ini
- git commit -am "test commit 4"
- git push
-- Added a second "buildable" commit, still working

- vim tox.ini
- git commit -am "test commit 4" --amend
- git push -f
-- At this point safety ci hangs

image

image

@jayfk
Copy link
Contributor

jayfk commented Feb 15, 2018

Thanks! That should have worked, tough. (It does locally)

I believe the Server Error is unrelated. Prior to you posting this, I've received a error message from Sentry telling me it failed miserably to parse a tox.ini. That's probably where the Server Error comes from.

If you have the time, could you try that again without messing with your tox.ini?

Thanks a lot for your time helping me debugging this.

@katherine-black
Copy link

Ah, that was it! I messed up the syntax in the tox file and that's what caused the failure. I can confirm now that this issue appears to be resolved. Thank you!

@rafaelpivato
Copy link
Contributor

Closing this as it is apparently fixed given the conversation above. Let me know otherwise, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants