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

Invite organization members based on merged PRs: Not working out so well (currentled DISABLED) #178

Open
pllim opened this issue Sep 12, 2023 · 6 comments
Labels

Comments

@pllim
Copy link
Member

pllim commented Sep 12, 2023

https://github.com/astropy/astropy-tools/actions/workflows/update_org_members.yml

It silently stopped working last month. I don't want another cron job to babysit. We need to figure out how to have it run unsupervised and actively tell us when something isn't right. And when it does run successfully, a status report on who was invited would be nice.

I don't think GitHub Actions is the right home for this because:

  • GitHub stops it if we stop modifying it.
  • We cannot control who GitHub notifies. Whoever last touched the file is the person notified. If this person does not check notification or does not care, things fall through the crack.
@pllim
Copy link
Member Author

pllim commented Sep 21, 2023

Now it is failing. Not sure why. Maybe server spam filter?

A connection-level exception occurred: HTTPSConnectionPool(host='api.github.com', port=443): Read timed out. (read timeout=10)

@pllim
Copy link
Member Author

pllim commented Nov 1, 2023

Latest failure: https://github.com/astropy/astropy-tools/actions/runs/6713077556/job/18243951028

  File "astropy-tools/add_contributors_to_org.py", line 206, in send_invitations
    self.org.add_or_update_membership(person, role='member')
  File "github3/decorators.py", line 24, in auth_wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "github3/orgs.py", line 456, in add_or_update_membership
    json = self._json(self._put(url, json=data), 200)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "github3/models.py", line 161, in _json
    raise exceptions.error_for(response)
github3.exceptions.UnprocessableEntity: 422 The request could not be processed.
	 Adding these people from repository astroquery to the invite list for the org astropy: 
		['0Armaan025', 'saakshii12']

@mwcraig
Copy link
Member

mwcraig commented Nov 2, 2023

I'm guessing as to the cause of the failure, but it may be that the token it is using has expired. I don't recall whether github tokens always have an expiration date or not.

That would be an another argument for handling this another way....

@mwcraig
Copy link
Member

mwcraig commented Nov 2, 2023

I don't think GitHub Actions is the right home for this because:

That may well be the case. The problem it was trying to solve was that for coordinated packages to assign roles or reviews to new-ish contributors they have to be part of the astropy GitHub org first. This was an attempt to automate that to avoid needing a CoCo person to regularly add folks to the org.

It may be infrequent enough that it isn't work worrying about, or that manually running the script every X months will be easier.

The run logs have some record of who was sent an invitation but that isn't exactly accessible....

@pllim
Copy link
Member Author

pllim commented Nov 3, 2023

A cron job on dedicated machine might work better but that introduces a single point of failure. 🤷

@pllim pllim changed the title Invite organization members based on merged PRs: Not working out so well Invite organization members based on merged PRs: Not working out so well (currentled DISABLED) Nov 27, 2023
@pllim
Copy link
Member Author

pllim commented Nov 27, 2023

It keeps spamming me about failing but I have no time to think about this, so I am disabling it until someone can come to fix this for real.

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

2 participants