Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(newsfragment): add template for significant newsfragments #44378

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion contributing-docs/16_contribution_workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ Step 4: Prepare PR
and place in either `newsfragments <https://github.com/apache/airflow/blob/main/newsfragments>`__ for core newsfragments,
or `chart/newsfragments <https://github.com/apache/airflow/blob/main/chart/newsfragments>`__ for helm chart newsfragments.

In general newsfragments must be one line. For newsfragment type ``significant``, you may include summary and body separated by a blank line, similar to ``git`` commit messages.
In general newsfragments must be one line. For newsfragment type ``significant``,
you should follow the template in ``newsfragments/template.significant.rst`` to include summary, body, change type and migrations rules needed.
This can also be done by command ``uv tool run towncrier create --dir . --config newsfragments/config.toml --content `cat newsfragments/template.significant.rst```.
Copy link
Member

@potiuk potiuk Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This can also be done by command ``uv tool run towncrier create --dir . --config newsfragments/config.toml --content `cat newsfragments/template.significant.rst```.
This can also be done by command ``uv tool run towncrier create --dir . --config newsfragments/config.toml --content "`cat newsfragments/template.significant.rst`" "+.significant.rst"``.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two fixes/suggestions in one:

  • The cat without quotes does not work in zsh on linux at least - it fails with "Error: Got unexpected extra arguments (a short and imperative summary of this changes ... " as the content is passed as arguments
  • The +.significant.rst will avoid asking questions about issue and type and it will create a random-generated newsfragment prefix - which I think is a good idea - we should likely stop using PR# as newsfragment id as this is always chicken-egg problem - you can only add newsfragment after you create PR - with random prefix we avoid that chicken/egg and there is little value I think with having PR # in newsfragment (you can always git-blame to check the PR # it was merged in).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also another small suggestion - separting the command to separate bash section makes it easier to copy as you get the "copy" button:

You can copy me easily by single click


2. Rebase your fork, squash commits, and resolve all conflicts. See `How to rebase PR <#how-to-rebase-pr>`_
if you need help with rebasing your change. Remember to rebase often if your PR takes a lot of time to
Expand Down
19 changes: 19 additions & 0 deletions newsfragments/template.significant.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. Write a short and imperative summary of this changes
.. Provide additional contextual information
.. Check the type of change that applies to this change
* Types of change

* [ ] DAG changes
* [ ] Config changes
* [ ] API changes
* [ ] CLI changes
* [ ] Behaviour changes
* [ ] Plugin changes
* [ ] Dependency change

.. List the migration rules needed for this change (see https://github.com/apache/airflow/issues/41641)
* Migrations rules needed