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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

protobuf 3.12 optional fields pre-release #3594

Merged
merged 1 commit into from May 5, 2020

Conversation

dwsutherland
Copy link
Member

These changes close #3589

Held icons no longer linger in WUI/TUI 馃帀

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Already covered by existing tests.
  • No change log entry required (invisible to users).
  • No documentation update required.

@dwsutherland dwsutherland added this to the cylc-8.0a2 milestone May 5, 2020
@dwsutherland dwsutherland self-assigned this May 5, 2020
@dwsutherland
Copy link
Member Author

All fields set as optional where needed, so if any are set (to any value) that will be read as set by the receiver ...

We can reassess individual field behaviour once/if the protobuf mixing issue (above) is fixed, otherwise I don't see any harm in being intentional/explicit about which fields are set and which to clear (i.e. field.Clear())

@hjoliver
Copy link
Member

hjoliver commented May 5, 2020

Should this go in before the delta-PRs? (Does it matter?)

@dwsutherland
Copy link
Member Author

Should this go in before the delta-PRs? (Does it matter?)

Yes, can go in first, if there are conflicts delta-PR to resolve.

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

馃憤 looks fine, pretty easy review given that the .py file is generated!

Copy link
Member

@kinow kinow left a comment

Choose a reason for hiding this comment

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

Code looks good. I had a go with cylc-uiserver (master) and cylc-flow (master and then this branch). Everything worked. I tried cylc hold five foo.*, but the icon worked the same for both master and this branch? i.e. upon held, the icon got a pause badge. Then cylc release five foo.* every pause badge disappeared and the workflow continued.

No errors in the terminal or JS console, so +1

@dwsutherland
Copy link
Member Author

I tried cylc hold five foo.*, but the icon worked the same for both master and this branch?

Strange, they don't disappear after release on master for me. Did the UI Server re-install with 3.12.0rc1?

@kinow
Copy link
Member

kinow commented May 5, 2020

Strange, they don't disappear after release on master for me. Did the UI Server re-install with 3.12.0rc1?

Could be my suite that's too simple maybe (five, running jobs with sleep 2). I re-installed the Cylc Flow module only. UI Server was still on master.

@dwsutherland
Copy link
Member Author

dwsutherland commented May 5, 2020

Strange, they don't disappear after release on master for me. Did the UI Server re-install with 3.12.0rc1?

Could be my suite that's too simple maybe (five, running jobs with sleep 2). I re-installed the Cylc Flow module only. UI Server was still on master.

It's only the old tasks who's isHeld doesn't change from true.. So if they disappear to quickly, then yeah, we wouldn't notice it.

UI Server master would have to reinstall also, because cylc-flow dependencies get installed too. (right?)

@hjoliver
Copy link
Member

hjoliver commented May 5, 2020

I can get "stuck" hold icons in cylc tui on master on a slightly more complex suite. It's hard to know exactly how to reproduce, but a few hold release cycles will result in a few of them.

@dwsutherland
Copy link
Member Author

I can get "stuck" hold icons in cylc tui on master on a slightly more complex suite. It's hard to know exactly how to reproduce, but a few hold release cycles will result in a few of them.

Yes, you should get lingering held icons for cylc tui on master.. But after reinstalling with this branch, they should disappear on release.

@dwsutherland
Copy link
Member Author

dwsutherland commented May 5, 2020

Ah I think I know why... I had a workaround in place that set the held and reloaded booleans back to False on delta application:

if not delta.reloaded:
data[key].reloaded = False

if not element.is_held:
data[key][element.id].is_held = False

Can get rid of them now..

We'll still have the issue of jobs outside the task pool window retaining isHeld (but that's separate to this)

Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

Approved in principle.

@hjoliver
Copy link
Member

hjoliver commented May 5, 2020

Approved in principle.

Merging in practice 馃榿

@hjoliver hjoliver merged commit 62360fc into cylc:master May 5, 2020
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.

Update Protobuf to 3.12+ - Fields with default value not set in deltas
4 participants