hale icon indicating copy to clipboard operation
hale copied to clipboard

build: migrate build to GitHub Actions

Open emanuelaepure10 opened this issue 11 months ago • 5 comments

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

ING-4164

emanuelaepure10 avatar Mar 04 '24 21:03 emanuelaepure10

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

emanuelaepure10 avatar Mar 06 '24 09:03 emanuelaepure10

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.

stempler avatar Mar 06 '24 10:03 stempler

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

emanuelaepure10 avatar Mar 06 '24 11:03 emanuelaepure10

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 https://github.com/halestudio/hale/blob/2493822d4623911dd3b0d45b49d565b9f50efb7f/common/plugins/eu.esdihumboldt.hale.common.test.docker/src/eu/esdihumboldt/hale/common/test/docker/config/DockerConfig.java#L51

stempler avatar Mar 06 '24 12:03 stempler

Current build failure is because of outdated offline resources. This should fix it: https://github.com/halestudio/hale/pull/1125

stempler avatar Mar 08 '24 16:03 stempler

@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

stempler avatar Mar 14 '24 13:03 stempler

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

emanuelaepure10 avatar Mar 15 '24 10:03 emanuelaepure10

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 avatar Mar 15 '24 12:03 stempler

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.

stempler avatar Mar 20 '24 16:03 stempler

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 avatar Apr 15 '24 09:04 emanuelaepure10

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

 push:
    branches:
      - master

emanuelaepure10 avatar Apr 18 '24 08:04 emanuelaepure10

:tada: This PR is included in version 5.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

we-release[bot] avatar Jun 19 '24 15:06 we-release[bot]