Skip to content

Conversation

soul2zimate
Copy link
Contributor

@soul2zimate soul2zimate commented Jul 4, 2022

Issue: https://issues.redhat.com/browse/JBEAP-23777

please see more information in the issue. thanks.

@kabir please review

@kabir
Copy link
Contributor

kabir commented Jul 4, 2022

@soul2zimate I am not super-familiar, but I think it sounds like you and Brad have got it working? @aloubyansky any concerns?

@soul2zimate
Copy link
Contributor Author

soul2zimate commented Jul 4, 2022

I'd appreciate more eyes on this, I don't want to break anything in patching :)

I didn't ask @bmaxwell to test it as this needs schema change to work.

Basically, this would allow to define a XP one-off patch config like:
<one-off name="jboss-eap-xp-4.0" applies-to-version="4.0.0.GA" override-identity="true"/>

Then, go ahead call patch-gen to create XP one-off patch zip file with patch.xml content like:

<?xml version="1.0" ?>

<patch xmlns="urn:jboss:patch:1.2" id="eapxp-400-745-jbeap-1234">
    <description>
        test
    </description>
    <no-upgrade name="jboss-eap-xp-4.0" version="4.0.0.GA"/>

Once we apply the XP one-off patch.zip file on server, it writes to jboss-eap-xp-4.0.conf rather than JBoss EAP.conf.

@aloubyansky
Copy link
Contributor

@soul2zimate I'd suggest you and @bmaxwell confirm this is working the way you want it. It's been 5 years since I touched this project and I may be missing some details.

…arated from base server in patch-config file.
@soul2zimate soul2zimate force-pushed the JBEAP-23777-master branch from 359f1db to a3b1c4e Compare July 5, 2022 06:43
@soul2zimate
Copy link
Contributor Author

I have added a small test in PatchConfigXmlUnitTestCase.java

Hi @bmaxwell, please give this a try when you come back.

Basically, we need to build a patch-gen SNAPSHOT including this fix, and define a XP one-off patch config like:

<one-off name="jboss-eap-xp-4.0" applies-to-version="4.0.0.GA" override-identity="true"/>

Then continue generate the patch file as usual and apply it to server.

@kabir
Copy link
Contributor

kabir commented Jul 11, 2022

Basically, we need to build a patch-gen SNAPSHOT including this fix

I guess that is good as a test - but that the intent is for this to be merged and released in a future patch-gen?

@soul2zimate
Copy link
Contributor Author

Yes, we would need to merge and release a new patch-gen.

But before that, I'd like Brad confirm changes on JBEAP-23777-master branch fix all he wants.

@kabir
Copy link
Contributor

kabir commented Jul 11, 2022

@soul2zimate Makes perfect sense - thank you

@soul2zimate soul2zimate marked this pull request as draft July 13, 2022 01:42
@soul2zimate
Copy link
Contributor Author

just want to mention that since we write the XP one-off patching information into jboss-eap-xp-4.0.conf,
--patch-stream="jboss-eap-xp-4.0" must be provided to display XP one-off patch. For example:

[standalone@localhost:9990 /] patch history --patch-stream="jboss-eap-xp-4.0"
[standalone@localhost:9990 /] patch info "my-eapxp-400-745-jbeap-1234" --patch-stream="jboss-eap-xp-4.0"

or 

[standalone@localhost:9990 /] /core-service=patching/patch-stream=jboss-eap-xp-4.0:show-history
[standalone@localhost:9990 /] /core-service=patching/patch-stream=jboss-eap-xp-4.0:patch-info(patch-id=my-eapxp-400-745-jbeap-1234)

Because it by default checks default identity "JBoss EAP"

and we won't see XP one-off patch appear in auto completion candidates for command patch info and patch rollback, but we can still rollback with the patch id.

@soul2zimate soul2zimate marked this pull request as ready for review July 13, 2022 03:17
@bmaxwell
Copy link

@soul2zimate I tested, it looks like it works:

WFLYPAT0050: JBoss EAP cumulative patch ID is: jboss-eap-7.4.5.CP, one-off patches include: none
WFLYPAT0050: jboss-eap-xp-4.0 cumulative patch ID is: jboss-eap-xp-4.0.0.CP, one-off patches include: eapxp-400-745-jbeap-123456

@aloubyansky aloubyansky merged commit bd8b41c into jbossas:master Jul 15, 2022
@aloubyansky
Copy link
Contributor

2.1.3.Final containing this change was released https://github.com/jbossas/patch-gen/releases/tag/2.1.3.Final. Thanks everyone!

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.

4 participants