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

Don't cancel pending visualization's upserts #8853

Merged
merged 13 commits into from
Jan 30, 2024

Conversation

hubertp
Copy link
Collaborator

@hubertp hubertp commented Jan 25, 2024

Pull Request Description

Uniqueness check of UpsertVisualizationJob only involved expressionId. Apparently now GUI sends mutliple visualizations for the same expressions and expects all of them to exist. Since previously we would cancel duplicate jobs, this was problematic.

This change makes sure that uniqueness also takes into account visualization id. Fixed a few logs that were not passing arguments properly.

Closes #8801

Important Notes

I have not noticed any more problems with loading visualizations so the issue appears to be resolved with this change.
Added a unit test case that would previously fail due to cancellation of a job that upserts visualization.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

Uniqueness check of `UpsertVisualizationJob` only involved expressionId.
Apparently now GUI sends mutliple visualizations for the same
expressions and expects all of them to exist. Since previously we would
cancel duplicate jobs, this was problematic.

This change makes sure that uniqueness also takes into account
visualization id. Fixed a few logs that were not passing arguments
properly.
@hubertp hubertp added the CI: No changelog needed Do not require a changelog entry for this PR. label Jan 25, 2024
Added a problematic case where visualization upserts would get cancelled
because uniqueness took into account only expression id but not
visualization id.
The test is a bit tricky to setup because it relies on
a) multiple attach visualization requests
b) background job trigger cleaning up duplicate jobs (here triggered via
edit)

attachVisualizationResponses.filter(
_.payload.isInstanceOf[Api.VisualizationAttached]
) shouldEqual List(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test would previously fail.

Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

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

Mostly process oriented approval. I didn't try to understand the changes in RuntimeVisualizationsTest.

@hubertp hubertp added the CI: Clean build required CI runners will be cleaned before and after this PR is built. label Jan 28, 2024
@hubertp
Copy link
Collaborator Author

hubertp commented Jan 29, 2024

Based on the last failures I basically think that runtime/test does not attempt to recompile tests in runtime-instrument-common on which it indirectly depends on. Then no wonder it does not have the required delays to simulate the problem.

`runtime-instrument-common` depends on `runtime` but `runtime/test`
depends indirectly on `runtime-instrument-commont`. We somehow managed
to deal with it for modules, but separate compilation breaks everything
in CI. This workaround will make sure that CI passes :fingers-crossed:.
The circular dependency between `runtime` and
`runtime-instrument-common` is the root of all evil. There is no way
around until now, at the cost of some duplication.
Should fix issues in incremental compilation when changing between
branches.
Working on a fix in a separate PR.
@hubertp hubertp added the CI: Ready to merge This PR is eligible for automatic merge label Jan 29, 2024
@mergify mergify bot merged commit 081c8c8 into develop Jan 30, 2024
25 of 27 checks passed
@mergify mergify bot deleted the wip/hubert/8801-upsert-visualization-unique branch January 30, 2024 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Clean build required CI runners will be cleaned before and after this PR is built. CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After loading project, some visualization does not load.
2 participants