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

[master] WFCORE-692 read-children-names(include-aliases=true) can return phantom results #728

Merged
merged 1 commit into from May 15, 2015

Conversation

pferraro
Copy link
Contributor

… if another resource exists with the same key as tje target address of a resource alias.

https://issues.jboss.org/browse/WFCORE-692

@wildfly-ci
Copy link

Windows Build 1377 is now running using a merge of ef9666f

@wildfly-ci
Copy link

Linux Build 1822 is now running using a merge of ef9666f

@wildfly-ci
Copy link

Core - Full Integration Build 973 is now running using a merge of ef9666f

@wildfly-ci
Copy link

Windows Build 1377 outcome was SUCCESS using a merge of ef9666f
Summary: Tests passed: 3105, ignored: 69 Build time: 0:21:08

@wildfly-ci
Copy link

Linux Build 1822 outcome was SUCCESS using a merge of ef9666f
Summary: Tests passed: 3105, ignored: 69 Build time: 0:22:53

@wildfly-ci
Copy link

Core - Full Integration Build 973 outcome was FAILURE using a merge of ef9666f
Summary: Tests failed: 1 (1 new), passed: 2841, ignored: 375, muted: 2 Build time: 0:51:44

Build problems:

Failed tests detected

Failed tests

org.jboss.as.test.integration.jca.moduledeployment.PureJarTestCase: <no details avaliable>

@pferraro pferraro changed the title WFCORE-692 read-children-names(include-aliases=true) can return phantom results [master] WFCORE-692 read-children-names(include-aliases=true) can return phantom results May 14, 2015
@@ -687,7 +687,7 @@ public void execute(OperationContext context, ModelNode operation) throws Operat
PathAddress target = aliasEntry.convertToTargetAddress(addr.append(element));
PathAddress targetParent = target.subAddress(0, target.size() - 1);
Resource parentResource = context.readResourceFromRoot(targetParent, false);
if (parentResource != null && parentResource.hasChildren(target.getLastElement().getKey())) {
if (parentResource != null && parentResource.hasChild(target.getLastElement())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this needs logic to deal with the possibility that target.getLastElement().isWildcard() is true. If so there won't be a child at that address and it will need to be handled more like the "if" block above this "else" block.

I assume it's because of that case that the code was written the way it is, but that left the WFCORE-692 problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point - I'll adjust this.

@wildfly-ci
Copy link

Core - Full Integration Build 976 is now running using a merge of 64a7087

@wildfly-ci
Copy link

Linux Build 1826 is now running using a merge of 64a7087

@wildfly-ci
Copy link

Windows Build 1380 is now running using a merge of 64a7087

@wildfly-ci
Copy link

Windows Build 1380 outcome was SUCCESS using a merge of 64a7087
Summary: Tests passed: 3105, ignored: 69 Build time: 0:20:53

@wildfly-ci
Copy link

Linux Build 1826 outcome was SUCCESS using a merge of 64a7087
Summary: Tests passed: 3105, ignored: 69 Build time: 0:23:05

@wildfly-ci
Copy link

Core - Full Integration Build 976 outcome was SUCCESS using a merge of 64a7087
Summary: Tests passed: 2844, ignored: 375, muted: 1 Build time: 0:53:25

@bstansberry bstansberry added ready-for-merge This PR is ready to be merged and fulfills all requirements and removed ready-for-merge This PR is ready to be merged and fulfills all requirements labels May 14, 2015
if (parentResource != null) {
PathElement targetElement = target.getLastElement();
if (targetElement.isWildcard() ? parentResource.hasChildren(targetElement.getKey()) : parentResource.hasChild(targetElement)) {
set.add(element.getValue());
Copy link
Contributor

Choose a reason for hiding this comment

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

If targetElement.isWildcard(), then the names of all children of that type need to be added. This will add "*'. (The old code did too.) The block starting here does this:

https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/java/org/jboss/as/controller/operations/global/GlobalOperationHandlers.java#L678

This code could do the same thing, but using 'parentResource' instead of 'resource' and 'targetElement.getKey()' instead of 'childType'.

…om results if another resource exists with the same key as tje target address of a resource alias.
@wildfly-ci
Copy link

Windows Build 1382 is now running using a merge of 6975ba2

@wildfly-ci
Copy link

Linux Build 1829 is now running using a merge of 6975ba2

@wildfly-ci
Copy link

Core - Full Integration Build 978 is now running using a merge of 6975ba2

@wildfly-ci
Copy link

Windows Build 1382 outcome was SUCCESS using a merge of 6975ba2
Summary: Tests passed: 3105, ignored: 69 Build time: 0:21:03

@wildfly-ci
Copy link

Linux Build 1829 outcome was SUCCESS using a merge of 6975ba2
Summary: Tests passed: 3105, ignored: 69 Build time: 0:26:16

@wildfly-ci
Copy link

Core - Full Integration Build 978 outcome was FAILURE using a merge of 6975ba2
Summary: Tests failed: 1 (1 new), passed: 2844, ignored: 374, muted: 1 Build time: 0:53:52

Build problems:

Failed tests detected

Failed tests

org.jboss.as.test.clustering.messaging.ClusteredMessagingTestCase.testClusteredTopic: <no details avaliable>

@bstansberry bstansberry added the ready-for-merge This PR is ready to be merged and fulfills all requirements label May 15, 2015
bstansberry added a commit that referenced this pull request May 15, 2015
[master] WFCORE-692 read-children-names(include-aliases=true) can return phantom results
@bstansberry bstansberry merged commit 90ec715 into wildfly:master May 15, 2015
tterem pushed a commit to tterem/wildfly-core that referenced this pull request Mar 31, 2020
[JBEAP-17686] Upgrade picketbox to 5.0.3.Final-redhat-00005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to be merged and fulfills all requirements
Projects
None yet
3 participants