Skip to content

Commit

Permalink
Include guidelines for contributing porting config
Browse files Browse the repository at this point in the history
  • Loading branch information
tylergu authored Mar 8, 2024
1 parent 4d0692f commit f2b149d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/port.md
Original file line number Diff line number Diff line change
Expand Up @@ -1068,3 +1068,19 @@ Looking at the [generation-002-runtime.json](alarm_examples/false_alarm/generati
This indicates that Acto expects a corresponding system state change for the input delta of path `spec.ephemeral.emptydirvolumesource.sizeLimit`. To understand the operator’s behavior, we trace through the operator source. We can see that the property has a control-flow dependency on another property: https://github.com/pravega/zookeeper-operator/blob/9fc6151757018cd99acd7b73c24870dce24ba3d5/pkg/zk/generators.go#L48C1-L52C54. And in the CR generated by Acto, the property `spec.storageType` is set to `persistent` instead of `ephemeral`.

This alarm is thus a false alarm. The operator’s behavior is correct. It did not update the system state because the storageType is not set to `ephemeral`. Acto raised this alarm because it fails to recognize the control-flow dependency among the properties `spec.ephemeral.emptydirvolumesource.sizeLimit` and `spec.storageType`.

## Contributing the Porting Config
After you have inspected the alarms, you have successfully ported and tested an operator using Acto. Congratulations! As you may already experience, porting an operator is non-trivial effort, and sharing the porting config would allow others to directly test the operators.

To contribute your porting config to Acto, please create a directory under Acto’s data directory named as {OWNER}\_{REPO\_NAME} (e.g., pravega\_zookeeper-operator for [https://github.com/pravega/zookeeper-operator](https://github.com/pravega/zookeeper-operator)). Inside the create directory, please upload the following assets:

* YAML files required to deploy the operator
* Seed CR file
* The config.json file for porting the operator (please remember to change the file paths to reflect the correct relative path from acto’s root directory)
* The `context.json` file produced by Acto's learning run

To avoid conflict with other students porting the same operator, please name the Seed CR file as {SYSTEM\_NAME}-cr.yaml and the config file as {SYSTEM\_NAME}-config.json . For example, pd-cr.yaml and pd-config.json for porting the pd system for the tidb-operator.

There are plenty existing examples for reference in the current data directory: [https://github.com/xlab-uiuc/acto/tree/main/data](https://github.com/xlab-uiuc/acto/tree/main/data). You may notice that your operator already has a corresponding directory under the data directory (e.g. [https://github.com/xlab-uiuc/acto/tree/main/data/cass-operator](https://github.com/xlab-uiuc/acto/tree/main/data/cass-operator) for the k8ssandra/cass-operator). Please just ignore the existing porting directories and create your own. The existing ones do not follow the {OWNER}\_{REPO\_NAME} naming convention, thus would not conflict with your porting directory.

Please open a PR to Acto’s repository with the above changes: https://github.com/xlab-uiuc/acto/pulls

0 comments on commit f2b149d

Please sign in to comment.