Github Foundations · Free Practice Question Medium

Question 7

You oversee GitHub Codespaces usage in your team and have been tasked with optimizing costs. How can you reduce costs while ensuring efficient resource utilization?

  • A

    ask the team to start using github.dev instead of codespaces to test your applications

  • B

    reduce the default retention period for automatic deletion of codespaces

  • C

    add the codespaces to a Project and create a workflow to delete the codespaces when an issue is closed

  • D

    ask your developers to create a GitHub Free account so they can use the free tier of codespaces

Reveal correct answer

Correct answer: B

Explanation

Inactive codespaces are automatically deleted. You can choose how long your stopped codespaces are retained, up to a maximum of 30 days. However, because GitHub Codespaces incurs storage charges, you may prefer to reduce the retention period by changing your default period in your personal settings for GitHub Codespaces.

*******************

WRONG ANSWERS:

  • github.dev is just a code editor and does not provide the same benefits of using a codespace

  • you can't add a codespace to a project and link it to an issue so it's deleted automatically

  • asking developers to use personal accounts isn't very collaborative. Additionally, the free tier limits codespace use.

https://docs.github.com/en/codespaces/setting-your-user-preferences/configuring-automatic-deletion-of-your-codespaces

A. Using github.dev instead of codespaces may not directly reduce costs or optimize resource utilization. While github.dev is a lightweight editor for quick edits, it may not provide the full functionality and environment needed for comprehensive testing and development, potentially impacting efficiency.

B. By reducing the default retention period for automatic deletion of codespaces, you can ensure that unused codespaces are deleted sooner, thus reducing costs associated with idle resources. This optimization helps in efficient resource utilization by only keeping active codespaces for the necessary duration.

C. Adding codespaces to a Project and creating a workflow to delete them when an issue is closed may help in managing resources, but it may not be the most effective way to optimize costs. This approach relies on manual intervention and may not address all instances of unused or idle codespaces, potentially leading to unnecessary expenses.

D. Asking developers to create a GitHub Free account to use the free tier of codespaces may not be the best solution for optimizing costs. The free tier may have limitations that could impact the team's workflow, and it may not provide the necessary resources for efficient development and testing, potentially hindering productivity.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need