Skip to content

Commit

Permalink
Rename schema job to be more clear about its purpose
Browse files Browse the repository at this point in the history
The make target fails when it detects schema changes, not when schema is invalid.

Also update CONTRIBUTING.md to include information about zuul jobs.
  • Loading branch information
kdelee committed Nov 20, 2018
1 parent 0c1a443 commit ca84d31
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,23 @@ Sometimes it might take us a while to fully review your PR. We try to keep the `

All submitted PRs will have the linter and unit tests run against them via Zuul, and the status reported in the PR.

## PR Checks ran by Zuul
Zuul jobs for awx are defined in the [zuul-jobs](https://github.com/ansible/zuul-jobs) repo.

Zuul runs the following checks that must pass:
1) `tox-awx-api-lint`
2) `tox-awx-ui-lint`
3) `tox-awx-api`
4) `tox-awx-ui`
5) `tox-awx-swagger`

Zuul runs the following checks that are non-voting (can not pass but serve to inform PR reviewers):
1) `tox-awx-detect-schema-change`
This check generates the schema and diffs it against a reference copy of the `devel` version of the schema.
Reviewers should inspect the `job-output.txt.gz` related to the check if their is a failure (grep for `diff -u -b` to find beginning of diff).
If the schema change is expected and makes sense in relation to the changes made by the PR, then you are good to go!
If not, the schema changes should be fixed, but this decision must be enforced by reviewers.

## Reporting Issues

We welcome your feedback, and encourage you to file an issue when you run into a problem. But before opening a new issues, we ask that you please view our [Issues guide](./ISSUES.md).
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ docker-compose-genschema:
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm --service-ports awx /start_tests.sh genschema
mv swagger.json schema.json

docker-compose-validate-schema:
docker-compose-detect-schema-change:
$(MAKE) docker-compose-genschema
curl https://s3.amazonaws.com/awx-public-ci-files/schema.json -o reference-schema.json
# Ignore differences in whitespace with -b
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ envlist =
api,
ui,
swagger,
validate-schema,
detect-schema-change,

[testenv]
;basepython = python2.7
Expand Down Expand Up @@ -73,9 +73,9 @@ commands =
make docker-compose-build
make docker-compose-build-swagger

[testenv:validate-schema]
[testenv:detect-schema-change]
deps =
nodeenv
commands =
make docker-compose-build
make docker-compose-validate-schema
make docker-compose-detect-schema-change

0 comments on commit ca84d31

Please sign in to comment.