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

Allow executions to have some kind of name/label #1027

Open
ldaley opened this issue Jul 21, 2016 · 5 comments
Open

Allow executions to have some kind of name/label #1027

ldaley opened this issue Jul 21, 2016 · 5 comments
Milestone

Comments

@ldaley
Copy link
Member

ldaley commented Jul 21, 2016

Something like Execution.current().name("doing-stuff")

@tomdcc
Copy link
Contributor

tomdcc commented Jan 9, 2018

Would definitely be helpful for the name to be available in an initializer, so that other code that wants to populate its registry in an initializer has access to the name. So should be on ExecSpec as well to allow Execution.fork().name("foo").

@ldaley
Copy link
Member Author

ldaley commented Jan 9, 2018

The only thing really stopping us doing this is deciding whether a single opaque string is good enough. Some alternatives might be:

  1. Arbitrary object (expected to have a reasonable toString())
  2. Map<String,String>

I am leaning towards a simple String name property though.

@tomdcc
Copy link
Contributor

tomdcc commented Jan 9, 2018

Me too. Pretty easy to imagine an arbitrary (and mutable) descriptor object being abused instead of just putting stuff in the registry. Easy enough to call .name(constructDescriptor('foo', 123, 'bar)) if you need something more structured.

@ldaley
Copy link
Member Author

ldaley commented Jan 9, 2018

Yeah, let's just settle on a single CharSequence property. That leaves the door a little open for someone to do something fancy. I think we should call this property identifier or label.

It should go on ExecSpec and default to N, where that is the _N_th execution forked from that execution. Each Execution can maintain a counter for this and ExecControllerInternal can provide a counter for top level executions.

Anyone want volunteer to implement?

@tomdcc
Copy link
Contributor

tomdcc commented Jan 9, 2018

I'm happy to but can't promise anything over the next couple of weeks.

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

4 participants