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

build: migrate build to GitHub Actions #1124

Merged
merged 2 commits into from
Apr 22, 2024
Merged

build: migrate build to GitHub Actions #1124

merged 2 commits into from
Apr 22, 2024

Conversation

emanuelaepure10
Copy link
Contributor

Add pull request file, master and release branches files to be used by the GitHub actions to check the PRs.

ING-4164

@emanuelaepure10 emanuelaepure10 force-pushed the build/ING-4164 branch 6 times, most recently from bfad1a1 to 05d5b14 Compare March 5, 2024 20:55
@emanuelaepure10
Copy link
Contributor Author

Could you @stempler please help me understand why it's failing the test https://github.com/halestudio/hale/actions/runs/8162870481/job/22314828710
Thank you

@stempler
Copy link
Member

stempler commented Mar 6, 2024

Could you @stempler please help me understand why it's failing the test https://github.com/halestudio/hale/actions/runs/8162870481/job/22314828710
Thank you

Looking at the logs the error seems to be

2024-03-05T21:02:34.6707526Z Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:3.0.1:validate-classpath (default-validate-classpath) on project eu.esdihumboldt.hale.common.test: Execution default-validate-classpath of goal org.eclipse.tycho:tycho-compiler-plugin:3.0.1:validate-classpath failed: bundleLocation not found: /home/runner/.m2/repository/p2/osgi/bundle/org.eclipse.core.expressions/3.6.700.v20200212-1751/org.eclipse.core.expressions-3.6.700.v20200212-1751.jar -> [Help 1]
2024-03-05T21:02:34.6716254Z org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:3.0.1:validate-classpath (default-validate-classpath) on project eu.esdihumboldt.hale.common.test: Execution default-validate-classpath of goal org.eclipse.tycho:tycho-compiler-plugin:3.0.1:validate-classpath failed: bundleLocation not found: /home/runner/.m2/repository/p2/osgi/bundle/org.eclipse.core.expressions/3.6.700.v20200212-1751/org.eclipse.core.expressions-3.6.700.v20200212-1751.jar

The respective bundle is mentioned before in the log:

2024-03-05T20:59:05.4679397Z > Task :buildProduct
2024-03-05T20:59:05.4681168Z Request to http://build-artifacts.wetransform.to/p2/mirror/2020-03-releases/plugins/org.eclipse.core.expressions_3.6.700.v20200212-1751.jar failed, trying cache instead...
2024-03-05T20:59:05.7678427Z Some attempts to read artifact osgi.bundle,org.eclipse.core.expressions,3.6.700.v20200212-1751 failed:
2024-03-05T20:59:05.7681886Z    An error occurred while transferring artifact canonical: osgi.bundle,org.eclipse.core.expressions,3.6.700.v20200212-1751 from repository http://build-artifacts.wetransform.to/p2/mirror/2020-03-releases:
2024-03-05T20:59:05.7684202Z       download from http://build-artifacts.wetransform.to/p2/mirror/2020-03-releases/plugins/org.eclipse.core.expressions_3.6.700.v20200212-1751.jar failed
2024-03-05T20:59:05.7687904Z Artifact eclipse-plugin:org.eclipse.core.expressions:3.6.700.v20200212-1751: /home/runner/.m2/repository/p2/osgi/bundle/org.eclipse.core.expressions/3.6.700.v20200212-1751/org.eclipse.core.expressions-3.6.700.v20200212-1751.jar located at /home/runner/.m2/repository/p2/osgi/bundle/org.eclipse.core.expressions/3.6.700.v20200212-1751/org.eclipse.core.expressions-3.6.700.v20200212-1751.jar seems corrupted! Will attempt to redownload it ...

It looks like it failed to download or it for some reason deemed as corrupted and possibly deleted. The redownload that is mentioned does not seem to have been successful.

Does this happen every time this is run? Or just from time to time?
It could be an issue with the access to the update site or an actual problem with that specific bundle in the update site.

@emanuelaepure10
Copy link
Contributor Author

The push to the master branch has failed in the last 3 builds
https://github.com/halestudio/hale/actions/workflows/publish.yml

What I have noticed that in the last build also 11 tests are failing, which didn't happened previously.
https://github.com/halestudio/hale/actions/runs/8162870481/job/22315439207

@stempler
Copy link
Member

stempler commented Mar 6, 2024

The push to the master branch has failed in the last 3 builds

And what are the results of your analysis?
Is it always the same error?
Did the same error already occur before for the PR build as well?
Does it have any impact if you change from integrationStage to commitStage?

What I have noticed that in the last build also 11 tests are failing, which didn't happened previously.

That's the integration tests using Docker. hale studio uses its own mechanism to run Docker images required for tests.
There would need to be a configuration file created that configures the Docker Host. Likely in the GitHub Actions environment the configuration value for that needs to be set to unix:///var/run/docker.sock.

See also

@emanuelaepure10 emanuelaepure10 force-pushed the build/ING-4164 branch 9 times, most recently from 0eadc77 to dc58968 Compare March 8, 2024 15:40
hale-docker.conf Outdated
@@ -0,0 +1,3 @@
global {
Copy link
Member

Choose a reason for hiding this comment

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

The file should be created in the GitHub Actions runner as part of the workflow.

Here is an example from another workflow that creates a text file:

https://github.com/wetransform/gha-workflows/blob/d110e2ff0307f9718d2e122075de9320018bb831/.github/workflows/sbt-library.yml#L52-L57

.github/workflows/check.yml Outdated Show resolved Hide resolved
.github/workflows/check.yml Show resolved Hide resolved
@stempler
Copy link
Member

stempler commented Mar 8, 2024

Current build failure is because of outdated offline resources.
This should fix it: #1125

@emanuelaepure10 emanuelaepure10 force-pushed the build/ING-4164 branch 2 times, most recently from dc58968 to feb95f6 Compare March 14, 2024 10:13
@emanuelaepure10 emanuelaepure10 marked this pull request as ready for review March 14, 2024 10:13
@emanuelaepure10 emanuelaepure10 force-pushed the build/ING-4164 branch 2 times, most recently from b2e0da9 to ccd9126 Compare March 14, 2024 13:42
@stempler
Copy link
Member

@emanuelaepure10 You could try to see if the current problem is also caused by what we ran into in the service publisher.
There it seems to be work (most of the time) with the System property we added for Maven: -Dmaven.wagon.httpconnectionManager.ttlSeconds=60

Related ticket
In the service publisher workflow

@emanuelaepure10 emanuelaepure10 force-pushed the build/ING-4164 branch 2 times, most recently from 67c0cca to b34b5ab Compare March 14, 2024 15:02
@stempler stempler marked this pull request as draft March 15, 2024 09:20
@emanuelaepure10 emanuelaepure10 marked this pull request as ready for review March 15, 2024 10:34
@emanuelaepure10
Copy link
Contributor Author

If one of the bellow lines is added
run: mvn -Dmaven.test.failure.ignore=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
run: clean install -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
one error is given:
The goal you specified requires a project to execute but there is no POM in this directory (/home/runner/work/hale/hale). Please verify you invoked Maven from the correct directory. -> [Help 1]

If the pom.xml is added
run: mvn -f pom.xml clean verify -DskipTests -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
an error as

Error: ] Some problems were encountered while processing the POMs:
[FATAL] Non-readable POM /home/runner/work/hale/hale/pom.xml: /home/runner/work/hale/hale/pom.xml (No such file or directory) 

is shown.
Using clean verify or clean install makes no difference in the error received.

As the pom.xml is created from
I have also moved the maven setting after the clean up of the project, but doesn't help because the om/xml is created right after with calling the next script.

@stempler Would you have any suggestion how to proceed?
Thank you

@stempler
Copy link
Member

Would you have any suggestion how to proceed?

The problem occurs when executing ./build.sh integrationStage, so you would need to look into how Maven is called internally in that case and how to properly pass on or set the system property, to test if that solves the issue.

@stempler
Copy link
Member

The problem occurs when executing ./build.sh integrationStage, so you would need to look into how Maven is called internally in that case and how to properly pass on or set the system property, to test if that solves the issue.

Maven seems to be invoked here and also here.

@emanuelaepure10
Copy link
Contributor Author

Jenkins has complete with success, but there is still an error with the actions.
This exact error doesn't appear on Jenkins
image
but there are warnings related to org.eclipse.tycho:tycho-p2-plugin
Do you have any suggestion on what else could be missing?
Thank you

@emanuelaepure10 emanuelaepure10 force-pushed the build/ING-4164 branch 2 times, most recently from e895d6b to eba0c64 Compare April 17, 2024 20:23
Add pull request file, master and release branches files to be used by the GitHub actions to check the PRs.

ING-4164

build: migrate build to GitHub Actions

Add pull request file, master and release branches files to be used by the GitHub actions to check the PRs.

ING-4164
@emanuelaepure10
Copy link
Contributor Author

Before the merge, the file publish.yml should be updated with the master branch instead of the test branch.

 push:
    branches:
      - master

- unique job name for workflow checking PRs
- use pinned action dependencies
- remove checkout task (since included in setup-maven task)
@stempler stempler merged commit 6f0c047 into master Apr 22, 2024
2 of 3 checks passed
@stempler stempler deleted the build/ING-4164 branch April 22, 2024 11:45
Copy link

we-release bot commented Jun 19, 2024

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@we-release we-release bot added the released label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants