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

Improve handling of instance changes #3768

Merged
merged 7 commits into from
Sep 3, 2024
Merged

Conversation

ghsolomon
Copy link
Contributor

@ghsolomon ghsolomon commented Aug 28, 2024

Hoist P/R Checklist

Pull request authors: Review and check off the below. Items that do not apply can also be
checked off to indicate they have been considered. If unclear if a step is relevant, please leave
unchecked and note in comments.

  • Caught up with develop branch as of last change.
  • Added CHANGELOG entry, or determined not required.
  • Reviewed for breaking changes, added breaking-change label + CHANGELOG if so.
  • Updated doc comments / prop-types, or determined not required.
  • Reviewed and tested on Mobile, or determined not required.
  • Created Toolbox branch / PR, or determined not required.

If your change is still a WIP, please use the "Create draft pull request" option in the split
button below to indicate it is not ready yet for a final review.

Pull request reviewers: when merging this P/R, please consider using a squash commit to
collapse multiple intermediate commits into a single commit representing the overall feature
change. This helps keep the commit log clean and easy to scan across releases. PRs containing a
single commit should be rebased when possible.

@ghsolomon
Copy link
Contributor Author

Associated with HC PR: xh/hoist-core#387

@ghsolomon
Copy link
Contributor Author

Note: should test in stage to ensure properly handles changing instances (unable to test locally)

},
{
track: () => XH.environmentService.serverInstance,
run: () => this.gridModel.agApi.refreshCells({columns: ['name'], force: true})
Copy link
Member

Choose a reason for hiding this comment

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

no need to be stingy about the columns that get refreshed here!

Copy link
Member

Choose a reason for hiding this comment

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

Just refreshAsync()? Seems like a very good time to ensure your entire picture of what's in the cluster is up to date.

private checkServerVersionAsync = async () => {
const data = await XH.fetchJson({url: 'xh/version'}),
{instanceName, appVersion, appBuild, mode} = data;
private checkServerStatusAsync = async () => {
Copy link
Member

Choose a reason for hiding this comment

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

again -- only concern here is with the new name -- what if we called it serverInfo

Copy link
Member

Choose a reason for hiding this comment

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

Or 'serverCheck'

amcclain and others added 6 commits August 30, 2024 18:10
+ Tailor /xh/environment return based on auth user - support minimal unauthorized payload for backwards compat with existing usages, but mix-in full details for authenticated users.
+ Client now calls this endpoint both for initial load and for ongoing polling.
+ Rework `xhAppStatusCheck` to `xhEnvPollingConfig`, nest within authenticated /xh/environment return. Client reads and respects changes to config updates, with some sanity checks.
+ Restore /xh/version for backwards compat, return minimal environment summary.
# Conflicts:
#	admin/tabs/cluster/ClusterTabModel.ts
},
{
track: () => XH.environmentService.serverInstance,
run: () => this.gridModel.agApi.refreshCells({columns: ['name'], force: true})
Copy link
Member

Choose a reason for hiding this comment

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

Just refreshAsync()? Seems like a very good time to ensure your entire picture of what's in the cluster is up to date.

@lbwexler lbwexler merged commit 44efc88 into develop Sep 3, 2024
2 checks passed
@lbwexler lbwexler deleted the handleInstanceChanges branch September 3, 2024 20:43
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.

3 participants