Skip to content

Added commitish as input #32

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

Closed
wants to merge 3 commits into from

Conversation

AndreBlumenthal
Copy link

@AndreBlumenthal AndreBlumenthal commented Feb 13, 2023

In this PR, we would like to add the target_commitish property for creating a release. This is also contained in the original repository here. The problem we want to solve with it, is that the action is always tagging the default branch (main in most cases) but not the branch the action is running on. By providing the target_committish property, you can steer where to put the newly created tag.

Edit: We made the test run through but they need another look. Right now the tests are not bullet proof. The jest mocks are created with the assumption that core.getInput is always called in the same order. This was the case in the original version but it is not anymore.

@delete-merged-branch delete-merged-branch bot deleted the add-target-commitish branch February 13, 2023 14:16
@@ -161,6 +161,8 @@ async function run() {
const body = core.getInput('body', { required: false });
const draft = core.getInput('draft', { required: false }) === 'true';

const commitish = core.getInput('commitish', { required: false }) || context.sha;
Copy link
Author

Choose a reason for hiding this comment

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

it is debatable whether or not we want to default to context.sha or just leave it undefined if not provided by the user.

When we leave it undefined we don't impact current usages of this action

Copy link

Choose a reason for hiding this comment

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

Most definitely should default to context.sha as that is the only way that makes sense. The current implementation (without this PR) where the created release doesn't match the action it's ran from is absolutely unintuitive.

So for example, if you run a build action to compile binaries and release them from other branch, or from an earlier commit, the release itself would be tagged to the master branch and latest commit while the binaries would be from a different one and thus the release information and the source code wouldn't match the compiled binaries. I highly doubt that there is any user out there who intends to do this.

For the less popular use cases where the action is not ran against a commit, like from cron jobs, commit.sha == undefined anyway so that wouldn't change.

I think it's quite obviously intuitive that when you run an action from whatever branch or commit, that the release should match that commit unless specified otherwise. That's exactly how you did it, and that's exactly how it should work. I don't think it's even debatable, as I cannot imagine a counter-argument against the logic how you currently have it.

I'd say the correct way of making sure even the most weirdest of configurations wouldn't get affected whatsoever, is not to use the old flawed logic of undefined but rather bump the version tag from v2 to v3.

Copy link

Choose a reason for hiding this comment

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

So a TL;DR; version for the maintainer:
Change nothing, keep this PR exactly as it is now, and when you merge this just bump the version tag to v3 afterwards, that's it.

@anzz1
Copy link

anzz1 commented Mar 23, 2023

Please merge.

anzz1 added a commit to ggml-org/llama.cpp that referenced this pull request Mar 25, 2023
* CMake: Add AVX512 option

* CI: Add AVX/AVX512 builds (Windows)
(AVX512 tests can only be run when the worker happens to support it, building works anyway)

* CMake: Fix sanitizer linkage ( merged #468 )

* CI: Add sanitizer builds (Ubuntu)

* CI: Fix release tagging
(change @zendesk/action-create-release to @anzz1/action-create-release until upstream PR Added commitish as input zendesk/action-create-release#32 is merged)
@AndreBlumenthal
Copy link
Author

I guess this will not happen. I close this now

@anzz1
Copy link

anzz1 commented Aug 7, 2023

I guess this will not happen. I close this now

I hope you reconsider, since this is an absolutely essential fix.

I too do see that this action seems to be largely abandoned, but it still works perfectly fine with your changes. I've forked this change https://github.com/Jimdo/action-create-release and have personally tested it by using it for months now over various repos and hundreds of deployments, and it has worked flawlessly 100% of the time[*].

It's a small change after all and doesn't break any existing functionality. It's currently impossible to use multiple branches, create mixed releases/prereleases, or create releases from earlier commits than the latest master without this. Nothing will change for existing users who so far could only use a single master branch and create releases from the latest commit, as that will keep working just as it did. This is not a breaking change, and there is absolutely no reason to not merge this. And the version tag would be bumped from v2 to v3 anyway after the merge.

Using the fork obviously works fine too, but ultimately it'd be better to get it merged to this main project as this action is widely used and referenced to. It'd save the headache of troubleshooting and having to dig for this working fork. Also by closing the PR, it gets buried to the closed PR's and makes it harder for other people find the fix, and also if the maintainer ever comes back to check on this project, they'll probably miss the problem altogether.

It doesn't hurt to have this issue open till the end of time if necessary, right?

[*]: With the exception of GitHub outages, but obviously nothing works during outages due to no fault of the script itself.

@AndreBlumenthal
Copy link
Author

I guess this will not happen. I close this now

I hope you reconsider, since this is an absolutely essential fix.

I too do see that this action seems to be largely abandoned, but it still works perfectly fine with your changes. I've forked this change https://github.com/Jimdo/action-create-release and have personally tested it by using it for months now over various repos and hundreds of deployments, and it has worked flawlessly 100% of the time[*].

It's a small change after all and doesn't break any existing functionality. It's currently impossible to use multiple branches, create mixed releases/prereleases, or create releases from earlier commits than the latest master without this. Nothing will change for existing users who so far could only use a single master branch and create releases from the latest commit, as that will keep working just as it did. This is not a breaking change, and there is absolutely no reason to not merge this. And the version tag would be bumped from v2 to v3 anyway after the merge.

Using the fork obviously works fine too, but ultimately it'd be better to get it merged to this main project as this action is widely used and referenced to. It'd save the headache of troubleshooting and having to dig for this working fork. Also by closing the PR, it gets buried to the closed PR's and makes it harder for other people find the fix, and also if the maintainer ever comes back to check on this project, they'll probably miss the problem altogether.

It doesn't hurt to have this issue open till the end of time if necessary, right?

[*]: With the exception of GitHub outages, but obviously nothing works during outages due to no fault of the script itself.

I really appreciate your commitment to this. Also a huge thanks to your comment about the commitish. The PR was open now for almost half a year and so far there is not a single reaction at all from the maintainers. This is why I don't expect that anything will happen on that matter.

@anzz1
Copy link

anzz1 commented Aug 8, 2023

I really appreciate your commitment to this. Also a huge thanks to your comment about the commitish. The PR was open now for almost half a year and so far there is not a single reaction at all from the maintainers. This is why I don't expect that anything will happen on that matter.

I do appreciate when stuff works properly, so thank you. @zendesk is not personal account but a company one, and it's quite possible this PR has just slipped under the radar. I'd say give it a bit more time, but ultimately it's up to you.

edit: If this repo allows it, you could try requesting a review under the "Reviewers" label so someone actually gets notified personally. There are almost 1K repositories under this account so probably most of the notifications under the company account slip by unseen.

YuMJie pushed a commit to YuMJie/powerinfer that referenced this pull request Oct 25, 2024
* CMake: Add AVX512 option

* CI: Add AVX/AVX512 builds (Windows)
(AVX512 tests can only be run when the worker happens to support it, building works anyway)

* CMake: Fix sanitizer linkage ( merged #468 )

* CI: Add sanitizer builds (Ubuntu)

* CI: Fix release tagging
(change @zendesk/action-create-release to @anzz1/action-create-release until upstream PR Added commitish as input zendesk/action-create-release#32 is merged)
github-actions bot pushed a commit to martin-steinegger/ProstT5-llama that referenced this pull request Dec 30, 2024
* CMake: Add AVX512 option

* CI: Add AVX/AVX512 builds (Windows)
(AVX512 tests can only be run when the worker happens to support it, building works anyway)

* CMake: Fix sanitizer linkage ( merged #468 )

* CI: Add sanitizer builds (Ubuntu)

* CI: Fix release tagging
(change @zendesk/action-create-release to @anzz1/action-create-release until upstream PR Added commitish as input zendesk/action-create-release#32 is merged)
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 this pull request may close these issues.

2 participants