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

GitHub Actions, Building, PR, and Releasing Questions #425

Open
adangel opened this issue Mar 23, 2024 · 8 comments
Open

GitHub Actions, Building, PR, and Releasing Questions #425

adangel opened this issue Mar 23, 2024 · 8 comments

Comments

@adangel
Copy link
Collaborator

adangel commented Mar 23, 2024

Hi @jandroav,

as a liquibase extension maintainer, I have now a couple of questions regarding the build workflow. Since you committed last in this area, I hope, you can help.

Thanks!
Andreas

@jandroav
Copy link
Contributor

Hey @adangel !

We are making improvements on building extensions from fork PRs and we are progressively applying it to all extensions. Check this recent PR: https://github.com/liquibase/liquibase-percona/pull/426/files

The secrets issue is fixed: https://github.com/liquibase/liquibase-percona/actions/runs/8410340614/job/23028679729?pr=424

Pinging @filipelautert to get his thoughts about the review process.

I will work this week on getting https://github.com/liquibase/liquibase-percona/blob/main/RELEASE.md updated !

That's basically fine by me. However, liquibase-percona is not on the default list: https://github.com/liquibase/build-logic/blob/1ea4c8fddb53b0814f5fab990d3b24466a83621f/.github/workflows/os-extension-automated-release.yml#L13 - I guess, this simply needs to be added.

@filipelautert are you ok if we add it?

Is there a way, to publish bugfix releases? E.g. 4.26.0 has been released, but some extension only related bug needs to be fixed, so I want to release 4.26.0.1 or so. Is this possible?

Sure, check -> https://github.com/liquibase/liquibase-neo4j/releases/tag/v4.26.0.1

@adangel
Copy link
Collaborator Author

adangel commented Mar 24, 2024

Awesome, thanks!

Now, the integration test is still unfortunately failing (#424)... I'll try to figure it out. For now, it looks like it is not executing the code from the branch - which is weird... It fails with the error message, that I actually removed...

@filipelautert
Copy link
Contributor

Hello @adangel

@jandroav about the review process, @adangel should have the same permissions as Florent has on neo4j one - he is set as admin and is in the push-bipassers. PR https://github.com/liquibase/liquibase-infrastructure/pull/1777 fixes it.

We can also add Percona to the default list, no problems. It was separated as it had a different release process and Nathan handed me over a note saying that "Percona maintainers release it on their own" . But now with the nightly builds we can make sure that it is building against Liquibase master build and release it together with all the other extensions. Despite that you can still release bugfixes anytime you want. And btw: 4.27.0 will probably be released before easter!

Finally, the pr's currently are building against master branch - Jandro and I are discussing the fix, it will be here soon !

cheers

filipe

@jandroav
Copy link
Contributor

@adangel It seems your build is now working fine (integration tests working): https://github.com/liquibase/liquibase-percona/actions/runs/8421798472

@filipelautert
Copy link
Contributor

@adangel and meanwhile I approved the PR .

@adangel
Copy link
Collaborator Author

adangel commented Mar 27, 2024

@filipelautert @jandroav Thanks for your support and explanations.

I'll merge my PR now and try to release a new version 4.26.0, before 4.27.0 arrives...

I also seem to have now admin permissions for this repository (got a new invite from liquibot).

I've checked the build logs and I found two minor things, I want to mention. Maybe you can fix that in one of the next versions for the build logic:

  • For the PR builds, the checkout commit id when running the job "Build & Package" is correct - it's the head of the PR. Note, that GitHub by default uses the merge-head for PR builds, which is a merge-commit that merged main into the PR, to ensure the PR integrates well with current master (and that's why GitHub Actions only run for mergeable PRs) - that's just a minor difference - but it could lead to issues, that the PR build is Ok, but after merging into main, the main branch is broken.
    • I think, this needs to be fixed in os-extension-test.yml
  • After the "Build & Package" is done, the individual Test-Jobs are running: Here the checkout commit id is from main and not from the PR. This actually doesn't matter for now, because the code is not compiled again (the target/* folder from previous Build is reused) - and both compile:compile and compile:testCompile say, everything is up-to-date, nothing to compile. So the correct tests (the tests from the PR) are running. However, this might lead to confusion at some point (if for whatever reason the maven-compiler-plugin recompiles classes).
    • I think, this needs to be fixed in os-extension-test.yml
  • In the pipeline, the dependabot-automerge job should only run after the integration tests finished successfully. Otherwise the main branch might get broken silently (which happened, once the bump to 4.25.0 has been merged automatically).
    • This can be fixed in this repository. I can create a PR.
    • The consequence is of course, that it takes a bit longer, until such PRs are merged.

@adangel
Copy link
Collaborator Author

adangel commented Mar 27, 2024

Ok, I have now two more problems:

  1. Building a pull request after merge doesn't work yet - this is similar issue with "pull_request" vs. "pull_request_target": See https://github.com/liquibase/liquibase-percona/actions/runs/8457098930

  2. The release didn't work for some reason: https://github.com/liquibase/liquibase-percona/actions/runs/8457903698

I'm also not exactly clear, how the tagging works - I published the release and GitHub created "untagged-9fde2886b917cdcfab4e". Would this tag have been replaced eventually if the build would have been successful? I now created the tag v4.26.0 - which points of course to a commit in the repo, which specifies version 4.26.0-SNAPSHOT - which means, 4.26.0 of liquibase-percona is currently not reproducible (but there are also no artifacts deployed to maven central yet, so no problem). You might need to remove the tag v4.26.0 again, to rerun the workflow... Update: I've removed the tag v4.26.0 and added again "untagged-9fde2886b917cdcfab4e".

@jandroav Could you have a look again on this release workflow? Thanks!

@adangel
Copy link
Collaborator Author

adangel commented Mar 28, 2024

Ok, I've created for me now a manual release workflow (https://github.com/liquibase/liquibase-percona/actions/workflows/manual-release-from-tag.yml) and release 4.26.0.

So, that means, 4.26.0 is done. We can now fix the workflows for 4.27.0.

Summarizing the issues I see right now:

  • Building an external pull request after merge doesn't work yet - this is similar issue with "pull_request" vs. "pull_request_target": See https://github.com/liquibase/liquibase-percona/actions/runs/8457098930
  • The release didn't work for some reason: https://github.com/liquibase/liquibase-percona/actions/runs/8457903698 fixed by chore: Use https for scm connection #454
  • I don't understand yet, how the release workflow is supposed to work: when is pom.xml updated to the release version? and which version is used? Who does release the artifacts to maven central? right now, I see only that the staging repo is maybe closed but releasing requires again manual intervention (hence: release is not automated). See also https://github.com/liquibase/build-logic/blob/main/doc/os-extension-automated-release.md#closed_umbrella-close-nexus-staging . But what happens, if I publish a GitHub release manually? Will the artifacts be released?
  • I might need to change my working style - not creating PRs from my personal fork, which is considered external, but directly pushing the branches to liquibase/liquibase-percona and creating PRs from there. I could bypass the branch protections, but actually I don't: I want to have the PRs built before I merge them.
  • Before we add liquibase-percona to the automatic release of extension, we need to make sure that we have at least a nightly build against liquibase-main-SNAPSHOT - or we need to run the integration tests before the release. I want to avoid releasing a extension which doesn't work in the end.

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

No branches or pull requests

3 participants