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

Enabling Payments for GitHub Codespaces for Projects #1009

Closed
TheLarkInn opened this issue Feb 9, 2023 · 27 comments
Closed

Enabling Payments for GitHub Codespaces for Projects #1009

TheLarkInn opened this issue Feb 9, 2023 · 27 comments

Comments

@TheLarkInn
Copy link

TheLarkInn commented Feb 9, 2023

After reviewing the wonderful outcome from #953

Summary

GitHub Codespaces provides an easy way for developers to spin up a fully-featured development environment directly in the GitHub user interface, making it easier for them to contribute to open-source projects. However, the cost of using GitHub Codespaces may be prohibitively expensive. To help these organizations maximize the impact of their work, this issue proposes a program to enable them to receive financial assistance to pay for GitHub Codespaces.

Motivation

The OpenJS Foundation is committed to supporting its projects in their efforts to make a positive difference in the world. By providing a monthly funding for GitHub Codespaces, we can help ensure that all of the Foundation's projects have access to this valuable tool. Additionally, the ability to scale compute on an as-needed basis is crucial for debugging performance-critical and at-scale scenarios, and will help to improve the quality of the projects.

Proposal

To implement this program, the OpenJS Foundation will establish a fund to provide financial assistance to project organizations to pay for GitHub Codespaces. The funding will be a fixed monthly allocation which can be adjusted based on monthly usage and utilization per the organizations request.

The OpenJS Foundation will work closely with GitHub to ensure that the program is implemented smoothly and effectively, and will provide regular updates to the community on its progress and impact.

The following steps will be taken to implement this program:

  1. Develop a process for OpenJS Foundation projects to sign up and be approved for the fixed monthly payment for GitHub Codespaces.
  2. Work with GitHub to set up a billing mechanism to enable the OpenJS Foundation to pay for GitHub Codespaces on behalf of the projects.
  3. Annually/Quarterly report on the impact of the program and make adjustments as necessary to ensure its success.

Benefits

  • Enables those displaced by war, poverty, natural disasters, and/or other hardships access to cloud machines suitable for development.
  • Encourages the use of GitHub Codespaces by all OpenJS Foundation projects, making it easier for them to collaborate and contribute to open-source projects.
  • Allows the projects to take advantage of the ability to scale compute on an as-needed basis for debugging performance-critical and at-scale scenarios.
  • Helps to build stronger relationships between the OpenJS Foundation and GitHub, which is home to a majority (if not all) of Open JS Foundation projects.

Risks

  • The program may not be fully utilized by all OpenJS Foundation projects, in which case the funds set aside for the program may not be fully utilized. Luckily, Codespaces is "pay-as-you-go" so there is no risk to wasting money towards this effort.
  • Codespace could be used for personal computing use and not for the impact of open source contributions. This could be mitigated by org owners using discretion towards who they allow codespace organization access to, in addition to yearly audit of org contribution activity compared to its yearly codespace usage. We should however lead with trust.

Conclusion

This program has the potential to make a significant positive impact on the work of all OpenJS Foundation projects, and we (at webpack) believe that it will be well-received by the community. By providing a fixed monthly payment for GitHub Codespaces, we can help ensure that all projects have access to this valuable tool, regardless of their size or financial resources, and to improve the quality of the projects by allowing for ad hoc scaling compute.

References

@anonrig
Copy link
Member

anonrig commented Feb 9, 2023

Thank you @TheLarkInn for taking the time. I 100% agree with the benefits.

Helps to build stronger relationships between the OpenJS Foundation and GitHub.

This can be an excellent step to access large runners on GitHub too. I opened an issue to Node.js a couple of months ago, but it is still pending due to the lack of a relationship (as far as I know). It might be good to mention it here too. (Referencing: nodejs/node#45345)

Specifically for Node.js, I've had some issues in the past where my computer didn't have enough power to do certain things. Github codespaces were not enough either, but due to the complexity of Node, that's OK. It would be beneficial to have Github Codespaces for JS-based libraries and projects. I'm all in favor of enabling it.

@Trott
Copy link
Contributor

Trott commented Feb 9, 2023

I'm not opposed to this, but want to mention that there are competitors to consider. Gitpod has a free tier and a more full-featured free tier for qualifying open source maintainers . I've used it with some success, but don't have any Codespaces experience with which to compare it.

@abbycabs
Copy link
Contributor

abbycabs commented Feb 9, 2023

Thanks for this proposal @TheLarkInn! Happy to help on the GitHub side to see what we can do here

@RIAEvangelist
Copy link

This is really a really awesome idea. Codespaces fundamentally change how easily available a proper development environment is for those with the skills but not the funds to buy one themselves.

As for the risks, the first is not really a risk, more of a notation as to why such an idea is not a risk; I like that. The second while a very edge case could actually be useful in the VERY VERY unlikely chance it happens because GitHub would then have logs of who could be considered a bad faith actor on the system. To mitigate the darkest of users which again are so rare, one could require that an account using this was over a certain age or activity amount, as in created 2 years ago or x commits per year etc. While I think this is not really needed these are some ideas to mitigate the concern or see the risk as a benefit in the case that anyone gets hung up on it.

@TheLarkInn
Copy link
Author

I'm not opposed to this, but want to mention that there are competitors to consider. Gitpod has a free tier and a more full-featured free tier for qualifying open source maintainers . I've used it with some success, but don't have any Codespaces experience with which to compare it.

This is a great point and I'll spend some time to give it a look!

I think my motivation for GitHub codespaces is that many (if not all?) projects in OpenJS Foundation live on GitHub, and therefore the ability to have Codespaces integrated seamless through multiple phases really appealed to me. Some examples are:

image

  • Checkout on Code Tab of GitHub

image

  • (My favorite) Opening a Codespace on a contributors PR!

image

Perhaps these features are all existing on GitPod, however they don't exist so seamlessly through GitHub as Codespace does today (and potentially in more ways in the future). With that being said I will absolutely give some time to evaluate and learn about GitPod!

@TheLarkInn
Copy link
Author

Thanks for this proposal @TheLarkInn! Happy to help on the GitHub side to see what we can do here

@abbycabs I'd be more than happy for the webpack organization or the webpack-contrib org to be the pilots for this! I have experience setting up customized dev containers for microsoft/rushstack so I'm happy to help with giving some guidance for other projects looking to set it up if we have a good pilot program.

@abbycabs
Copy link
Contributor

abbycabs commented Feb 9, 2023

That's amazing, thanks @TheLarkInn! @craiglpeters (Codespaces PM) and I are super excited to help here.

Codespaces for individuals also has up to 60 hours a month free now -- which is not the same as Gitpod's free tier, but great for new contributors.

@ovflowd
Copy link
Member

ovflowd commented Feb 13, 2023

I forgot to say, but def +1 on my side. It'd be great to code on the cloud whilst making open-source contributions. I even, a while ago, asked on Twitter "why there is no Codespaces for FOSS already?"

@TheLarkInn
Copy link
Author

We want to explore the opportunities for adding the OpenJSF as a billing manager to OpenJSF projects on their GitHub accounts. I'll look to pilot this with webpack and document how this worked out and coordinate with GitHub. Will report back on this in the coming weeks.

@TheLarkInn
Copy link
Author

@bensternthal Just following up here. We could start with a very modest amount ($100) for our codespaces fixed monthly allowance and see how far it gets us. I'll leave it to you to work with Finance and GitHub. Let me know when I need to add an account as a billing manager on the GitHub org.

@bensternthal
Copy link
Contributor

@TheLarkInn Based on how things are setup/organized with our projects in Github and that we want to avoid as much manual work as possible, this is what I think we should try:

  1. I will need to be added to Webpack as a billing manager
  2. We utilize Spendesk (LF already uses them) to create a virtual credit card with a max spend of 100/month
  3. We use that card for Webpack's billing

This makes accounting on our side pretty easy and no one has to put this on a personal card/file expenses. If we decide to roll this out to more projects, we can better operationalize how this works (e.g. use a shared email for billing so I am not a single point of failure, etc..).

What do y'all think?

@mcollina
Copy link
Member

This would be fantastic.

@TheLarkInn
Copy link
Author

@TheLarkInn Based on how things are setup/organized with our projects in Github and that we want to avoid as much manual work as possible, this is what I think we should try:

  1. I will need to be added to Webpack as a billing manager
  2. We utilize Spendesk (LF already uses them) to create a virtual credit card with a max spend of 100/month
  3. We use that card for Webpack's billing

This makes accounting on our side pretty easy and no one has to put this on a personal card/file expenses. If we decide to roll this out to more projects, we can better operationalize how this works (e.g. use a shared email for billing so I am not a single point of failure, etc..).

What do y'all think?

100% on board with this. It looks great. I assume this virtual CC also can change its spend limit so if/as we grow we can adapt on a monthly basis, etc.

Let me know which email I should add as the billing manager on the webpack org. 🚀

@bensternthal
Copy link
Contributor

@TheLarkInn OK this is all setup (I think). The virtual card has been added with a $100 limit per month on codespaces. Do poke around and let me know if you see anything funky.

@abbycabs
Copy link
Contributor

One thing to note with the spending limits -- I know for the larger runners (and probably codespaces), it will let you start a job if you're under the spending limit. However, this last job might cost more than whats left in your limit.

So you might get charged slightly over what you set as a limit. I know some projects add a bit of buffer to the virtual card to prevent any issues with payment.

@bensternthal
Copy link
Contributor

Good call out @abbycabs I requested an extra $10 buffer on the card.

@mcollina
Copy link
Member

In the Node.js org we might need similar setup. We constantly run out of build minutes in our nodejs-private org (the one we use for security work), and it would be better to pay for the overflow.

@bensternthal
Copy link
Contributor

@mcollina If you want to move forward we just need to know what kind of monthly budget you are looking at and for what billable github services (if it's just codespaces etc..)

@abbycabs
Copy link
Contributor

abbycabs commented Apr 4, 2023

It sounds like larger runners would be helpful for the private builds! @mcollina let me know if you need to get flagged into the beta -- I can bump nodejs-private up on the waitlist.

@TheLarkInn
Copy link
Author

@TheLarkInn OK this is all setup (I think). The virtual card has been added with a $100 limit per month on codespaces. Do poke around and let me know if you see anything funky.

Fantastic, I'm just getting back to this so I will review and make sure it all is working here today! Thank you so much!

@TheLarkInn
Copy link
Author

Update here:

We officially (myself included) have been actively using GitHub Codespaces via the webpack org! So far members on our team have given nothing but positive feedback. Thank you so much @bensternthal for the quick turnaround on enabling this.

My next action items are to track the monthly usage for our org. I'll be leveraging to monitor usage and report back on this in the situation that we need to increase our monthly budget.

@joesepi
Copy link
Member

joesepi commented Apr 25, 2023

@bensternthal will monitor. closing issue.

@ovflowd
Copy link
Member

ovflowd commented Jun 8, 2023

@joesepi @bensternthal just circling back, did we update the documentation on this repo of which services we provide?

It would be really useful to update that we offer GitHub Codespaces and which projects have the feature/billing enabled already 👀

@bensternthal
Copy link
Contributor

@ovflowd AFAIK, this has not been documented. As of right now, we are only funding codespaces on Webpack.

@ovflowd
Copy link
Member

ovflowd commented Jun 9, 2023

Can we document this? And the process for a project to request the resources? I can open a new issue for this if that makes sense?

@bensternthal
Copy link
Contributor

@ovflowd yes please open an issue. I'll need some help from the CPC on drafting the documentation.

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

No branches or pull requests

10 participants