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

Regression/breakage on 24.7.0 - check for invalid files #632

Closed
aviramha opened this issue Jul 31, 2024 · 6 comments · Fixed by #633
Closed

Regression/breakage on 24.7.0 - check for invalid files #632

aviramha opened this issue Jul 31, 2024 · 6 comments · Fixed by #633

Comments

@aviramha
Copy link
Contributor

aviramha commented Jul 31, 2024

Hi,
thanks for great project!
When we upgraded to towncrier 24.7.0, we started getting this error in CI:

Looking at these files:
----
1. /home/runner/work/operator/operator/Cargo.lock
2. /home/runner/work/operator/operator/changelog.d/+url-safe-fingerprint.internal.md
3. /home/runner/work/operator/operator/changelog.d/544.changed.md
4. /home/runner/work/operator/operator/THIRDPARTY.yml
5. /home/runner/work/operator/operator/Cargo.toml
6. /home/runner/work/operator/operator/CHANGELOG.md
----
Error: Invalid news fragment name: changelog_template.jinja
If this filename is deliberate, add it to 'ignore' in your configuration.

We have changelog_template.jinja set as template in the towncrier.toml config file. I realize we can add it to ignore, but I checked other repositories and realized we've probably followed a pattern seen in other projects, where the template is inside the changes directory - as can be seen here:

I assume it's a common pattern, and will break for them. Obviously each repo can fix it by adding ignore but I think it'd be better to handle it on towncrier side, potentially by either deprecating the feature (showing warning saying it will fail in next versions) or releasing in major version, another option is to make towncrier ignore the file used in template automatically.

Would be happy to send a PR implementing one of the options.

Related:
#622
#619

@adiroiban
Copy link
Member

Thanks for the report.

A PR to automatically ignore the template would be great.

I would be happy to review and merge and then we can trigger a new release.

Thanks again

@aviramha
Copy link
Contributor Author

Done here - #633

@freakboy3742
Copy link

I'm not sure this has been fixed. I'm seeing CI failures with the same error using 24.7.1:

Run tox -e towncrier-check
towncrier-check: install_deps> python -I -m pip install towncrier==24.7.1
towncrier-check: freeze> python -m pip freeze --all
towncrier-check: click==8.1.7,Jinja2==3.1.4,MarkupSafe==2.1.5,pip==24.1,towncrier==24.7.1
towncrier-check: commands[0]> python -m towncrier.check --compare-with origin/main
Looking at these files:
----
Error: Invalid news fragment name: template.rst
If this filename is deliberate, add it to 'ignore' in your configuration.
1. /home/runner/work/briefcase/briefcase/automation/pyproject.toml
2. /home/runner/work/briefcase/briefcase/changes/1935.misc.rst
3. /home/runner/work/briefcase/briefcase/tox.ini
4. /home/runner/work/briefcase/briefcase/pyproject.toml
----
towncrier-check: exit 1 (0.10 seconds) /home/runner/work/briefcase/briefcase> python -m towncrier.check --compare-with origin/main pid=2026
  towncrier-check: FAIL code 1 (2.43=setup[2.33]+cmd[0.10] seconds)
  evaluation failed :( (3.08 seconds)

@adiroiban
Copy link
Member

The initial PR didn't fixed the issue.

It was fixed here #638

I will trigger a new release soon.

@freakboy3742
Copy link

I will trigger a new release soon.

@adiroiban Are you able to give any indication when "soon" is likely to be? I have avoided introducing a workaround to my code because I was under the impression that a new point release was imminent, but if that's not the case, then a workaround may be required.

@adiroiban
Copy link
Member

well... "soon" is as soon as someone else is requesting a new release :)

There wasn't any issue raised to request a new release.
I have created it now #659

and the RC1 is ready for review here #660

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants