GH-200 practice question 8 of 15

Disabling a workflow allows you to stop a workflow from being triggered without having to delete the file from the repo. In which scenarios would temporarily disabling a workflow be most useful? (Choose two.)

Full set: 100 questions
Answer options
A: A workflow sends requests to a service that is down. Correct answer
B: A workflow error produces too many, or wrong, requests, impacting external services negatively. Correct answer
C: A workflow is configured to run on self-hosted runners
D: A workflow needs to be changed from running on a schedule to a manual trigger
E: A runner needs to have diagnostic logging enabled.
Correct Answer:
A. A workflow sends requests to a service that is down.; B. A workflow error produces too many, or wrong, requests, impacting external services negatively.
Explanation

Disabling a workflow is a temporary measure to stop its execution without deleting the workflow file. This is ideal for situations where the workflow is causing issues or cannot run successfully due to external factors. If a dependent service is down, disabling the workflow prevents repeated failures. Similarly, if a bug in the workflow is causing harmful requests (e.g., excessive API calls), disabling it immediately mitigates the impact while a fix is developed.

Why Incorrect

C. The type of runner used is irrelevant to the decision to disable a workflow; workflows on any runner type might need to be disabled for valid reasons.
D. Changing a trigger type is a code modification to the workflow's YAML file, not a reason for temporarily disabling it.
E. Enabling diagnostic logging is a debugging action for a specific run, not a reason to stop all future triggers of the workflow.

References

- GitHub Docs. (2024). "Disabling and enabling a workflow." In Managing workflow runs. Retrieved from https://docs.github.com/en/actions/managing-workflow-runs/disabling-and-enabling-a-workflow. The documentation states, "You might want to temporarily disable a workflow... For example... A workflow is triggering too often and creating too many requests... A workflow is sending requests to an external service that is down."

Scroll to Top