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

Add mechanism for plugin to normalize attributes #2376

Merged
merged 3 commits into from
Aug 18, 2022

Conversation

jefferai
Copy link
Member

@jefferai jefferai commented Aug 18, 2022

This introduces a new normalization call to the plugin RPC service. If
implemented, the plugin will be given the attributes prior to saving
them in a create/update call, and can perform any normalization needed,
e.g. ensuring that a parameter passed in is represented in a canonical
way. As an example, the CLI allows a user of the AWS plugin to pass in a
string, but canonically it is a string slice, and should be returned
that way as well. Not by chance, this is the exact behavior of the
testing implementation of this function.

This does not update any individual plugin, but rather sets the
controller-side logic up for plugins to support this functionality.

@jefferai jefferai added this to the 0.10.3 milestone Aug 18, 2022
@jefferai jefferai force-pushed the jefferai-update-plugin-attrs-from-plugin branch from 798e8c1 to 328d363 Compare August 18, 2022 02:29
This introduces a new normalization call to the plugin RPC service. If
implemented, the plugin will be given the attributes prior to saving
them in a create/update call, and can perform any normalization needed,
e.g. ensuring that a parameter passed in is represented in a canonical
way. As an example, the CLI allows a user of the AWS plugin to pass in a
string, but canonically it is a string slice, and should be returned
that way as well. Not by chance, this is the exact behavior of the
testing implementation of this function.

This does not update any individual plugin, but rather sets the
controller-side logic up for plugins to support this functionality.
@jefferai jefferai force-pushed the jefferai-update-plugin-attrs-from-plugin branch from 328d363 to a221f17 Compare August 18, 2022 02:32
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

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

The make-gen-deltas job is still failing

@johanbrandhorst
Copy link
Collaborator

The docker job will keep failing until this is rebased on main, or you can ignore it and just merge, it is fixed in main.

@jefferai jefferai merged commit 7364d84 into main Aug 18, 2022
@jefferai jefferai deleted the jefferai-update-plugin-attrs-from-plugin branch August 18, 2022 19:39
elimt added a commit that referenced this pull request Jun 15, 2023
onUpdate for host catalog & host set make a call to the plugin to normalize attributes based in. This behavior was introduced [PR-2376](#2376) but was only applied on onUpdate. This created different data structures for onCreate calls and onUpdate calls.
elimt added a commit that referenced this pull request Jun 15, 2023
onUpdate for host catalog & host set make a call to the plugin to normalize attributes based in. This behavior was introduced [PR-2376](#2376) but was only applied on onUpdate. This created different data structures for onCreate calls and onUpdate calls.
elimt added a commit that referenced this pull request Jun 20, 2023
onUpdate for host catalog & host set make a call to the plugin to normalize attributes based in. This behavior was introduced [PR-2376](#2376) but was only applied on onUpdate. This created different data structures for onCreate calls and onUpdate calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants