-
Notifications
You must be signed in to change notification settings - Fork 680
Update GitHub release workflows #4076
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
Conversation
- Publish all artifacts to Maven Central from a single machine (prevents split-repos due to parallel publishing to Maven Central) - Update `run-gradle.yml` so it can access secrets - Pass secrets into `run-gradle.yml` from `master.yml` by setting `secrets: inherit` - remove unnecessary `fetch-depth: 0` from all workflows (a depth of 0 fetches everything - the default only fetches the latest commit) - Tidy up `release_multiplatform_plugin_gradle.yml`
Co-authored-by: Emil Kantis <e.kantis@gmail.com>
include: | ||
- os: macos-latest | ||
- os: ubuntu-latest | ||
- os: windows-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will make us run jvmTest on all platforms. Currently we have one or two flaky tests that sometimes fails builds.. Will become important to fix that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be better to fix the flaky tests, or maybe enable retries for them?
We could also add --exclude-task jvmTest
to 2 of the OSes, so Gradle will skip them, but of course fixing the flakey tests would be better!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with merging as-is. Let's try to reduce flakiness of master if it becomes an issue
Hmmm I really don't understand why I downloaded the test report, and it shows an exception which doesn't make sense to me.
Why can't JUnit find the kotest/kotest-common/src/commonMain/kotlin/io/kotest/mpp/logger.kt Lines 31 to 33 in 1713eb7
|
@aSemy honestly no clue why that happens. |
|
It seems that the latest test failure is related to The test log says at line 701:
And at line 836:
How could I view the cited HTML report file? |
@OliverO2 there should be a zip archive attached to the build summary |
I scrolled to the top of test_linux (jvmTest) / run-tests, clicked the cogwheel icon, and selected "Download log archive" in the dropdown menu. I got Without it, I can only guess what is going on here. With If we cannot access the HTML reports, should we try running with |
@OliverO2 I think that just downloads the full log of the build. We also upload some gradle reports available here, which shows more details: |
@Kantis Got it, thanks!
As I understand it, the chances of getting in trouble with explicit task dependencies are quite high. If possible, we should get rid of them completely. I don't see why we should use task wiring instead of letting Gradle figure out the proper processing order via task input/output dependencies. Maybe that is just some legacy workaround that is no longer needed and now interferes with parallel builds and caching. Unfortunately, this piece of task wiring is part of the rather large commit 8101fdd. |
I think the purpose of that was to solve some problems when using the |
How I'm reading it: The I've set up an own branch, but need to re-authorize IntelliJ for Kotest after handling the reported security issue. Now waiting for repository owner approval. 🙃 |
I made a plugin that should help with testing the Gradle plugin - https://github.com/adamko-dev/dev-publish-plugin. Kotest Gradle Plugin can depend on the other subprojects, and then each project will publish to a project-local directory. I'll make a new PR, and we can discuss it in there. UPDATE: Adding dev-publish might take a little bit longer than I thought, I didn't anticipate a project depending on itself and now there's a circular reference. |
I still think this is related to caches. The fact that it states "FROM-CACHE" on compileKotlinJvm means it's loading it, not actually performing the step, no? I took another shot at really cleaning the GH actions cache. I think it got completely emptied this time. Sadly GH actions has some service disruption ATM so I can't confirm if it did the trick.
Build failed after, so this was still not the issue. |
Looking in the logs, it seems that for some reason Kotest 5.7.2 is being downloaded. That version of kotest-common does not have
|
Good catch! You can see it in the build scan too https://scans.gradle.com/s/2h744qoyqz6oa/dependencies?dependencies=Kotest-common&expandAll&focusedDependency=WzEwLDYsOTg2LFs5LDEsWzQwXV1d |
So the dependency on the Kotest Mockserver extension is probably related. Although I really don't understand why it's only failing on CI but not locally???
|
kotest-extensions-mockserver uses Kotest 4.6.1, so I don't think it's that either? Could it be fudging up the dependency resolution process anyhow? |
|
D'oh, my local clone was severely out-of-date.. 😅 |
This resolves to
Why doesn't it resolve that way on CI? |
There was also a KGP bug relating to inconsistent dependency resolution in KMP projects - I'm trying to find out more info. Although I don't see why it would be different on CI vs local. Maybe it's because Kotest-CI builds & runs using Java 17, and I use Java 11 locally, and kotest-mockserver is built with Java 8? That's the only significant difference I can think of. |
I'm building and running on Java 17 locally if that line in
(Can Gradle report the JDK version used in an easier way?) |
@antohaby found it!
|
I think it would help if we had a single re-usable workflow for running all tests. I don't think this blank-release-version problem was caused by this PR, so it must have snuck in with another PR, but it wasn't caught because PRs and master are tested with different workflows. |
@aSemy but wouldn't that PR also have failed by the PR build in that case? I'm not sure how master builds come into play? |
include: | ||
- os: macos-latest | ||
- os: ubuntu-latest | ||
- os: windows-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with merging as-is. Let's try to reduce flakiness of master if it becomes an issue
So, I see it as a problem that when this PR was merged to master the release.yaml actions failed. I want these problems to be identified and fixed before merging to master. That can only happen if the same workflow that runs the tests is run against PRs and also against master. |
run-gradle.yml
so it can access secretsrun-gradle.yml
frommaster.yml
by settingsecrets: inherit
fetch-depth: 0
from all workflows (a depth of 0 fetches everything - the default only fetches the latest commit)release_multiplatform_plugin_gradle.yml
Of course, because GitHub Workflows are impossible to test locally, I can't verify if these workflows will work first time! Further work might be necessary.
Hopefully fixes #4067...