You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2026/10/19 05:36:49 UTC

[PR] Add YAML Dag schema publishing infra [airflow]

uranusjr opened a new pull request, #75055:
URL: https://github.com/apache/airflow/pull/75055

   (no comment)


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add YAML Dag schema publishing infra [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on code in PR #75055:
URL: https://github.com/apache/airflow/pull/75055#discussion_r4314055688


##########
scripts/ci/prek/generate_yaml_importer_schema.py:
##########
@@ -49,6 +50,7 @@ def build_schema() -> str:
     head = get_bundle().versions[0].value  # newest-first
     schema = DagDocument.model_json_schema(by_alias=True)
     schema["$schema"] = "https://json-schema.org/draft/2020-12/schema"
+    schema["$id"] = schema_from_version(head)

Review Comment:
   With `$id` set, the committed `schema.json` now contains both `$schema` and the Dag URL prefix, so it passes the `might_contain_dag` sniff in importer.py (`b"$schema" in data and _DAG_SCHEMA_PREFIX in data`). That's the exact case the comment above `_DAG_SCHEMA_PREFIX` says the sniff is there to skip. It only matters when someone adds `.json` to the importer's `extensions` (which yaml-dags.rst suggests for JSON documents) and keeps a copy of the schema in the bundle, but then the schema file shows up as a parse error ("is not a canonical schema URL"). Could the sniff match the prefix as the value of `$schema`, e.g. `rb'\$schema["\']?\s*:\s*["\']?' + re.escape(_DAG_SCHEMA_PREFIX)`, rather than anywhere in the file?



##########
dev/breeze/src/airflow_breeze/utils/publish_docs_to_s3.py:
##########
@@ -398,6 +398,7 @@ def add_redirect(self, path: str):
 SCHEMA_VERSION_FIELDS: dict[str, str] = {
     "execution-api": "info.version",
     "supervisor-schema": "api_version",
+    "dag": "$id",

Review Comment:
   The comment above this map still says each field carries the version date, but `$id` is the full URL, and the `"/" in version` strip below now runs for every schema type. Maybe mention the URL case in that comment and only strip for `dag`?



##########
dev/breeze/src/airflow_breeze/commands/release_management_commands.py:
##########
@@ -4917,6 +4917,12 @@ def publish_docs_to_s3(
     help="Path to the generated Supervisor schema JSON file.",
     type=click.Path(exists=True, dir_okay=False, path_type=Path),
 )
+@click.option(
+    "--dag",
+    "dag",

Review Comment:
   Nit: click already derives `dag` from `--dag`, and the two sibling options don't pass the name.
   
   ```suggestion
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add YAML Dag schema publishing infra [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #75055:
URL: https://github.com/apache/airflow/pull/75055#issuecomment-6298155776

   ### Backport successfully created: v3-4-test
   
   Note: As of [Merging PRs targeted for Airflow 3.X](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x)
   the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.
   
   In matter of doubt please ask in [#release-management](https://apache-airflow.slack.com/archives/C03G9H97MM2) Slack channel.
   
   <table>
           <tr>
           <th>Status</th>
           <th>Branch</th>
           <th>Result</th>
       </tr>
       <tr>
           <td>✅</td>
           <td>v3-4-test</td>
           <td><a href="https://github.com/apache/airflow/pull/75241"><img src="https://img.shields.io/badge/PR-75241-blue" alt="PR Link"></a></td>
       </tr>
   </table>


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add YAML Dag schema publishing infra [airflow]

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr merged PR #75055:
URL: https://github.com/apache/airflow/pull/75055


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org