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

feat: Update bundled resources/INSPIRE presets used in hale studio #1069

Closed

Conversation

emanuelaepure10
Copy link
Contributor

@stempler
Copy link
Member

@kapil-agnihotri Do you have any idea what the cause of the build failure is?
I thought maybe you saw something similar during the Java update?
https://builds.wetransform.to/job/hale/job/hale~pull/1532/console

@kapil-agnihotri
Copy link
Member

Not sure about the root cause but it might be related to Tycho version.
Probably some updates in hale-platform impacted tycho and corrupted it.

We may try to update the Tycho version to the next one maybe?

@emanuelaepure10 does it also fails in your local system if you run ./build.sh clean ?

@stempler
Copy link
Member

The build log can be quite confusing, since there are some errors that seem to be normal.
When comparing to a working build, this seems to be the actual problem:

> Task :buildProduct
Cannot resolve project dependencies:
  Software being installed: eu.esdihumboldt.hale.app.cli 5.1.0.qualifier
  Missing requirement: eu.esdihumboldt.hale.common.core 5.1.0.qualifier requires 'java.package; eu.esdihumboldt.hale.common.core.io.project.model.internal.generated 2.9.0' but it could not be found
  Cannot satisfy dependency: eu.esdihumboldt.hale.app.cli 5.1.0.qualifier depends on: java.package; eu.esdihumboldt.hale.common.core 0.0.0

@stempler
Copy link
Member

requires 'java.package; eu.esdihumboldt.hale.common.core.io.project.model.internal.generated 2.9.0' but it could not be found

I looked at the related MANIFEST.MF - it seems to miss the version for the exported package:

Manifest-Version: 1.0
Bnd-LastModified: 1698149602738
Bundle-License: http://www.gnu.org/licenses/lgpl.html;description=Less
 er General Public License (LGPL) Version 3
Bundle-ManifestVersion: 2
Bundle-Name: HALE Project Format Model
Bundle-SymbolicName: eu.esdihumboldt.hale.common.core.io.project.model
 .jaxb
Bundle-Vendor: data harmonisation panel
Bundle-Version: 2.9.9
Export-Package: eu.esdihumboldt.hale.common.core.io.project.model.inte
 rnal.generated;uses:="jakarta.xml.bind,jakarta.xml.bind.annotation,ja
 vax.xml.datatype,org.w3c.dom"
Import-Package: javax.xml.datatype;resolution:=optional,javax.xml.name
 space;resolution:=optional,org.w3c.dom;resolution:=optional,jakarta.x
 ml.bind;resolution:=optional,jakarta.xml.bind.annotation;resolution:=
 optional
Originally-Created-By: 17.0.8.1 (Eclipse Adoptium)
Private-Package: eu.esdihumboldt.hale.common.core.io.project.model.int
 ernal.generated
Require-Bundle: org.glassfish.jaxb.runtime
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.7))"
Tool: Bnd-6.3.0.202206012108

Compared to that the Manifest for the previous version of the bundle:

Manifest-Version: 1.0
Bnd-LastModified: 1667374036662
Bundle-License: http://www.gnu.org/licenses/lgpl.html;description=Less
 er General Public License (LGPL) Version 3
Bundle-ManifestVersion: 2
Bundle-Name: HALE Project Format Model
Bundle-SymbolicName: eu.esdihumboldt.hale.common.core.io.project.model
 .jaxb
Bundle-Vendor: data harmonisation panel
Bundle-Version: 2.9.9
Export-Package: eu.esdihumboldt.hale.common.core.io.project.model.inte
 rnal.generated;version="2.9.9";uses:="jakarta.xml.bind,jakarta.xml.bi
 nd.annotation,javax.xml.datatype,org.w3c.dom"
Import-Package: javax.xml.datatype;resolution:=optional,javax.xml.name
 space;resolution:=optional,org.w3c.dom;resolution:=optional,jakarta.x
 ml.bind;resolution:=optional,jakarta.xml.bind.annotation;resolution:=
 optional
Originally-Created-By: 17 (Oracle Corporation)
Require-Bundle: org.glassfish.jaxb.runtime
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.7))"
Tool: Bnd-3.4.0.201707252008

This problem likely did not surface in Eclipse because the bundle version stayed the same and Eclipse may have used the old cached version.

@stempler
Copy link
Member

@emanuelaepure10 You could try with the changes here: halestudio/hale-platform#51

When testing locally it added package exports to the JAXB bundles including the version as expected.

@emanuelaepure10
Copy link
Contributor Author

@kapil-agnihotri does it also fails in your local system if you run ./build.sh clean ?

Running the script locally I got a build successful.

@emanuelaepure10
Copy link
Contributor Author

emanuelaepure10 commented Oct 27, 2023

@stempler I have used halestudio/hale-platform#51 to recreate the updatesite
I have even create PR with the version-history.json but Jenkins is still failing.
@kapil-agnihotri
Any idea how can I make it work?
thanks

@stempler
Copy link
Member

Caused by: org.eclipse.tycho.p2.target.facade.TargetDefinitionResolutionException: Could not find "eu.esdihumboldt.hale.platform.feature.group/5.0.0.i20231025" in the repositories of the current location

@emanuelaepure10 It seems you only updated the commit sha in the target platform file, not the version of the platform feature.

@emanuelaepure10
Copy link
Contributor Author

emanuelaepure10 commented Oct 27, 2023

@stempler By

not the version of the platform feature.

you mean this?

Does the PR need to be merged in order to be taken? As it is now doesn't work.

<repository location="https://gitlab.wetransform.to/hale/hale-build-support/raw/d6435ab10b4a5cab971d1d7839c95b590542b662/updatesites/platform"/>
<unit id="eu.esdihumboldt.hale.platform.feature.group" version="4.1.0.i20230505"/>
<repository location="https://gitlab.wetransform.to/hale/hale-build-support/raw/e9436fa1b3c40b216f01daf20c3f21085e43b235/updatesites/platform"/>
<unit id="eu.esdihumboldt.hale.platform.feature.group" version="5.0.0.i20231025"/>
Copy link
Member

Choose a reason for hiding this comment

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

@emanuelaepure10 I mean this. My guess is you only updated the commit sha after the last change but not the version of the platform feature to reflect whatever version is present in that update site.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. somehow I forgot to push. I just did it now. Let's see the results :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any idea how to solve this

Cannot resolve project dependencies:
  Software being installed: eu.esdihumboldt.hale.app.cli.commands 5.1.0.qualifier
  Missing requirement: eu.esdihumboldt.hale.common.align 5.1.0.qualifier requires 'osgi.bundle; com.vladsch.flexmark 0.64.0' but it could not be found
  Cannot satisfy dependency: eu.esdihumboldt.hale.app.cli.commands 5.1.0.qualifier depends on: osgi.bundle; eu.esdihumboldt.hale.common.align 2.9.5

Copy link
Member

Choose a reason for hiding this comment

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

The update site does not contain this bundle. See for instance the content of the related artifacts.jar (the XML file lists all plugins in the update site).

I guess you

  1. Did the platform generation either w/o custom Eclipse home or w/o removing the old eclipse artifact (see last sentence on this comment)
  2. Did not test the update site in Eclipse with hale studio or forgot to take measures that the new update site is used in Eclipse despite mostly no version changes on the bundles
  3. After running the script to update hale-build-support ignored the deleted files and did not commit the deletions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stempler I have probably missed this comment

In version 3 I changed the default eclipse artifact that is downloaded from the minimal eclipse product to a full Eclipse 2023-09. For this to be picked up you need to clear the folder .gradle/bnd-platform/ in your home directory.

I somehow don't have a .gradle/bnd-platform/ folder
image
Why I don't have it? What should I do to have it?

Copy link
Member

Choose a reason for hiding this comment

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

For this to be picked up you need to clear the folder .gradle/bnd-platform/ in your home directory.

In your home directory / user home.

In a *nix shell it would be the folder ~, if you use a Windows shell there seems to be a variable %USERPROFILE%

See https://en.wikipedia.org/wiki/Home_directory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stempler @kapil-agnihotri
Please tell me what in this workflow is wrong or what is missing:

  1. clean .gradle/bnd-platform/
  2. move to master ``https://github.com/halestudio/hale-platform
    2.1. change eclipseHome
    2.1.0. I don't run ./gradlew -p modules/resources because it was done by @stempler in a previous PR merged into the master and for me this fails
    2.2. run ./gradlew
    2.3. run ./update-build-support.sh
  3. create PR for hale-platform-update with the changes in updatesite
  4. create PR for hale-platform with the version-history.json
  5. in hale plugin platform
    5.1. go to hale-platform.target update location repository with the commit from hale-platform-update.
    5.2. reload locations and reload target platform
    5.3. validate HALE.product
    5.4. commit the changes
    Thank you

Copy link
Member

Choose a reason for hiding this comment

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

change eclipseHome

This ideally should not be required, but as we found out with some Eclipse versions, including the one used by bnd-platform for some years, when running the update site creation there are bundles missing.
We changed the default artifact that is downloaded to one that works, but it does not automatically replace any previous downloaded artifact. Thus the cleanup in ~/.gradle/bnd-platform/.

run ./update-build-support.sh

Ideally before doing that test the update site within Eclipse using a file URL to the built update site in the file system. Eclipse has some caching mechanisms that can be hindering in such cases, so it is recommended to first rename the update site folder to something unique (e.g. append date and a counter).

After testing and then updating the build-support repo via the script, all changes in build-support should be added to the commit. If there are unexpected changes, e.g. bundles removed but not replaced or very many changes even though only a few are expected, something could be going wrong and it makes sense to check/investigate.

@emanuelaepure10 emanuelaepure10 force-pushed the feat/ING-3236 branch 2 times, most recently from 3ad4084 to 1c164a8 Compare October 27, 2023 13:36
@stempler
Copy link
Member

Replaced by #1071

@stempler stempler closed this Oct 28, 2023
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

Successfully merging this pull request may close these issues.

3 participants