SEPURI-SAI-KRISHNA opened a new pull request, #45262:
URL: https://github.com/apache/superset/pull/45262
### SUMMARY
`check-openapi-spec-drift` is failing on master. #45071 added a `409`
response
to the three semantic delete endpoints but did not regenerate the published
spec, so `docs/static/resources/openapi.json` is stale.
This is the output of the command CI prints in its own error message:
```bash
SUPERSET__SQLALCHEMY_DATABASE_URI='sqlite:///:memory:'
FLASK_APP='superset.app:create_app()' superset update-api-docs
```
Nothing hand-edited. The diff is 168 added lines and no removals: one `409`
block on each of the three endpoints that gained one.
| endpoint | description |
|---|---|
| `DELETE /api/v1/semantic_layer/{uuid}` | Semantic layer has dependent
assets |
| `DELETE /api/v1/semantic_view/` | A semantic view has dependent assets |
| `DELETE /api/v1/semantic_view/{pk}` | Semantic view has dependent assets |
Each matches the docstring in `superset/semantic_layers/api.py`.
The check is deliberately not filtered by `paths`, so while master is stale
it
fails on every open pull request, not just ones touching the API.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before, on master at `7f1bfaba4b`:
```
##[error]docs/static/resources/openapi.json is stale. Regenerate it on the
pinned requirements:
docs/static/resources/openapi.json | 168
+++++++++++++++++++++++++++++++++++++
Process completed with exit code 1.
```
After: the regeneration step leaves no diff and the job passes.
### TESTING INSTRUCTIONS
Regenerate the spec and confirm the working tree stays clean:
```bash
SUPERSET__SQLALCHEMY_DATABASE_URI='sqlite:///:memory:'
FLASK_APP='superset.app:create_app()' superset update-api-docs
git diff --stat -- docs/static/resources/openapi.json
```
That is the same assertion `check-openapi-spec-drift` makes. Running it twice
in a row produces an identical file, so the output is stable.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
Generated on the pinned `apispec==6.6.1` and `marshmallow==4.3.1`. As a
control
I ran the same command on `e9862fb4ab`, the last commit before #45071, and it
reproduced the committed spec byte for byte.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]