-
Notifications
You must be signed in to change notification settings - Fork 6
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
Diff of YML implementations #10
Conversation
…n-files' # Conflicts: # .eslintrc.json # README.md # action.yml # dist/index.js # package-lock.json # package.json # src/main.ts
Ah, I think I wasn't totally clear before, so apologies for that! I'm going to merge What I propose we do to move forward is split out separate pieces of your changes into a few smaller PRs that are branched out from the current To be clear, I'm happy to help execute on all of this - I'll free up some time to revisit this project, thanks to your reminder - so if any of that sounds overwhelming, don't hesitate to reach out about what you're comfortable contributing! |
You can reopen this. I've pushed a commit that should resolve the conflicts. |
"@actions/github": "^2.1.1", | ||
"@octokit/rest": "^16.43.1", | ||
"@actions/core": "^1.4.0", | ||
"@actions/github": "^5.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update from 2.1.1
to 5.0.0
is really critical for me since it doesn't work on Github enterprise without that:
https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md#220
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it - thanks for explaining that! Based on the changelog link you provided, it seems like upgrading to 2.2.0 is sufficient, so I want to start there without switching to a new major version yet (since the major version upgrades could include breaking changes). I've opened a new PR for that upgrade: #14.
Can you give it a try with
steps:
- uses: rmacklin/team-sync@5617c3b5dd662e0b0b35f93bbf4cb46b416c7b0b
in your workflow definition, and let me know if it works on your GitHub Enterprise Server? If so, I'll merge and push a new release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm already running it on my master
branch (which is subject of this PR). So no need for an intermediate step.
I face however a very strange timing issue. I try to sync ~20 teams. but it always fails after the ~15th team with the following error:
Error: HttpError: request to https://<GHES-API>/teams failed, reason: connect ETIMEDOUT
Not sure how to proceed. Especially since it's working ~14 times and then fails...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I've merged #14.
I haven't seen that error personally, but I don't use GitHub Enterprise. Using the action with an organization on github.com, I've seen it sync over 40 teams successfully. It seems possible that a self-hosted GitHub Enterprise deployment may not be able to handle the volume of successive requests to query for team memberships and then add/remove team members accordingly. That's just a guess, though, so I'd suggest cross referencing any monitoring you have in place for the GitHub Enterprise deployment to look for indications that it's timing out because it's unable to handle the load.
To rule out code/dependency changes, you can try reproducing using rmacklin/team-sync@5617c3b5dd662e0b0b35f93bbf4cb46b416c7b0b
rather than the fork, but it seems more likely that it's an issue with the GitHub Enterprise deployment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think it might be necessary to upgrade to @actions/github
to v3.0.0 to pull in actions/toolkit@4a89cf7 (upgrading further includes breaking changes to Octokit, which I'd like to handle separately).
I've upgraded to v3.0.0 here: 042d3b8. If you update your mirror, you can try again with
uses: ghcom-actions/rmacklin-team-sync@042d3b844823ea5ae2a03c23ea55e1c822deab51
.
(I do still suspect that it's more likely an issue with the GitHub Enterprise deployment being overloaded, but this may at least get past the "Bad credentials" error.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must be something on the runner. When running locally it worked on my MichaelSp/team-sync@master
branch.
Haven't checked your branch.
Sorry, but I have to say: I don't see a reason to break this down into pieces.
Why:
- If you write the tests first, they would be for the old API, so you gonna write them twice.
- If you do the upgrade first, you could break things, since you have no tests...
Conclusion: Happy with what I have now.
Digging into the runner now, to see what is wrong there....
Thanks for your early response (very appreciated!), your explanation #9 and for pointing me to the
yml
branch.I found your action on the marketplace while looking for exactly that. We try to make
everything-as-code/data
(tm), so teams on GH must be covered, too!I will try to compare the implementations so we can merge them later, like you suggested.
Overview of what this PR changes compared to
support-yaml-team-configuration
:repo-token
to justtoken
, since it's not really related to the repo.I've moved some of your code into this PR, so we can also close #9