shivamgoel commented on code in PR #43841:
URL: https://github.com/apache/superset/pull/43841#discussion_r3936322074


##########
.github/workflows/check-openapi-spec-drift.yml:
##########
@@ -0,0 +1,71 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+name: Check OpenAPI spec drift
+on:
+  push:
+    branches:
+      - "master"
+      - "[0-9].[0-9]*"
+  pull_request:
+    types: [synchronize, opened, reopened, ready_for_review]
+
+# No `paths:` filter on purpose, matching enforce-single-migration-head: a
+# required check that never runs for a given PR blocks that PR forever. The
+# job is ~10s, so it fires on every PR rather than guessing which file edits
+# can move the spec.
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || 
github.run_id }}
+  cancel-in-progress: true
+
+permissions:
+  contents: read
+
+jobs:
+  check-openapi-spec-drift:
+    runs-on: ubuntu-26.04
+    steps:
+      - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
+        with:
+          persist-credentials: false
+      - name: Setup Python
+        uses: ./.github/actions/setup-backend/
+        with:
+          # base.txt pins apispec, which decides the generated output: 6.10.0
+          # renders marshmallow 4's unknown=RAISE as "additionalProperties":
+          # false while the pinned 6.6.1 does not. Regenerating off-pin
+          # produces a spec no CI run can reproduce.
+          requirements-type: base
+      - name: Regenerate the spec
+        env:
+          # No SUPERSET_CONFIG_PATH: the published spec documents the routes a
+          # default deployment registers. A config enabling feature flags adds
+          # paths that would 404 for everyone who has not enabled them.
+          SUPERSET__SQLALCHEMY_DATABASE_URI: "sqlite:///:memory:"
+          FLASK_APP: "superset.app:create_app()"
+        run: superset update-api-docs

Review Comment:
   Good catch — fixed in the update-api-docs CLI rather than the workflow, so 
every caller fails not just this guard.



-- 
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]

Reply via email to