bernardodemarco commented on code in PR #14872: URL: https://github.com/apache/cloudstack/pull/14872#discussion_r4709233222
########## AGENTS.md: ########## @@ -30,3 +30,133 @@ Agents that scan this repository should consult `SECURITY.md` and the threat model it links before reporting issues. The project-wide security threat model is linked from `SECURITY.md`. + +## Repository layout + +| Path | Contents | +|------------------|-------------------------------------------------| +| `api/` | API interfaces, `*Cmd` and `*Response` classes | +| `server/` | Manager implementations (business logic) | +| `engine/schema/` | VO and DAO classes, DB schema and upgrade SQL | +| `framework/` | Config, DB, security, async jobs | +| `plugins/` | Hypervisors, storage, network, extensions | Review Comment: ```suggestion | `plugins/` | Hypervisors, storage, network, backup implementations, extensions | ``` ########## AGENTS.md: ########## @@ -30,3 +30,133 @@ Agents that scan this repository should consult `SECURITY.md` and the threat model it links before reporting issues. The project-wide security threat model is linked from `SECURITY.md`. + +## Repository layout + +| Path | Contents | +|------------------|-------------------------------------------------| +| `api/` | API interfaces, `*Cmd` and `*Response` classes | +| `server/` | Manager implementations (business logic) | +| `engine/schema/` | VO and DAO classes, DB schema and upgrade SQL | +| `framework/` | Config, DB, security, async jobs | +| `plugins/` | Hypervisors, storage, network, extensions | +| `core/` | Shared DTOs, agent `Command`/`Answer` classes | +| `ui/` | Vue.js 3 + Ant Design frontend | +| `client/` | Uber-jar; include it in every incremental build | +| `test/` | Marvin integration tests | + +## Build and test + +```bash +# Full build (slow) +mvn clean install -Dnoredist -P developer,systemvm -DskipTests -T8 +# Incremental build (slow) +mvn clean install -Dnoredist -P developer,systemvm -pl api,server,engine/schema,client -DskipTests +# Deploy DB (fast) +mvn -Pdeveloper -pl developer -Ddeploydb +# Run the management server +mvn -pl :cloud-client-ui jetty:run -Dnoredist -Djava.net.preferIPv4Stack=true +# Single unit test (fast) +mvn test -pl server -Dtest=FooManagerImplTest +# Lint and license checks +pre-commit run --all-files +``` + +- Always include `client` in an incremental build. +- In a linked `git worktree`, add `-Dmaven.gitcommitid.skip=true`. +- Don't build offline (`-o`); `engine/schema` downloads files. +- Run `pre-commit` before opening a PR. +- Report test results as they are, including failures. + +## Code conventions + +- Add the Apache License 2.0 header to every new file. +- Name VO getters and setters exactly after their fields. +- Use `get`, not `is`, for boolean getters. +- Give VO classes an empty constructor. +- Generate the UUID in the VO constructor. +- Use singular table names. +- Don't redeclare inherited parameters. +- Add global settings as `ConfigKey`s, not as `Config` enum entries. +- Declare a `ConfigKey` on the service interface, not on the `*Impl`. +- Touch as few interfaces as possible when adding settings. +- Put schema changes in the versioned upgrade path under `engine/schema`. +- Never edit an already released upgrade script. Review Comment: It would be nice to add some instructions about logs, unit tests and modularization (some agents write gigantic methods...) ########## AGENTS.md: ########## @@ -30,3 +30,133 @@ Agents that scan this repository should consult `SECURITY.md` and the threat model it links before reporting issues. The project-wide security threat model is linked from `SECURITY.md`. + +## Repository layout + +| Path | Contents | +|------------------|-------------------------------------------------| +| `api/` | API interfaces, `*Cmd` and `*Response` classes | +| `server/` | Manager implementations (business logic) | +| `engine/schema/` | VO and DAO classes, DB schema and upgrade SQL | +| `framework/` | Config, DB, security, async jobs | +| `plugins/` | Hypervisors, storage, network, extensions | +| `core/` | Shared DTOs, agent `Command`/`Answer` classes | +| `ui/` | Vue.js 3 + Ant Design frontend | +| `client/` | Uber-jar; include it in every incremental build | +| `test/` | Marvin integration tests | + +## Build and test + +```bash +# Full build (slow) +mvn clean install -Dnoredist -P developer,systemvm -DskipTests -T8 +# Incremental build (slow) +mvn clean install -Dnoredist -P developer,systemvm -pl api,server,engine/schema,client -DskipTests +# Deploy DB (fast) +mvn -Pdeveloper -pl developer -Ddeploydb +# Run the management server +mvn -pl :cloud-client-ui jetty:run -Dnoredist -Djava.net.preferIPv4Stack=true +# Single unit test (fast) +mvn test -pl server -Dtest=FooManagerImplTest +# Lint and license checks +pre-commit run --all-files +``` Review Comment: Should we add instructions on how to run and build the front-end? And what about the Java version and others? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
