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

[WFCORE-7079] Remove ModuleIdentifier usage from Version module #6268

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

yersan
Copy link
Collaborator

@yersan yersan commented Dec 3, 2024

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci
Copy link

Core -> WildFly Preview Integration Build 14162 outcome was UNKNOWN using a merge of 0a22c5e
Summary: Canceled (Error while applying patch; cannot find commit 042141d in the https://github.com/wildfly/wildfly-core.git repository, possible reason: refs/pull/6268/merge branch was updated and the commit selected for the ... Build time: 00:00:17

@wildfly-ci

This comment was marked as outdated.


private ProductConfProps(String slot) {
this.productModuleId = slot == null ? null : ModuleIdentifier.create("org.jboss.as.product", slot);
this.productModuleId = slot == null ? null : "org.jboss.as.product:" + slot;
Copy link
Contributor

@bstansberry bstansberry Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yersan This needs to be:

this.productModuleId = slot == null ? null : ("main".equals(slot) ? "org.jboss.as.product" : "org.jboss.as.product:" + slot);

or something equivalent.

This constructor is called with slot == "main", and the canonical string representation of a module with slot 'main' is to NOT include ":main". The ModuleIdentifier class implements that logic. Where we discard its use we need to implement it ourselves.

I want to add utility methods that we can call throughout WF to handle this kind of thing, somewhere in the 'controller' or 'server' modules, but for the 'version' module I think I just needs to be manually coded.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#6270is the proposed utility. But, not usable here. Not really needed either, as the use case here is simple. That PR has a lot of code related to escaping arbitrary inputs but I think this code can assume that any slot value is simple text that doesn't need escaping.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bstansberry bstansberry merged commit 288c84d into wildfly:main Dec 12, 2024
12 of 13 checks passed
@bstansberry
Copy link
Contributor

Thanks @yersan

@yersan yersan deleted the WFCORE-7079 branch December 12, 2024 17:21
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.

3 participants