Skip to content

feat(plugin-meetings): optimize the order of data sets initialization#4821

Merged
marcin-bazyl merged 6 commits intowebex:nextfrom
shnaaz:shnaaz/feat/SPARK-779086
Apr 10, 2026
Merged

feat(plugin-meetings): optimize the order of data sets initialization#4821
marcin-bazyl merged 6 commits intowebex:nextfrom
shnaaz:shnaaz/feat/SPARK-779086

Conversation

@shnaaz
Copy link
Copy Markdown
Contributor

@shnaaz shnaaz commented Mar 31, 2026

COMPLETES #< INSERT LINK TO ISSUE >

https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-779086

This pull request addresses

Prioritize initializing the most important data sets first "main" and "self"
< DESCRIBE THE CONTEXT OF THE ISSUE >

by making the following changes

< DESCRIBE YOUR CHANGES >

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

Make sure to have followed the contributing guidelines before submitting.

@aws-amplify-us-east-2
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-4821.d3m3l2kee0btzx.amplifyapp.com

@shnaaz shnaaz marked this pull request as ready for review April 1, 2026 10:22
@shnaaz shnaaz requested review from a team as code owners April 1, 2026 10:22
@shnaaz shnaaz added the validated If the pull request is validated for automation. label Apr 1, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 401a519eca

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

const updatedObjects: HashTreeObject[] = [];

for (const dataSet of visibleDataSets) {
for (const dataSet of sortByInitPriority(visibleDataSets)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore main-before-self order for initialization updates

Sorting visibleDataSets with sortByInitPriority makes self initialization run before main, which changes the order of updatedObjects emitted from initial sync. On first hash-tree bootstrap, LocusInfo.updateFromHashTree starts from an empty locus, and updateLocusFromHashTreeObject only creates a webinar attendee participant from self when locus.info?.isWebinar is already present (see packages/@webex/plugin-meetings/src/locus-info/index.ts, ObjectType.self handling). Processing self before main means that condition is false, so the self participant is skipped for that batch and downstream code that expects it can misbehave.

Useful? React with 👍 / 👎.

Comment thread packages/@webex/plugin-meetings/src/hashTree/utils.ts Outdated
Comment thread packages/@webex/plugin-meetings/test/unit/spec/hashTree/hashTreeParser.ts Outdated
Comment thread packages/@webex/plugin-meetings/src/hashTree/constants.ts

// Send a message that adds two new visible datasets: 'new-main' and 'new-self'
// where neither has info in dataSets (so both require async initialization)
// Note: we use names that match priority names to test ordering
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't understand this bit - the comment says we're using names that match the priority names, but they don't match - "main-2" and "self-2" doesn't match "main" or "self", so I think they just happen to get initialized in the order that they are in the message. can we change this test so that we start without main or self and add one of them in the message together with some other datasets and check that it gets initialized first?

@marcin-bazyl marcin-bazyl merged commit 206e5e3 into webex:next Apr 10, 2026
12 checks passed
@github-actions
Copy link
Copy Markdown

🎉 Your changes are now available!
Released in: v3.12.0-next.20
📖 View full changelog →
Packages Updated Version
webex 3.12.0-next.20
@webex/plugin-meetings 3.12.0-next.10

Thank you for your contribution!
🤖 This is an automated message. For queries, please contact support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants