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

Update AddDataSource offline command based on WFLY-18324 #235

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

marekkopecky
Copy link
Contributor

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.

@marekkopecky
Copy link
Contributor Author

@simkam Can you please check this PR?

@simkam simkam self-assigned this Sep 2, 2024
@simkam
Copy link
Collaborator

simkam commented Sep 3, 2024

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 #232, but we need at least also 30 because WFLY-18324 was fixed there.

@simkam
Copy link
Collaborator

simkam commented Sep 9, 2024

@marekkopecky we have added WF30 support, can you please rebase this and include condition mentioned above, WF30 management version is VERSION_23_0_0.

@marekkopecky
Copy link
Contributor Author

marekkopecky commented Sep 10, 2024

@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 ...

@simkam
Copy link
Collaborator

simkam commented Sep 10, 2024

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.

@marekkopecky
Copy link
Contributor Author

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">

@marekkopecky
Copy link
Contributor Author

@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 ...

@marekkopecky
Copy link
Contributor Author

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 ...

@marekkopecky
Copy link
Contributor Author

I added a workaround for a detection of datasource subsystem version, as we discussed on chat

@simkam simkam merged commit d66d1b5 into wildfly-extras:main Sep 12, 2024
8 checks passed
@simkam
Copy link
Collaborator

simkam commented Sep 12, 2024

Thank You!

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.

2 participants