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

Add Bitbucket fixes to Release/2.8 #4547

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

j04n-f
Copy link
Contributor

@j04n-f j04n-f commented Dec 10, 2024

Description

We currently use a fork of the original code because the following fixes prevent us from using the upstream release. Add the Bitbucket fixes to release 2.8.1.

Aesthetic Changes

  • 50cff74: The UI pipeline name was using the Pull Request description. The commit changes the UI pipeline name to use the Pull Request name.
  • 283f629: The UI link to the Pull Request reference was broken. Change the Pull Request reference to redirect the user to the correct Bitbucket link.

Functional Changes

  • 06ae7d5: WP uses the same key for the commit status. No matter which is the triggering event. When triggering a workflow simultaneously using the pull_request and branch events, the commit status is overwritten by the last workflow to finish. This behavior allowed PRs to be merged even when the pull_request pipeline failed. Fix the issue using a different key depending on the triggering event. This change can affect those users who were using the key as an ID to block their PRs

You are doing an amazing work! Let us know if we can help you.

@pat-s
Copy link
Contributor

pat-s commented Dec 10, 2024

Thanks. Can you please summarize the changes in OP and add the BB version which introduced these changes?
I guess that changing this will break WP for some users on older BB versions?

@j04n-f
Copy link
Contributor Author

j04n-f commented Dec 10, 2024

As far as I know, WP does not have BB users because the WP - BB integration was broken until we introduced the following changes:

These changes fixed the PR workflow, which was broken. The last changes to the BB code were done almost one and a half years ago. BB did not change anything, this issue regarding the SHA length has been a recurring issue since 2021: https://jira.atlassian.com/browse/BCLOUD-21201

But, as I said, this is a hypothesis. No one complained about BB not working with WP, no one is using the BB integration.

Updated the PR description. What do you mean by "summarize the changes in OP"?

@pat-s
Copy link
Contributor

pat-s commented Dec 10, 2024

Thanks for the heads-up. Might very well be that there are no BB users.
Just saw some API changes that could have originated from a major BB release (I guess they must have been at some point) and if it was somewhat recent, they might break stuff.
But you're right, there are probably no users then if it didn't work at all for you until now.

What do you mean by "summarize the changes in OP"?

Updating the PR description in the [O]riginal [P]ost. Like you now did 👍️

We usually apply such patches first to the main branch and then do a backport. While the order doesn't really matter, do you also want to add a PR for main after this got accepted? 3.x is round the corner.

@anbraten anbraten added bug Something isn't working forge/bitbucket bitbucket forge related labels Dec 10, 2024
@zc-devs
Copy link
Contributor

zc-devs commented Dec 10, 2024

We usually apply such patches first to the main branch

Screenshot 2024-12-10 1

and then do a backport

This is a backport.

@pat-s
Copy link
Contributor

pat-s commented Dec 10, 2024

Ah, got it. Thanks for clarifying.

Copy link
Contributor

@pat-s pat-s left a comment

Choose a reason for hiding this comment

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

LGTM

@pat-s
Copy link
Contributor

pat-s commented Dec 10, 2024

I would also be fine issuing a patch release right away given that this fix is critical to use WP in the first place for BB users. @woodpecker-ci/maintainers opinions?

@qwerty287
Copy link
Contributor

Maybe fix the security issues trivy found as well...

@qwerty287 qwerty287 merged commit 36e5b95 into woodpecker-ci:release/v2.8 Dec 10, 2024
5 of 7 checks passed
@woodpecker-bot
Copy link
Contributor

@woodpecker-bot woodpecker-bot mentioned this pull request Dec 10, 2024
1 task
@j04n-f j04n-f deleted the release/2.8 branch December 10, 2024 13:44
@j04n-f j04n-f mentioned this pull request Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forge/bitbucket bitbucket forge related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants