Comments (17)
I think I have something working. Let me give it a few tests to see if it's just luck or not.
from quarkus.
/cc @geoand (jib,kotlin)
from quarkus.
I can confirm this happens, although at the moment, I am unsure how to resolve it
from quarkus.
Not exactly sure how the hash is built but I would start with the following patch:
diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java
index 4266d04727a..60cbc6cf60a 100644
--- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java
+++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java
@@ -926,7 +926,8 @@ private void copyDependency(Set<ArtifactKey> parentFirstArtifacts, OutputTargetB
}
}
if (removedFromThisArchive.isEmpty()) {
- Files.copy(resolvedDep, targetPath, StandardCopyOption.REPLACE_EXISTING);
+ Files.copy(resolvedDep, targetPath, StandardCopyOption.REPLACE_EXISTING,
+ StandardCopyOption.COPY_ATTRIBUTES);
} else {
//we have removed classes, we need to handle them correctly
filterZipFile(resolvedDep, targetPath, removedFromThisArchive);
from quarkus.
And another thing I noticed is that in the legacy thin jar format, we copied the modified jars separately.
From a quick look, it seems that the transformed jars are also in lib/
for fast jar (at least the ones for which we remove entries) and I'm not entirely sure these transformations will produce the exact same content.
Especially since we create a new Zip file.
from quarkus.
From a quick look, it seems that the transformed jars are also in lib/ for fast jar (at least the ones for which we remove entries)
Not true :)
from quarkus.
Not exactly sure how the hash is built but I would start with the following patch:
Definitely worth a try, especially since my current experiments did not change anything
from quarkus.
Yeah I was looking at the exact same thing and your changes make a lot of sense.
(And should make mine useless since you override the modification time anyway).
That is very odd.
What is interesting IMO is that even with your patch, it seems the lib/boot
layer has the same hash. So somehow we are doing something right.
The problem starts with the lib/main
layer.
from quarkus.
(And should make mine useless since you override the modification time anyway).
Definitely.
The problem starts with the lib/main layer
Yeah, my quick (around 30 minutes) investigation was not able to uncover the problem :(
from quarkus.
FWIW, I maintain what I said about the jars for which we remove entries: they are put in lib/main
but I checked the md5sum and it seems OK.
from quarkus.
Hm, that's odd.
The transformed bytecode should be in quarkus-app/transformed-bytecode.jar
, so I am not sure what we're doing to the original jars
from quarkus.
Yeah so it seems to work for me but I have no idea why your changes didn't fix the issue too as it should do the same thing in the end.
Let me clean my patch so that you can test it on your side too.
from quarkus.
Sure thing
from quarkus.
What surprises me a bit is that in the end it does something very similar to what you did, except you enforced a specific timestamp.
Note that I was testing it with Maven and the Hibernate Validator IT instead of the original reproducer.
The Hibernate Validator IT is interesting as we actually remove an entry from the H2 jar, which triggers what I was mentioning.
from quarkus.
With this patch, I did ~6 builds and I got the exact same digest for the lib/main layer.
from quarkus.
I cloned #39147 and tried a few builds, it seems to be working !
Nice work !
from quarkus.
Thanks for checking!
from quarkus.
Related Issues (20)
- Investigate SharedOpenArchivePathTree users counting HOT 4
- ArC: add ability to initialize synthetic beans eagerly HOT 3
- Gradle: cannot override the version of a dependency defined in the BOM HOT 2
- Quarkus CLI reports `Unmatched argument at index 2` error when running a command that doesn't exist HOT 1
- Flyway dev UI should allow me to create a migration script HOT 1
- Option `quarkus.log.syslog.max-length` ignores text of the message HOT 4
- Integration tests against AWS deployed services HOT 5
- Kubernetes Job does not inherit customization made to the Kubernetes deployment HOT 5
- Running Quarkus CLI rewrites gradle.properties HOT 1
- Add -DmicroOnly or similar to quarkus:update
- Multipart @FormParam on EntityPart not working according to Jakarta RESTful Web Services 3.1 HOT 5
- Remove @RestClient annotation and handle like normal bean HOT 19
- Scheduler: introduce a build item equivalent of quarkus.scheduler.start-mode=forced HOT 1
- Documentation describing Basic authentication stress additional complexity while this complexity is handled by extensions providing IdentityProvider HOT 6
- Add pagination fields in response or headers for rest-data-panache HOT 1
- HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance HOT 7
- CDI not working with @QuarkusComponentTest HOT 6
- [Extension Proposal] AsyncAPI generator HOT 4
- continous testing - problem with @Nested @Nested: java.nio.file.FileSystemNotFoundException: Provider "quarkus" not installed
- Error Quarkus Native Build step org.apache.camel.quarkus.core.deployment.CamelProcessor#camelServices threw an exception: java.nio.file.ClosedFileSystemException HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quarkus.