Skip to content

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

Open

Description

@pllim

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.

Activity

  1. pllim commented on Sep 21, 2023

    @pllim
    MemberAuthor

    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)

  2. pllim commented on Nov 1, 2023

    @pllim
    MemberAuthor

    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']
    
  3. mwcraig commented on Nov 2, 2023

    @mwcraig
    Member

    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....

  4. mwcraig commented on Nov 2, 2023

    @mwcraig
    Member

    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....

  5. pllim commented on Nov 3, 2023

    @pllim
    MemberAuthor

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

  6. 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)[/+] on Nov 27, 2023
  7. pllim commented on Nov 27, 2023

    @pllim
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions