Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Wash returns wrong type ID for external plugin that uses core plugin entries #727

Closed
ekinanp opened this issue Feb 11, 2020 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@ekinanp
Copy link
Contributor

ekinanp commented Feb 11, 2020

Wash lets external plugin authors take advantage of core plugin entries. Currently, only the volume::fs entry is used. These core entries have special type IDs meant to minimize conflicts. For volume::fs, this is __volume::fs__. However, external plugin#List returns the core plugin entry version of volume::fs (i.e. volume.FS); this entry's type ID is the struct class name. Hence, there's a type ID mismatch. This affects commands like find because find cannot recurse into those entries (since its recursion stops at a nil schema).

Fix is to probably wrap core plugin entries into something that implements the external plugin entry interface.

@ekinanp ekinanp added the bug Something isn't working label Feb 11, 2020
@ekinanp
Copy link
Contributor Author

ekinanp commented Feb 25, 2020

Alternative fix is to just munge schema graph to use the raw type ID. E.g. instead of storing as __volume::fs__, we store as plugin.RawTypeID(&volume.FS{}). That's what I'll do.

@ekinanp ekinanp self-assigned this Feb 25, 2020
ekinanp added a commit to ekinanp/wash that referenced this issue Feb 25, 2020
Fixes puppetlabs-toy-chest#727

Signed-off-by: Enis Inan <enis.inan@puppet.com>
@MikaelSmith
Copy link
Contributor

Can revert puppetlabs-toy-chest/boltwash#9 once a fix for this is released.

ekinanp added a commit to ekinanp/wash that referenced this issue Feb 27, 2020
This way, commands like stree and find do the right thing.

Fixes puppetlabs-toy-chest#727

Signed-off-by: Enis Inan <enis.inan@puppet.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants