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

Show datasource configuration status #163

Merged
merged 4 commits into from
Dec 23, 2024

Conversation

OvidiuCode
Copy link
Contributor

Stable release checklist:

  • Updated the version using python -m dev set-version {version}
  • Updated /docs/changelog.md with the changes for the release

Pre-release checklist:

  • Updated the Unreleased section of /docs/changelog.md with the new changes.

return;
}

this.globalDataSourceState.clear();
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't want to clear the previous values, rather you want to compare and if the values change then you'll call fireRootChange.

@@ -232,6 +232,11 @@ export function registerViews(context: ExtensionContext) {
"treeDataProvider": robotsTreeDataProvider,
});

// Periodic refresh every 60 seconds
setInterval(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not poll for now and instead call robotsTreeDataProvider.updateDatasourceStatuses() (without waiting) in the following situations:

  • when the root element (undefined) is asked in async getChildren(element?: RobotEntry): Promise<RobotEntry[]> { -- in viewsRobots.ts.

  • Whenever we drop or setup a data source or we finish awaiting for a model to be trained.

Please create a separate function for that as we may want to do more things (such as notifying the data extension when these things happen).

let isConfigured = dataSourcesFromActionPackage?.get(dbName)?.configured;

let name = `${dbName} ?`;
if (isConfigured !== undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also show the training state (when it's a model).

@OvidiuCode OvidiuCode marked this pull request as ready for review December 23, 2024 16:19
@OvidiuCode OvidiuCode merged commit b1b941a into master Dec 23, 2024
10 checks passed
@OvidiuCode OvidiuCode deleted the feature/show-datasource-status branch December 23, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants