Does release.yml
not run when v*
tags are pushed?
#1970
-
I've noticed that all runs of the Is the tag being created in a way that is not considered a Also, is this general situation, where the workflow is only run manually, intentional? Or is the workflow being manually triggered as a workaround for the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
Unfortunately, these don't run even though they should.
That's a good point, the regex should obviously match the tag name (and did before), which may indicate that the event is either not registered, or it's not the right event. But here comes a hot take: I know it just stopped working without obvious cause, or one could say, over time. What changes with time? The amount of tags, as there are more and more crates. On another note: Can it be that there is no CI job anymore that would be installing from crates.io? I think the current release may actually be broken now (and I am investigating if that's the case for everyone).
|
Beta Was this translation helpful? Give feedback.
-
The causeIn git::push_tags_and_head(&ctx.base.repo, &tag_names, options.clone())?; This for tag_name in tag_names {
cmd.arg(tag_name.as_bstr().to_str()?);
} Thus, we push all the tags together. The GitHub Actions documentation on the
So I think that's the cause of the problem. Edit: Experiments confirm that this is the cause. But the solution we are using (see comments below) differs from any of the possible solutions I had suggested in this post. Possible solutionsMultiple tag pushesThe simple solution of pushing each tag individually may be slower, though that probably does not matter. Or it may hit other rate limits, which may matter. I am also not certain that it would be sufficient: it might be that pushes within a very short time of each other are also considered to be "at once" for this purpose when they occur in quick enough succession, or in large numbers, or in some combination of quick succession and large numbers. While it's probably okay to be slower--and even to run much slower by inserting delays between the pushes to avoid aggravating other rate limits--the bigger problem with making We could push in groupsIdeally, for gitoxide, assuming I am right that this is the cause of the problem, we would have two separate tag pushes when there are tags for multiple crates including
But How that could workBecause the There would be various design decisions to make about how the grouping should work, but I suspect that the simple approach of always having two groups--tags that match a (By matching a The alternative of using a different eventAnother possible solution, for But I don't favor this alternative, because while the However, it may be that I am not looking in all the relevant places, or that the documentation is incomplete. So I'll try to look into that further when I have time to pick this back up, before dismissing the use of the Wait, am I right about the cause?The cause seems pretty straightforward, yet you may have noticed I've been hedging in my wording. The reason is that, from this comment, it sounds like running From the wording in that comment, I can't tell if it was saying the problem had recently started or not. That comment was posted in connection with the release that accompanied #1342, but I don't know that I should take it to mean that this was the first time the workflow didn't run on the |
Beta Was this translation helpful? Give feedback.
The cause
In
cargo-smart-release
, theperform_release
function iterates through the crates that are to be published. One of the steps it does in each iteration is to try to create a tag and, if that succeeds, add it totag_names
. After all crates have been processed, the collected tag names are pushed:This
push_tags_and_head
function builds and runs a singlegit push
command. This command lists all the tags to be pushed:Thus, we push all the tags together. The GitHub Actions documentation on the
push
event says: