-
Notifications
You must be signed in to change notification settings - Fork 12
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 HarvesterSchema #37
Conversation
Signed-off-by: Francesco Torchia <[email protected]>
33ed717
to
53cebba
Compare
Signed-off-by: Francesco Torchia <[email protected]>
53cebba
to
780b258
Compare
const harvesterFactory = (): CoreStoreSpecifics => { | ||
const harvesterFactory = (config): CoreStoreSpecifics => { | ||
SteveSchema.reset(config.namespace); | ||
|
||
const steveFactory = SteveFactory(null, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't look right. the first arg is namespace which i think is important?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix from https://github.com/harvester/harvester-ui-extension/pull/36/files looks a bit scary too. That will overwrite the core schema for all stores without it being in the harvester
folder.
Could be this line breaking it, given the namespace is missing it's not using /schema?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it adding the config
param to this code, but I still have the bug. I'm going to close this PR since it's not actually fixing the issue.
import { SteveFactory, steveStoreInit } from '@shell/plugins/steve/index'; | ||
import { PRODUCT_NAME } from '../../config/harvester'; | ||
import getters from './getters'; | ||
import mutations from './mutations'; | ||
import actions from './actions'; | ||
|
||
const harvesterFactory = (): CoreStoreSpecifics => { | ||
const harvesterFactory = (config): CoreStoreSpecifics => { | ||
SteveSchema.reset(config.namespace); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be needed. this store inherits the steve mutation reset
which does this
@richard-cox I'm closing this PR since I still get the error. |
Summary
pkg/harvester/models/harvester/schema.js
file.shell
using yarn link, there is no error (no need to callSteveSchema.reset()
).PR Checklists
Related Issue harvester/harvester#7007