Giter Site home page Giter Site logo

Comments (12)

rtyley avatar rtyley commented on August 24, 2024

Very strange- looks like the problem is occurring when gu:who tries to Git clone your people repo. Can you try cloning that repo yourself, using the credentials that you supply to gu:who? So if your bot is called foobar, and your organisation is called company, try this:

$ git clone https://foobar:[email protected]/company/people.git

If you can clone the repo ok with those credentials, there may be a filesystem permissions problem...

from gu-who.

timmattison avatar timmattison commented on August 24, 2024

OK, I tried to clone it as you said and it worked just fine. I get a checkout of the master branch which contains the default README.md and just has a single commit with the message "Initial commit".

I tried renaming the bot since I called it "gu-who" and thought maybe the dash screwed it up but with the bot named "guwho" it still fails. Same issue.

Are there any things I need to do to prepare the repo?

from gu-who.

timmattison avatar timmattison commented on August 24, 2024

I also deleted the repo, tried it without a "people" repo, and it still failed. Then I tried it with a bare repo and it still failed.

from gu-who.

rtyley avatar rtyley commented on August 24, 2024

Running off master now should give you the explanation you need - there was no users.txt file in your repo!

The users.txt file is a list of 'sponsored' users - for each new user joining the GitHub organisation, a 'more-senior' member of staff adds the user to the users.txt file in 'people' repo, taking responsibility via git-blame for the user being in the organisation. This ensures there’s always someone to go to when membership for a dodgy account is in doubt.

gu:who always expects the file to be in the people repo, and behaved badly when it couldn't find it - thanks for reporting the issue!

from gu-who.

timmattison avatar timmattison commented on August 24, 2024

Getting closer. Now when I try to run it I have the users.txt created but it gives me a file not found error when it tries to create an issue not for the first user but for the second user it sees. If I try to run it again it creates the issue for the first user again and still fails on the second.

[info] application - Creating issue for user1 Set(lib.SponsorRequirement$@95eed5a)
[info] application - Creating issue for user2 Set(lib.FullNameRequirement$@6d7e7fc, lib.TwoFactorAuthRequirement$@48bf54e6, lib.SponsorRequirement$@95eed5a)
[error] play - Cannot invoke the action, eventually got an error: java.io.FileNotFoundException: https://api.github.com/repos/company/people/issues

! @6igbadk1j - Internal server error, for (POST) [/audit/company] ->

play.api.Application$$anon$1: Execution exception[[FileNotFoundException: https://api.github.com/repos/company/people/issues]]
    at play.api.Application$class.handleError(Application.scala:296) ~[com.typesafe.play.play_2.11-2.3.0.jar:2.3.0]
    at play.api.DefaultApplication.handleError(Application.scala:402) [com.typesafe.play.play_2.11-2.3.0.jar:2.3.0]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [com.typesafe.play.play_2.11-2.3.0.jar:2.3.0]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [com.typesafe.play.play_2.11-2.3.0.jar:2.3.0]
    at scala.Option.map(Option.scala:145) [org.scala-lang.scala-library-2.11.1.jar:na]
Caused by: java.io.FileNotFoundException: https://api.github.com/repos/company/people/issues
    at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:194) ~[com.squareup.okhttp.okhttp-1.5.3.jar:na]
    at com.squareup.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) ~[com.squareup.okhttp.okhttp-1.5.3.jar:na]
    at com.squareup.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25) ~[com.squareup.okhttp.okhttp-1.5.3.jar:na]
    at org.kohsuke.github.Requester.parse(Requester.java:323) ~[com.madgag.github-api-1.50.0.2.jar:na]
    at org.kohsuke.github.Requester._to(Requester.java:200) ~[com.madgag.github-api-1.50.0.2.jar:na]

from gu-who.

timmattison avatar timmattison commented on August 24, 2024

Anything I can do here to try to resolve this?

from gu-who.

rtyley avatar rtyley commented on August 24, 2024

You can pull the latest version from master and show us the updated log output, though the logging added is pretty minimal, as I'm not sure where else I can meaningfully log info from.

Things that would be helpful, in increasing order of helpfulness, that you may not want to do:

  • Give me the real usernames of the users, and the real name of the org
  • Add me to your people repo, so I can check it's configuration
  • Give me an API key for your GitHub bot account, so I can reproduce your error.

from gu-who.

timmattison avatar timmattison commented on August 24, 2024

The log I posted was from the updated version that day. Can I email you so
this information isn't posted publicly? I am OK with working through this
with you.
On Jun 25, 2014 6:29 PM, "Roberto Tyley" [email protected] wrote:

You can pull the latest version from master and show us the updated log
output, though the logging added is pretty minimal, as I'm not sure where
else I can meaningfully log info from.

Things that would be helpful, in increasing order of helpfulness, that you
may not want to do:

  • Give me the real usernames of the users, and the real name of the org
  • Add me to your people repo, so I can check it's configuration
  • Give me an API key for your GitHub bot account, so I can reproduce
    your error.


Reply to this email directly or view it on GitHub
#21 (comment).

from gu-who.

rtyley avatar rtyley commented on August 24, 2024

The log I posted was from the updated version that day.

It doesn't look like it includes the logging information added with b32ccf5 nine hours ago? Would be good to have a log of that too for reference.

Can I email you so
this information isn't posted publicly? I am OK with working through this
with you.

Sure, that will be easiest (roberto dot tyley at theguardian dot com). Please be aware that by sending me this information you are accept that:

  • I am acting in good faith, and neither I nor my employer will accept any accusation or claim for damages purporting to relate to misuse or mishandling of this information.
  • You are responsible for revoking any credentials you give me after we've finished debugging.

from gu-who.

rtyley avatar rtyley commented on August 24, 2024

Could you do another run with this branch:

https://github.com/guardian/gu-who/compare/wip-tolerate-issue-creation-exception

Again, this is just code to help us diagnose the problem - it just means that an exception creating an issue won't kill the whole of the process - gu:who will attempt to create issues for all the other problem users in your Org. If you could post me the output, it would be interesting to see which users succeed, and which ones fail.

from gu-who.

rtyley avatar rtyley commented on August 24, 2024

@timmattison I've added a little more logging on the wip-tolerate-issue-creation-exception branch with commit 87914f3 in response to your observation that gu:who is only able to create issues for users in your “owners” group - could you run it again and pass me the logging?

from gu-who.

rtyley avatar rtyley commented on August 24, 2024

@timmattison - looks like the all team ended up in a bad state, and that's the root of your problems!

This line from the logs you sent me:

[info] application - 'all' team : permission=pull people-repo-access=false

...indicates that the all team does not have access to the people repository (by default, gu:who sets the all team to have this access when it creates the team), and so those users who aren't owners won't be able to see the people repo, and so can't be assigned issues in it.

As a quick fix, you can just into team management on the all team and add people repo access, this should fix your issue!

Will look into making this more friendly in gu:who.

from gu-who.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.