Closed marekkopecky closed 1 month ago
@simkam Can you please check this PR?
We need to use the correct command depending on the server version
if (serverVersion.lessThan(ServerVersion.VERSION_X_X_X)) {
use elements
} else {
use attributes
}
The problem is that our last version in creaper is WildfFly 28. There is WIP https://github.com/wildfly-extras/creaper/pull/232, but we need at least also 30 because WFLY-18324 was fixed there.
@marekkopecky we have added WF30 support, can you please rebase this and include condition mentioned above, WF30 management version is VERSION_23_0_0
.
@simkam Thank you for your feedback! Do you know how creaper parse server version? I'm using WF from master branch (34.0.0.Beta1-SNAPSHOT which is using wf-core 26.0.0.Beta2), but creaper reports server-version 20.0.0.
I updated PR and add version detection, but it just doesn't work during CI runs, because creaper detect server version wrongly ...
Hmm, Creaper relies on the root namespace version in the configuration file and expects it to be the same as the management version. It might be a bug in WildFly; let's take a closer look.
Ok, got it, thanks!
management versions:
$ ./jboss-cli.sh -c "--command=:read-resource" | grep management.*version
"management-major-version" => 27,
"management-micro-version" => 0,
"management-minor-version" => 0,
namespace version:
$ cat standalone.xml | grep server.*xmlns
<server xmlns="urn:jboss:domain:20.0">
@simkam The change from WFLY-18324 has been implemented in WF30. WF29 has the same xmlns as wf34: <server xmlns="urn:jboss:domain:20.0">
. So xmlns of server element can't be used for differentiate different datasource security definition. Is this a bug in WF? I can report product jira for it ...
Anyway, I reverted latest commit, because it doesn't seem to be working. Please let me know if you prefer another effort on this PR ...
I added a workaround for a detection of datasource subsystem version, as we discussed on chat
Thank You!
WFLY-18324 introduce new user-name and password attributes and drop user-name and password elements in configuration.
security-domain element in security element hasn't been changed, see latest xsd here.
This PR changes AddDataSource creaper command based on the latest changes.