vlingo / xoom-schemata

The VLINGO XOOM Schema Registry.
https://vlingo.io
Mozilla Public License 2.0
17 stars 9 forks source link

CodeResource "missing context in handler" fixme #160

Closed Florian-Schoenherr closed 4 years ago

Florian-Schoenherr commented 4 years ago

Problem: We don't have context() anymore when using DynamicResourceHandler. See: https://github.com/vlingo/vlingo-schemata/blob/a6e682f64e636214b3e1636318c5b047cf58b92e/src/main/java/io/vlingo/schemata/resource/CodeResource.java#L76 This is also marked with "FIXME", so maybe now is the time to fix it. As far as I know, context() shouldn't be used directly, right? I also don't really know why we mock auth here. Maybe this had to do with some already resolved stuff, let me know.

related: #55 #60

Florian-Schoenherr commented 4 years ago

I got it to work by commenting out the context/collector parts of it. I would like to know how this was meant to work, what this was meant to do. @VaughnVernon you probably have a grasp on this, see related issue.

VaughnVernon commented 4 years ago

I added support for Context. Please see this closed issue. You can manually activate it in schemata by passing a self reference when instantiating the ResourceBuilder. You may close this once you see it's working.

https://github.com/vlingo/vlingo-xoom/issues/4

Florian-Schoenherr commented 4 years ago

recordDependency was never implemented, so I could add context back but it wouldn't do anything. Should I just log the context/request to see if it works?

VaughnVernon commented 4 years ago

Sure. Demonstrate that it could work if it is needed.

I haven't looked at the feature. Is it important to support this? Any idea why it isn't supported?

Florian-Schoenherr commented 4 years ago

I don't know, maybe there were some more plans for schemata to have generated codes depend on each other?

There is no dependency resolver implementation; if one SchemaVersion has a dependency on another named SchemaVersion there is no way to resolve that dependency type. #55

No idea what this means.

Authorization would get validated afterwards in io.vlingo.schemata.query.CodeQueriesActor#validate. #55

That method doesn't exist anymore, maybe this is just old.

VaughnVernon commented 4 years ago

@Florian-Schoenherr Please make the adjustments to the code so that it can access that Context and close this issue. Then create a new issue to figure out for what use this was intended. It may be that we decide to remove the code rather than allow it to push us to something we don't need, or worse yet, someone later assumes that it works and exposes it to the UI and CLI.

Florian-Schoenherr commented 4 years ago

Fixed by this