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

Robustness engine actions with stats and log #685

Merged
merged 2 commits into from
Nov 17, 2020

Conversation

redgoat650
Copy link
Contributor

  • Add actions to robustness engine
  • Actions wrap other functional behavior and serve as a common interface for collecting stats
  • Add stats for the engine, both per run and cumulative over time
  • Add a log for actions that the engine has executed
  • Add recovery logic to re-sync snapshot metadata after a possible failed engine run (e.g. if metadata wasn't properly persisted).

Current built-in actions:

  • snapshot root directory
  • restore random snapshot ID into a target restore path
  • delete a random snapshot ID
  • run GC
  • write random files to the local data directory
  • delete a random subdirectory under the local data directory
  • delete files in a directory
  • restore a snapshot ID into the local data directory

Actions are executed according to a set of options, which dictate the relative probabilities of picking a given action, along with ranges for action-specific parameters that can be randomized.

- Add actions to robustness engine
- Actions wrap other functional behavior and serve as a common interface for collecting stats
- Add stats for the engine, both per run and cumulative over time
- Add a log for actions that the engine has executed
- Add recovery logic to re-sync snapshot metadata after a possible failed engine run (e.g. if metadata wasn't properly persisted).

Current built-in actions:
- snapshot root directory
- restore random snapshot ID into a target restore path
- delete a random snapshot ID
- run GC
- write random files to the local data directory
- delete a random subdirectory under the local data directory
- delete files in a directory
- restore a snapshot ID into the local data directory

Actions are executed according to a set of options, which dictate the relative probabilities of picking a given action, along with ranges for action-specific parameters that can be randomized.
@redgoat650
Copy link
Contributor Author

@jkowalski - this is the last of the feature changes associated with #179! 🎉 🎉
Looking forward to closing this out.

Makefile Outdated Show resolved Hide resolved
@@ -205,9 +205,16 @@ endurance-tests: export KOPIA_EXE ?= $(KOPIA_INTEGRATION_EXE)
endurance-tests: build-integration-test-binary $(gotestsum)
$(GO_TEST) $(TEST_FLAGS) -count=1 -parallel $(PARALLEL) -timeout 3600s github.com/kopia/kopia/tests/endurance_test

robustness-tool-tests: $(gotestsum)
robustness-tests: export KOPIA_EXE ?= $(KOPIA_INTEGRATION_EXE)
robustness-tests: build-integration-test-binary $(gotestsum)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@redgoat650 Just confirming, this target is not invoked by default on CI, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@julio-lopez That's correct. The tool tests are invoked under the travis-release target, but the robustness-tests target is only invoked manually

@julio-lopez julio-lopez merged commit 71dcbcf into kopia:master Nov 17, 2020
@julio-lopez julio-lopez deleted the robustness-engine-actions branch November 17, 2020 09:07
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

3 participants