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

Learning Tuesday: Create dev container #229

Closed
wants to merge 1 commit into from

Conversation

mbussolotto
Copy link
Member

@mbussolotto mbussolotto commented Apr 2, 2024

What does this PR change?

  • setup dev container
  • create dev container during PR

Example: mbussolotto#4: clicking on Create Codespace it's possible to create a golang container environment where compile, run unit test and change the code. Container timeout and retention it's a user setting https://github.com/settings/codespaces.

All personal GitHub.com accounts include a monthly quota of free usage each month. GitHub will provide users in the Free plan 120 core hours, or 60 hours of run time on a 2 core codespace, plus 15 GB of storage each month.

Test coverage

  • No tests: add explanation

  • No tests: already covered

  • Unit tests were added

  • DONE

Links

Issue(s): #

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Before you merge

Check How to branch and merge properly!

@mbussolotto mbussolotto force-pushed the devcontainer branch 2 times, most recently from b031850 to 49fd009 Compare April 2, 2024 15:58
@mbussolotto mbussolotto marked this pull request as ready for review April 2, 2024 16:11
@mbussolotto mbussolotto changed the title Create dev container Learning Tuesday: Create dev container Apr 2, 2024
@mbussolotto mbussolotto requested review from cbosdo and removed request for cbosdo April 2, 2024 16:13
@mbussolotto mbussolotto marked this pull request as draft April 2, 2024 16:13
@mbussolotto
Copy link
Member Author

@cbosdo , @rjmateus @juliogonzalez what do you think? I had this test with uyuni-tools, but my idea is to try to do something similar for uyuni: the goal would be have a quick online environment that can be used e.g. in cause of unit-test and/or linting test failures

@cbosdo
Copy link
Contributor

cbosdo commented Apr 2, 2024

Is it possible to preload the go dependencies? they take a while to download. But that seems cool for newcomers.
Also I would add a link to the codespaces pricing and getting started doc: closing the browser tab is not enough to stop the created codespace...

@mbussolotto
Copy link
Member Author

Is it possible to preload the go dependencies?

yes, it's possible, and it can be done in different ways: I just need to understand which is the best way for our scenario. This would be also more important for uyuni repo.

@mbussolotto
Copy link
Member Author

mbussolotto commented Apr 3, 2024

closing the browser tab is not enough to stop the created codespace...

IIUC when you close the tab, the container will be idle and you can set Default idle timeout here https://github.com/settings/codespaces . But I need to do more test on it

@rjmateus
Copy link
Member

rjmateus commented Apr 3, 2024

it looks really cool :)

@juliogonzalez
Copy link
Member

Is it possible to preload the go dependencies? they take a while to download. But that seems cool for newcomers. Also I would add a link to the codespaces pricing and getting started doc: closing the browser tab is not enough to stop the created codespace...

I am testing this... how can we stop the codespace? :-D

@juliogonzalez
Copy link
Member

Is it possible to preload the go dependencies? they take a while to download. But that seems cool for newcomers. Also I would add a link to the codespaces pricing and getting started doc: closing the browser tab is not enough to stop the created codespace...

I am testing this... how can we stop the codespace? :-D

Not sure if I did it somehow, or I was just idle for enough time, but...

imagen

Copy link
Member

@juliogonzalez juliogonzalez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea looks cool! And I'd start implementing it here, and then I'd think of Uyuni as you told. And if for whatever reason we can't use it there, we can always use it here and at other repos.

See if you can preload go dependencies as Cedric requested.

But again, idea is great!

## Codespace
<!-- Button to create CodeSpace -->

[![Create CodeSpace](https://img.shields.io/badge/Create-CodeSpace-blue.svg)](https://codespaces.new/uyuni-project/uyuni-tools)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Cedric mention, see please add info about the prices, as it's relevant.

When I launched it, it told me my user was going to pay for it, in such case it means the standard limit for most users will be 180 core hours/month as explained at https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces (and 15GB storage). Thats 22,5 days per month at 8 hours per day). Assuming the machine used has only one core, otherwise it's less.

If the user is Pro, then then more resources are assigned.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also a link to the "getting started doc".

@@ -0,0 +1 @@
add devcontainer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need a changelog for this :-?

@mbussolotto mbussolotto force-pushed the devcontainer branch 3 times, most recently from 6ea7ec0 to a7f138f Compare May 7, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants