Error: title is empty #23

Open
opened 2024-08-23 15:00:01 +00:00 by ReptoxX · 6 comments

I'm getting the error, that the title is empty whether i set it or not.
It creates the tag regardless even when failed

I'm getting the error, that the title is empty whether i set it or not. It creates the tag regardless even when failed

I started getting this error on 1 of my new repos. This repo has never had a release before. I am running forgejo v9.0.1, and have tried to use several tags from this action, most recently commit 4f1c5dc.

This action (tag v2 specifically) is working on other repos. Those repos already have a release (i just overwrite the main release on these). If I try to create a new release from the ui and do not specify the title I get an error in Forgejo itself, so the cause of this issue does not seem to be specific to this action. That being said, if i specify the title in the UI i get a release. If i specify the title in this action I get the same error saying Title is required

image

I started getting this error on 1 of my new repos. This repo has never had a release before. I am running forgejo v9.0.1, and have tried to use several tags from this action, most recently commit 4f1c5dc. This action (tag v2 specifically) is working on other repos. Those repos already have a release (i just overwrite the `main` release on these). If I try to create a new release from the ui and do not specify the title I get an error in Forgejo itself, so the cause of this issue does not seem to be specific to this action. That being said, if i specify the title in the UI i get a release. If i specify the title in this action I get the same error saying Title is required ![image](/attachments/310c5cab-a0f1-4c55-a5bb-634d50576a65)
Contributor

Could you create the conditions to reproduce this error on https://v10.next.forgejo.org/? The existing tests demonstrate it works as it should. That must be a bug ... somewhere 😄 Thanks for your help narrowing this down 🙏

Could you create the conditions to reproduce this error on https://v10.next.forgejo.org/? The existing tests demonstrate it works as it should. That must be a bug ... somewhere 😄 Thanks for your help narrowing this down 🙏

I have the same problem with a “title is empty” error, but not all the time :

  • if there's only one job in the workflow, the action runs successfully

  • if there are 2 jobs in the workflow, with an upload-artifact in the first and a download-artifact in the second before the release step, the action runs with the error

I have the same problem with a “title is empty” error, but not all the time : - if there's only one job in the workflow, the action runs successfully - if there are 2 jobs in the workflow, with an upload-artifact in the first and a download-artifact in the second before the release step, the action runs with the error

Glad to help! Here is the repro. My issue was caused by having folders inside of my release-dir. Specifically having 2 or more folders will cause this error, only having 1 will cause a "no such file" error. I updated my personal repos to output the artifacts into a flat directory and it is working as I expect now.

Glad to help! [Here is the repro](https://v10.next.forgejo.org/bmcclure/repro_ReleasePublishAction). My issue was caused by having folders inside of my `release-dir`. Specifically having 2 or more folders will cause this error, only having 1 will cause a "no such file" error. I updated my personal repos to output the artifacts into a flat directory and it is working as I expect now.

It looks like the artifact names are getting mangled with trailing :, and additional -a flags, when used in combination with upload or download tasks for some reason:

/tmp/tmp.OrRtOu1cWj/tea release create -a target/artifacts/some-app.flatpak: -a some-app.flatpak -a -a target/artifacts/some-app: -a some-app --repo toothrot/some-app --note 'MY RELEASE NOTES' --tag v0.1.0-dev --title v0.1.0-dev --draft --prerelease

I'm working on finding a workaround, but unfortunately my release workflow currently takes ~20 minutes a run to test.

It looks like the artifact names are getting mangled with trailing `:`, and additional `-a` flags, when used in combination with upload or download tasks for some reason: ```bash /tmp/tmp.OrRtOu1cWj/tea release create -a target/artifacts/some-app.flatpak: -a some-app.flatpak -a -a target/artifacts/some-app: -a some-app --repo toothrot/some-app --note 'MY RELEASE NOTES' --tag v0.1.0-dev --title v0.1.0-dev --draft --prerelease ``` I'm working on finding a workaround, but unfortunately my release workflow currently takes ~20 minutes a run to test.

I believe the error is handling nested directories in this block of code:

Lines 87 to 89 in fc0488c
for file in "$RELEASE_DIR"/*; do
assets=("${assets[@]}" -a "$file")
done

As @bmcclure and @mlucas mentioned, having a nested directory in the release dir will cause the command line arguments to be mangled because the glob is being handled incorrectly.

I believe the error is handling nested directories in this block of code: https://code.forgejo.org/actions/forgejo-release/src/commit/fc0488c944626f9265d87fbc4dd6c08f78014c63/forgejo-release.sh#L87-L89 As @bmcclure and @mlucas mentioned, having a nested directory in the release dir will cause the command line arguments to be mangled because the glob is being handled incorrectly.
Sign in to join this conversation.
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
actions/forgejo-release#23
No description provided.