Fix the input parameter types accepted by the Ethernet IP PLC block for PLC reads/writes#2061
Open
Fix the input parameter types accepted by the Ethernet IP PLC block for PLC reads/writes#2061
Conversation
shntu
commented
Mar 2, 2026
|
|
||
| tags_to_write: Union[ | ||
| Dict[str, Union[int, float, str]], | ||
| WorkflowParameterSelector(kind=[LIST_OF_VALUES_KIND]), |
Contributor
Author
There was a problem hiding this comment.
LIST_OF_VALUES_KIND is incorrect here - when writing, we want a dictionary to match the Dict[str, Union[int, float, str]] in the previous line
shntu
commented
Mar 2, 2026
| tags_to_read: Union[ | ||
| List[str], WorkflowParameterSelector(kind=[LIST_OF_VALUES_KIND]) | ||
| List[str], | ||
| Selector(kind=[LIST_OF_VALUES_KIND]), |
Contributor
Author
There was a problem hiding this comment.
This block also does not include support for the regular Selector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR fixes a mismatch in the input types accepted by the
tags_to_writefunction -tags_to_readneeds aLIST_OF_VALUES_KINDsince it specifies a list of keys for which values need to be read.For
tags_to_writewe need to use aDICTIONARY_KINDsince these are key/value pairs that need to be written.Type of Change
Testing
Test details:
I included a set of unit tests that check the behavior of this block against a mocked server - also tested the code against a local development server.
Checklist
Additional Context
Currently, this block allows users to read from a PLC properly, but the tag writing functionality does not work when a workflow output step is used because of a mismatch in the expected type.