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

Layertools list and extract commands ignore empty layers #21301

Closed
ciberkleid opened this issue May 3, 2020 · 1 comment
Closed

Layertools list and extract commands ignore empty layers #21301

ciberkleid opened this issue May 3, 2020 · 1 comment
Labels
type: bug A general bug
Milestone

Comments

@ciberkleid
Copy link

ciberkleid commented May 3, 2020

I believe issue 20858 (Ensure empty layers are written to the index file), which was closed as fixed in RC1, is still happening. I update my boot version to RC1 for a project that does not use any snapshots and am still getting an unpacked directory that is missing the snapshots folder, hence the following Dockerfile excerpt fails saying the folder does not exist:

ARG DEPENDENCY=/app/target/dependency
COPY --from=build ${DEPENDENCY}/dependencies/ .
COPY --from=build ${DEPENDENCY}/spring-boot-loader/ .
COPY --from=build ${DEPENDENCY}/snapshot-dependencies/ .   # <---- fails here
COPY --from=build ${DEPENDENCY}/application/ .

From my pom.xml:

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.0.RC1</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

I even tried specifying the version under the maven plugin as well.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 3, 2020
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 4, 2020
@wilkinsona wilkinsona modified the milestones: 2.3.x, 2.3.0 May 4, 2020
@wilkinsona
Copy link
Member

Thanks for the report, @ciberkleid. With the fix for #20858, the empty layer is written into the index file, however we missed the other half of the problem which is making sure that it's read back out again. IndexedLayers currently does not do that, accidentally ignoring any layer that has no content.

@wilkinsona wilkinsona changed the title Layertools jar extract is missing empty snapshot-dependencies folder (tested with RC1) Layertools list and extract commands ignore empty layers May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants