You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by "muyangye (via GitHub)" <gi...@apache.org> on 2023/09/05 21:51:01 UTC
[D] A potential bug in the future or is this the expected behavior?
GitHub user muyangye created a discussion: A potential bug in the future or is this the expected behavior?
I am not sure if this is a bug or the expected behavior so I am not opening an issue but a discussion. Also, there's currently no processor that satisfies the "How to Reproduce" requirements. However, I still want to report it as users may modify processors on their own and encounter this.
### What happened?
I modified the PropertyScope of **BooleanOperatorProcessor** from PropertyScope.NONE to PropertyScope.MEASUREMENT_PROPERTY:

So now b4, whose PropertyScope is PROPERTY_SCOPE.HEADER_PROPERTY, is not shown in the UI:

But its value is always **true**:

After I clicked **SELECT ALL** in the UI and connected to a DataLake, the result is:

Clearly this is not what I expected since the UI only shows b0, b1, and b2. However, it seems that the result takes into account of b4. As evident not only by the above picture but also my debug message that prints all input streams:

However, if I didn't click **SELECT ALL** but instead clicked b0, b1, and b2 one by one, the result becomes correct:

### How to Reproduce?
Requirements:
1. Any processor that uses Nary Property Mapping (so that there's a **SELECT ALL** button in the UI)
2. PropertyScope set to anything that is NOT PropertyScope.NONE
3. There exists a property in the input stream that satisfies EpRequirements but is not the same PropertyScope as in the code
4. Click **SELECT ALL** in the UI
Again, as far as I can tell, there's no processor that both satisfies 1 and 2. So I am wondering if the developer is expected to set PropertyScope to PropertyScope.NONE when the mapping is Nary. If not, I am pretty sure this will come up in the future when there is such a combination of PropertyMapping, PropertyScope, and input stream described above.
### Are you willing to submit a PR?
If everyone thinks this is indeed a bug instead of the expected behavior, I will submit an issue and try to investigate the root cause.
GitHub link: https://github.com/apache/streampipes/discussions/1872
----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org
Re: [D] A potential bug in the future or is this the expected behavior?
Posted by "muyangye (via GitHub)" <gi...@apache.org>.
GitHub user muyangye added a comment to the discussion: A potential bug in the future or is this the expected behavior?
Hi @dominikriemer, thanks for the quick answer!
You are totally correct. I didn't notice there is a `Show only recommended` slider before, after disabling it b4 showed up. I have looked into the Typescript code that filters properties based on property scopes so I guess this isn't really a bug since that's the expected logic. That being said, The fact that NaryMappingProperty has `Show only recommended` default to true is somewhat confusing since it initially selects all properties and `SELECT ALL` also selects all properties, including the ones that are hidden by the `Show only recommended` slider. I think the slider should be changed to default false for NaryMappingProperty. I will submit an issue and discuss my intended approach more closely in the issue :)
GitHub link: https://github.com/apache/streampipes/discussions/1872#discussioncomment-6931061
----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org
Re: [D] A potential bug in the future or is this the expected behavior?
Posted by "muyangye (via GitHub)" <gi...@apache.org>.
GitHub user muyangye added a comment to the discussion: A potential bug in the future or is this the expected behavior?
Hi @dominikriemer, thanks for the quick answer!
You are totally correct. I didn't notice there is a Show only recommended slider before, after disabling it b4 showed up. I have looked into the Typescript code that filters properties based on property scopes so I guess this isn't really a bug since that's the expected logic. That being said, The fact that NaryMappingProperty has Show only recommended default to true is somewhat confusing since it initially selects all properties and SELECT ALL also selects all properties, including the ones that are hidden by the Show only recommended slider. I think the slider should be changed to default false for NaryMappingProperty. I will submit an issue and discuss my intended approach more closely in the issue :)
GitHub link: https://github.com/apache/streampipes/discussions/1872#discussioncomment-6931062
----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org
Re: [D] A potential bug in the future or is this the expected behavior?
Posted by "dominikriemer (via GitHub)" <gi...@apache.org>.
GitHub user dominikriemer added a comment to the discussion: A potential bug in the future or is this the expected behavior?
Hi @muyangye, thanks for this great description of the bug you encountered!
I have not yet found some time to reproduce the error, but I'm pretty sure it's a bug in the UI.
There is a slider in the pipeline element configuration dialog (`Show only recommended`), which basically hides fields based on the property scope (e.g., when a pipeline element requires a property scope `measurement`, all fields that have another property scope are hidden. If you deactivate the slider, you should see the whole list of properties.
My guess is that the UI widget for displaying the NaryMappingProperty selects all fields by default, and then hides fields based on the property scope, leading to the behaviour you described.
Do you think this could be the cause? Then we can create an issue and should be able to quickly solve the bug. If not, I'll try to reproduce the error in the next day or two :-)
Thanks again for the great feedback!
GitHub link: https://github.com/apache/streampipes/discussions/1872#discussioncomment-6928397
----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org
Re: [D] A potential bug in the future or is this the expected behavior?
Posted by "muyangye (via GitHub)" <gi...@apache.org>.
GitHub user muyangye edited a discussion: A potential bug in the future or is this the expected behavior?
I am not sure if this is a bug or the expected behavior so I am not opening an issue but a discussion. Also, there's currently no processor that satisfies the "How to Reproduce" requirements. However, I still want to report it as users may modify processors on their own and encounter this.
### What happened?
I modified the PropertyScope of **BooleanOperatorProcessor** from PropertyScope.NONE to PropertyScope.MEASUREMENT_PROPERTY:

So now b4, whose PropertyScope is PROPERTY_SCOPE.HEADER_PROPERTY, is not shown in the UI:

But its value is always **true**:

After I clicked **SELECT ALL** in the UI and connected to a DataLake, the result is:

Clearly this is not what I expected since the UI only shows b0, b1, and b2. However, it seems that the result takes into account of b4. As evident not only by the above picture but also my debug message that prints all input streams:

However, if I didn't click **SELECT ALL** but instead clicked b0, b1, and b2 one by one, the result becomes correct:

### How to Reproduce?
Requirements:
1. Any processor that uses Nary Property Mapping (so that there's a **SELECT ALL** button in the UI)
2. PropertyScope set to anything that is NOT PropertyScope.NONE
3. There exists a property in the input stream that satisfies EpRequirements but is not the same PropertyScope as in the code
4. Click **SELECT ALL** in the UI
Again, as far as I can tell, there's no processor that satisfies both 1 and 2. So I am wondering if the developer is expected to set PropertyScope to PropertyScope.NONE when the mapping is Nary. If not, I am pretty sure this will come up in the future when there is such a combination of PropertyMapping, PropertyScope, and input stream described above.
### Are you willing to submit a PR?
If everyone thinks this is indeed a bug instead of the expected behavior, I will submit an issue and try to investigate the root cause.
GitHub link: https://github.com/apache/streampipes/discussions/1872
----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org
Re: [D] A potential bug in the future or is this the expected behavior?
Posted by "muyangye (via GitHub)" <gi...@apache.org>.
GitHub user muyangye deleted a comment on the discussion: A potential bug in the future or is this the expected behavior?
Hi @dominikriemer, thanks for the quick answer!
You are totally correct. I didn't notice there is a `Show only recommended` slider before, after disabling it b4 showed up. I have looked into the Typescript code that filters properties based on property scopes so I guess this isn't really a bug since that's the expected logic. That being said, The fact that NaryMappingProperty has `Show only recommended` default to true is somewhat confusing since it initially selects all properties and `SELECT ALL` also selects all properties, including the ones that are hidden by the `Show only recommended` slider. I think the slider should be changed to default false for NaryMappingProperty. I will submit an issue and discuss my intended approach more closely in the issue :)
GitHub link: https://github.com/apache/streampipes/discussions/1872#discussioncomment-6931061
----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org
Re: [D] A potential bug in the future or is this the expected behavior?
Posted by "muyangye (via GitHub)" <gi...@apache.org>.
GitHub user muyangye edited a comment on the discussion: A potential bug in the future or is this the expected behavior?
Hi @dominikriemer, thanks for the quick answer!
You are totally correct. I didn't notice there is a `Show only recommended` slider before, after disabling it b4 showed up. I have looked into the Typescript code that filters properties based on property scopes so I guess this isn't really a bug since that's the expected logic. That being said, The fact that NaryMappingProperty has `Show only recommended` default to true is somewhat confusing since it initially selects all properties and `SELECT ALL` also selects all properties, including the ones that are hidden by the `Show only recommended` slider. I think the slider should be changed to default false for NaryMappingProperty. I will submit an issue and discuss my intended approach more closely in the issue :)
GitHub link: https://github.com/apache/streampipes/discussions/1872#discussioncomment-6931062
----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org
Re: [D] A potential bug in the future or is this the expected behavior?
Posted by "muyangye (via GitHub)" <gi...@apache.org>.
GitHub user muyangye edited a comment on the discussion: A potential bug in the future or is this the expected behavior?
Hi @dominikriemer, thanks for the quick answer!
You are totally correct. I didn't notice there is a `Show only recommended` slider before, after disabling it b4 showed up. I have looked into the Typescript code that filters properties based on property scopes so I guess this isn't really a bug since that's the expected logic. That being said, The fact that NaryMappingProperty has `Show only recommended` default to true is somewhat confusing since it initially selects all properties and `SELECT ALL` also selects all properties, including the ones that are hidden by the `Show only recommended slider`. I think the slider should be changed to default false for NaryMappingProperty. I will submit an issue and discuss my intended approach more closely in the issue :)
GitHub link: https://github.com/apache/streampipes/discussions/1872#discussioncomment-6931062
----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org