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

feat(test-tooling): utility function prune-docker-all-if-github-action #696

Closed
petermetz opened this issue Mar 20, 2021 · 1 comment · Fixed by #697
Closed

feat(test-tooling): utility function prune-docker-all-if-github-action #696

petermetz opened this issue Mar 20, 2021 · 1 comment · Fixed by #697
Assignees

Comments

@petermetz
Copy link
Contributor

Description

As a contributor I want to have a convenience function to call when I need to clean up before and after my test cases so that I'm more productive when working on Cactus.

Depends on #694

Acceptance Criteria

  1. Abstract away the detection algorithm's details regarding how we detect if it's a GitHub Action or not that is running the code
  2. Provide adequate code documentation that also explains that this is a development only utility function.

cc: @takeutak @sfuji822 @hartm @jonathan-m-hamilton @AzaharaC @jordigiam @kikoncuo @jagpreetsinghsasan

@petermetz petermetz self-assigned this Mar 20, 2021
@github-actions
Copy link

⏳ Alright! Looks like we need to wait for some dependencies:

💡 Don't worry, I will continue watching the list above and keep this comment updated. To add or remove a dependency please update this issue/PR description.

Brought to you by Dependent Issues (:robot: ). Happy coding!

petermetz added a commit to petermetz/cacti that referenced this issue Mar 22, 2021
…edger-cacti#696

Primary change
--------------

Added a convenience function that tests can call in order to easily
get rid of dangling docker resources that could be eating up the
file system's available space on disk (which is an issue that we've
started hitting more and more as we kept increasing the number
of test cases that use containers for end to end testing).
A good problem to have but nevertheless it is a problem that we
need to be vigilant about cleaning up after our test cases to avoid
overusing the resources of the CI runner.

Miscellaneous change(s)
-----------------------

Also added another utility function to determine if the current code
is being executed in a GitHub Action Workflow runner or not.
The presence and value of an environment variable is used to
achieve this feat so it definitely is not bullet proof but the trade-
off seemed fair given that these utility functions are only meant to
be used by the test code anyway.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit to petermetz/cacti that referenced this issue Mar 22, 2021
…edger-cacti#696

Primary change
--------------

Added a convenience function that tests can call in order to easily
get rid of dangling docker resources that could be eating up the
file system's available space on disk (which is an issue that we've
started hitting more and more as we kept increasing the number
of test cases that use containers for end to end testing).
A good problem to have but nevertheless it is a problem that we
need to be vigilant about cleaning up after our test cases to avoid
overusing the resources of the CI runner.

Miscellaneous change(s)
-----------------------

Also added another utility function to determine if the current code
is being executed in a GitHub Action Workflow runner or not.
The presence and value of an environment variable is used to
achieve this feat so it definitely is not bullet proof but the trade-
off seemed fair given that these utility functions are only meant to
be used by the test code anyway.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit that referenced this issue Mar 23, 2021
Primary change
--------------

Added a convenience function that tests can call in order to easily
get rid of dangling docker resources that could be eating up the
file system's available space on disk (which is an issue that we've
started hitting more and more as we kept increasing the number
of test cases that use containers for end to end testing).
A good problem to have but nevertheless it is a problem that we
need to be vigilant about cleaning up after our test cases to avoid
overusing the resources of the CI runner.

Miscellaneous change(s)
-----------------------

Also added another utility function to determine if the current code
is being executed in a GitHub Action Workflow runner or not.
The presence and value of an environment variable is used to
achieve this feat so it definitely is not bullet proof but the trade-
off seemed fair given that these utility functions are only meant to
be used by the test code anyway.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
jordigiam pushed a commit to kikoncuo/cactus that referenced this issue Apr 8, 2021
…edger-cacti#696

Primary change
--------------

Added a convenience function that tests can call in order to easily
get rid of dangling docker resources that could be eating up the
file system's available space on disk (which is an issue that we've
started hitting more and more as we kept increasing the number
of test cases that use containers for end to end testing).
A good problem to have but nevertheless it is a problem that we
need to be vigilant about cleaning up after our test cases to avoid
overusing the resources of the CI runner.

Miscellaneous change(s)
-----------------------

Also added another utility function to determine if the current code
is being executed in a GitHub Action Workflow runner or not.
The presence and value of an environment variable is used to
achieve this feat so it definitely is not bullet proof but the trade-
off seemed fair given that these utility functions are only meant to
be used by the test code anyway.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant