You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2026/02/17 12:30:30 UTC
[PR] Allow to use short SPDX licence identifier for selected files [airflow]
potiuk opened a new pull request, #62073:
URL: https://github.com/apache/airflow/pull/62073
While we have some discussion on-going whether we should use some shorter, machine-readable friendly versions of licence specification in our source code headers here [1], the notion is that:
a) PMC can make judgment calls when to include different versions of
the licence
b) This expectation only applies to the code we actually release
in our official releases.
This change makes some judgment call on using much shorter, SPDX driven licence headers in some specific files:
* markdown files that are intended to be consumed by agents (AGENTS.md, SKILLS.md, CLAUDE.md and so on)
* all the markdown .github/* files that are clearly meta-data for GitHub and which we exclude from released sources
We also make sure all those files are excluded from the official source releases and distribution packages we prepare.
[1] https://lists.apache.org/thread/j1tn63r2lf13v3d1tnnqff8fkcl4nx53
<!--
Thank you for contributing!
Please provide above a brief description of the changes made in this pull request.
Write a good git commit message following this guide: http://chris.beams.io/posts/git-commit/
Please make sure that your code changes are covered with tests.
And in case of new features or big changes remember to adjust the documentation.
Feel free to ping (in general) for the review if you do not see reaction for a few days
(72 Hours is the minimum reaction time you can expect from volunteers) - we sometimes miss notifications.
In case of an existing issue, reference it using one of the following:
* closes: #ISSUE
* related: #ISSUE
-->
---
##### Was generative AI tooling used to co-author this PR?
<!--
If generative AI tooling has been used in the process of authoring this PR, please
change below checkbox to `[X]` followed by the name of the tool, uncomment the "Generated-by".
-->
- [ ] Yes (please specify the tool below)
<!--
Generated-by: [Tool Name] following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
-->
---
* Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
* For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
* When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
* For significant user-facing changes create newsfragment: `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
--
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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #62073:
URL: https://github.com/apache/airflow/pull/62073#issuecomment-3921885003
> @potiuk @jscheffl Please, _please_, don't use an incompatible format!
>
> The line
> > `<!-- SPDX-License-Identifier: Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0 -->`
>
> will break every license parser in existence.
>
> After the `SPDX-License-Identifier:`, an SPDX license expression is expected. See the [guidelines](https://spdx.github.io/using/license-id-in-source/), which in SPDXv2 used to be part of the specification that is an ISO standard [here](https://spdx.github.io/spdx-spec/v2.3/using-SPDX-short-identifiers-in-source-files/).
>
> If you need to put the license URL, please put it on a separate line.
>
> Personally, I don't believe it's needed, since `SPDX-License-Identifier: Apache-2.0` automatically means `https://spdx.org/licenses/Apache-2.0`.
>
> But in any case, don't add it to the same line!
We should be able to use `Representing multiple licenses` and it looks like fit to format 🤔
--
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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "zvr (via GitHub)" <gi...@apache.org>.
zvr commented on PR #62073:
URL: https://github.com/apache/airflow/pull/62073#issuecomment-3922401899
I am not sure what you mean by "it looks like fit to format".
Whatever comes after a `SPDX-License-Identifier:` is an SPDX License Expression, which has a very well-defined format. The grammar is defined in an [annex](https://spdx.github.io/spdx-spec/v3.1-dev/annexes/spdx-license-expressions/) of the specification, which defines the operators (`AND`, `OR`, `WITH`) and the terminals (licenses from the SPDX License List or custom licenses).
The string `Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0` cannot be recognized as an expression: it has a license identifier (`Apache-2.0`), a space, and a URL. This does not follow the grammar and cannot be parsed.
The URL must be placed on a separate line.
--
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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "zvr (via GitHub)" <gi...@apache.org>.
zvr commented on PR #62073:
URL: https://github.com/apache/airflow/pull/62073#issuecomment-3919516435
@potiuk @jscheffl Please, _please_, don't use an incompatible format!
The line
> `<!-- SPDX-License-Identifier: Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0 -->`
will break every license parser in existence.
After the `SPDX-License-Identifier:`, an SPDX license expression is expected. See the [guidelines](https://spdx.github.io/using/license-id-in-source/), which in SPDXv2 used to be part of the specification that is an ISO standard [here](https://spdx.github.io/spdx-spec/v2.3/using-SPDX-short-identifiers-in-source-files/).
If you need to put the license URL, please put it on a separate line.
Personally, I don't believe it's needed, since `SPDX-License-Identifier: Apache-2.0` automatically means `https://spdx.org/licenses/Apache-2.0`.
But in any case, don't add it to the same line!
--
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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #62073:
URL: https://github.com/apache/airflow/pull/62073#discussion_r2819225900
##########
.pre-commit-config.yaml:
##########
@@ -164,18 +169,49 @@ repos:
- --fuzzy-match-generates-todo
exclude:
(?x)
- .github/PULL_REQUEST_TEMPLATE\.md$
+ ^\.github/.*\.md$|
+ AGENTS\.md$|
+ CLAUDE\.md$|
+ SKILLS\.md$|
+ ^scripts/ci/license-templates/
+ - id: insert-license
+ name: Add short license for agentic Markdown files
+ args:
+ - --comment-style
+ - "||"
+ - --license-filepath
+ - scripts/ci/license-templates/SHORT_LICENSE.md
+ - --fuzzy-match-generates-todo
+ files:
+ (?x)
+ ^\.github/.*\.md$|
+ AGENTS\.md$|
+ CLAUDE\.md$|
+ SKILLS\.md$
Review Comment:
Why not
--
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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #62073:
URL: https://github.com/apache/airflow/pull/62073#issuecomment-3922987088
Let us know @zvr if the proposed change in #62145 is good (I want it to be as concise as possible, so the line with licence starts with the comment `<!--` but I believe it should be fine. The annex you mentioned only describes what happens **after** SPDX specification and refers to BNF used by parsers, which I think should be ok, i can't imagine an expectation that the SPDX specification token starts at the beginning of the line - I think having it started after the opening comment token without EOL after it is perfectly fine for parsers?
--
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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "zvr (via GitHub)" <gi...@apache.org>.
zvr commented on PR #62073:
URL: https://github.com/apache/airflow/pull/62073#issuecomment-3923102040
No worries, almost license scanning tools know to ignore initial comment markers like `/*`, `#`, `//`, ...
--
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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #62073:
URL: https://github.com/apache/airflow/pull/62073#issuecomment-3917446309
### Backport successfully created: v3-1-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-1-test</td>
<td><a href="https://github.com/apache/airflow/pull/62100"><img src="https://img.shields.io/badge/PR-62100-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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #62073:
URL: https://github.com/apache/airflow/pull/62073#issuecomment-3922927922
> I am not sure what you mean by "it looks like fit to format".
>
> Whatever comes after a `SPDX-License-Identifier:` is an SPDX License Expression, which has a very well-defined format. The grammar is defined in an [annex](https://spdx.github.io/spdx-spec/v3.1-dev/annexes/spdx-license-expressions/) of the specification, which defines the operators (`AND`, `OR`, `WITH`) and the terminals (licenses from the SPDX License List or custom licenses).
>
> The string `Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0` cannot be recognized as an expression: it has a license identifier (`Apache-2.0`), a space, and a URL. This does not follow the grammar and cannot be parsed.
>
> The URL must be placed on a separate line.
Good point. Moving it to two lines is better. Thanks @zvr -> that's a great feedback.
--
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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "Dev-iL (via GitHub)" <gi...@apache.org>.
Dev-iL commented on code in PR #62073:
URL: https://github.com/apache/airflow/pull/62073#discussion_r2817506079
##########
.pre-commit-config.yaml:
##########
@@ -164,18 +169,49 @@ repos:
- --fuzzy-match-generates-todo
exclude:
(?x)
- .github/PULL_REQUEST_TEMPLATE\.md$
+ ^\.github/.*\.md$|
+ AGENTS\.md$|
+ CLAUDE\.md$|
+ SKILLS\.md$|
+ ^scripts/ci/license-templates/
+ - id: insert-license
+ name: Add short license for agentic Markdown files
+ args:
+ - --comment-style
+ - "||"
+ - --license-filepath
+ - scripts/ci/license-templates/SHORT_LICENSE.md
+ - --fuzzy-match-generates-todo
+ files:
+ (?x)
+ ^\.github/.*\.md$|
+ AGENTS\.md$|
+ CLAUDE\.md$|
+ SKILLS\.md$
Review Comment:
Should we preemptively include a `.claude` folder at the top level of the repo?
--
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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #62073:
URL: https://github.com/apache/airflow/pull/62073#issuecomment-3928796460
> I am not sure what you mean by "it looks like fit to format".
>
> Whatever comes after a `SPDX-License-Identifier:` is an SPDX License Expression, which has a very well-defined format. The grammar is defined in an [annex](https://spdx.github.io/spdx-spec/v3.1-dev/annexes/spdx-license-expressions/) of the specification, which defines the operators (`AND`, `OR`, `WITH`) and the terminals (licenses from the SPDX License List or custom licenses).
>
> The string `Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0` cannot be recognized as an expression: it has a license identifier (`Apache-2.0`), a space, and a URL. This does not follow the grammar and cannot be parsed.
>
> The URL must be placed on a separate line.
I meant it looks like we are following the format in the title in my message from the guideline you shared https://spdx.github.io/using/license-id-in-source/. Unfortunately, the links are not bind per title so I couldn't shared the exact place but only shared the title and that title has a custom identifier section where we can also have custom license definition.
Thanks for raising! I wasn't saying it fits the format %100, it was more of I was questioning via looks like and tried to get more context. After checking annex, it make sense to make fit to annex
--
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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #62073:
URL: https://github.com/apache/airflow/pull/62073
--
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] Allow to use short SPDX licence identifier for selected files [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #62073:
URL: https://github.com/apache/airflow/pull/62073#issuecomment-3922965086
PR here https://github.com/apache/airflow/pull/62145
--
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