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

broadcast: operate on broadcasts by ID #6402

Open
oliver-sanders opened this issue Oct 11, 2024 · 4 comments
Open

broadcast: operate on broadcasts by ID #6402

oliver-sanders opened this issue Oct 11, 2024 · 4 comments
Milestone

Comments

@oliver-sanders
Copy link
Member

(Something we have previously talked about but do not presently have an issue for).

At present, we issue a broadcast and set its scope using the namespace (i.e. task/family) and point (i.e. cycle) options.

We can revoke broadcasts by "clearing" them, however, this interface is a little peculiar:

  • To clear a broadcast, you must issue a "clear" operations with the exact same scope as the "set" operation you want to clear.
  • This will clear all broadcasts with the same scope (i.e. there may not be a way to target a single broadcast to clear).

Active broadcasts can be revoked using the "clear" mode. Any broadcasts
matching the specified cycle points and namespaces will be revoked.

Note: a "clear" broadcast for a specific cycle or namespace does not clear
all-cycle or all-namespace broadcasts.

cylc broadcast --help

This makes broadcast clearing rather awkward. When we expose broadcasts in the GUI, it would be good to open up the ability to just click on a broadcast and press clear.

Additionally, it might be good to carry some form of metadata with a broadcast, e.g. who issued this broadcast, or a one-line description of the intention (might be useful for broadcasts made by automated scripts). Note I think we might already store broadcast-time as a metadata field.

Suggestions:

  1. Assign each broadcast a unique ID (suggest a simple incremented integer, return this on the CLI when a broadcast is made).
  2. Allow broadcasts to be cleared by ID.
  3. Allow additional metadata to be stored along with the broadcast.
  4. Be very careful to avoid breaking changes, there are a lot of scripts out there that are built into the behaviour of broadcast which we left unchanged between Cylc 7 & 8 (on purpose).
@oliver-sanders oliver-sanders added this to the 8.x milestone Oct 11, 2024
@ColemanTom
Copy link
Contributor

Hah, I was just about to ask if there was a way to clear all broadcasts for a workflow and/or a cycle. Glad to see it being thought about.

@hjoliver
Copy link
Member

(Deleted previous post claiming the single-item cancel was broken ... just don't give the item value with the cancel option 🤦‍♂️ )

@hjoliver
Copy link
Member

hjoliver commented Oct 15, 2024

  • To clear a broadcast, you must issue a "clear" operations with the exact same scope as the "set" operation you want to clear.
  • This will clear all broadcasts with the same scope (i.e. there may not be a way to target a single broadcast to clear).

Not sure if you're aware of this or not, but in addition to the clear option, which clears all broadcasts within a scope, there is cancel to cancel a single broadcast.

At present, we issue a broadcast and set its scope using the namespace (i.e. task/family) and point (i.e. cycle) options.

We can revoke broadcasts by "clearing" them, however, this interface is a little peculiar:

The reason for this interface, if I recall correctly, is broadcasts target the task inheritance hierarchy, which is sensible because that's how the config items all get there in the first place.

So we can set an item for a whole family, say, but override it for one member. Then we cancel the one-member broadcast and the family one will apply to all members again.

I like the ID idea, so we can cancel individual broadcasts easily, but what about clearing out a scope? E.g. for cylc broadcast --clear -n FAM, below:

$ cylc list -t stuff
root
 ├─FAM
 │ ├─a
 │ ├─b
 │ └─c
 └─foo

$ cylc broadcast --display stuff
*
 ├─FAM                           # (no ID here, to clear all FAM broadcasts?)
 │ ├─environment
 │ │ └─FOO        foo            # ID 1
 │ └─script       echo hello     # ID 2
 └─a
   └─environment
     └─FOO        bar            # ID 3

@oliver-sanders
Copy link
Member Author

A nice interface for clearing all broadcasts targetting a cycle / namespace would be nice, however, that could mean editing the scope of an issued broadcast which would complicate things somewhat.

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

No branches or pull requests

3 participants