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

Fix for issue #381 / Unparsed config args #382

Closed
wants to merge 1 commit into from

Conversation

vossen-adobe
Copy link
Contributor

#381

Invocation Defaults for user-sync-config now parsed if they are list type correctly. Added small parser for ID to do this. It parses the key values such that they match the corresponding command line values.

For example, specifying groups in the invocation defaults now yields an input list of:
['group', 'GroupA,GroupB']

Previously, it was parsed as a single value like this:
['group "GroupA,GroupB"]

Which could not be intepreted as a valid argument.

This fix resolves other list inputs as well:
eg, adobe-only-user-action write-file xyz.csv now works too from invocation defaults.

Invocation Defaults for user-sync-config now parsed if they are list type correctly.  Added small parser for ID to do this.
@adorton-adobe adorton-adobe self-requested a review August 29, 2018 22:00
@adorton-adobe
Copy link
Collaborator

@janssenda-adobe - It's not clearly documented, but I believe the intent is for compound arguments such as --users group "GroupA,GroupB" or --users file users.csv to be specified as arrays.

users: ['group', 'GroupA,GroupB']
users: ['file', 'users.csv']

If a string is passed to list-type invocation default (like connector or users), it will be added to a single-element list in DictConfig.get_list().

        if value is not None and not isinstance(value, list):
            value = [value]

Thank you for looking into this, but I'm going to close this PR since it's a documentation issue and not a bug with the config module. I've already created an issue to update the documentation - #387

Would you mind reviewing the doc update when I finish it?

@vossen-adobe
Copy link
Contributor Author

@adorton-adobe absolutely!

@adorton-adobe adorton-adobe deleted the fix-unparsed-args-381 branch April 8, 2022 15:59
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