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

The Sync Status on the modeling page is unsync after onboarding process finished. #706

Closed
onlyjackfrost opened this issue Oct 3, 2024 · 5 comments · Fixed by #745
Closed
Assignees
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest

Comments

@onlyjackfrost
Copy link
Contributor

onlyjackfrost commented Oct 3, 2024

Describe the bug
The Sync Status on the modeling page has a probability of being Undeployed changes after the onboarding process is finished.

To Reproduce
Steps to reproduce the behavior:

  1. Start a new data source / Reset your Project
  2. Finish the onboarding process
  3. Go to the modeling page
  4. See the sync status in the header bar, seeing "Undeployed changes"

Expected behavior
The sync status should be "synced" with a green check icon

Desktop (please complete the following information):

  • OS: mac
  • Browser chrome

Wren AI Information

  • Version: 0.10.0
  • LLM_PROVIDER= openai_llm
  • using Postgres as the wren UI storage

Solutions
The cause of this bug is the order of mdl columns & models were not consistent
In the src/apollo/server/mdl/mdlBuilder.ts file, modify the MDLBuilder constructor to sort the input columns, models, and relations by their keys.

@onlyjackfrost onlyjackfrost added bug Something isn't working good first issue Good for newcomers hacktoberfest labels Oct 3, 2024
@hpatel292-seneca
Copy link
Contributor

Hi @onlyjackfrost, can I work on this issue?

@onlyjackfrost
Copy link
Contributor Author

assigned

@hpatel292-seneca
Copy link
Contributor

hpatel292-seneca commented Oct 8, 2024

@onlyjackfrost I am not able to reproduce the issue.
image
I followed https://docs.getwren.ai/oss/getting_started/own_data this steps to add DuckDB data source and the provided Screenshot is what I can see after connecting to data source. Where I can find sync/unsync status?

@onlyjackfrost
Copy link
Contributor Author

onlyjackfrost commented Oct 9, 2024

@hpatel292-seneca My bad, the "Undeployed changes" on the screenshot you provide is the "unsynced" I said.

@hpatel292-seneca
Copy link
Contributor

Hi @onlyjackfrost, I tried printing how the model looks like in src/apollo/server/mdl/mdlBuilder.ts Here is what I got

 Models: [
  {
    id: 19,
    projectId: 3,
    displayName: 'customers',
    sourceTableName: 'olist_customers_dataset',
    referenceName: 'olist_customers_dataset',
    refSql: null,
    cached: 0,
    refreshTime: null,
    properties: '{"schema":"main","catalog":"memory","table":"olist_customers_dataset","displayName":"customers"}',
    createdAt: '2024-10-09 15:14:04',
    updatedAt: '2024-10-09 15:14:04'
  },

and you mentioned sorting this by their keys. Do you mean ID?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest
Projects
Status: Done
2 participants