Skip to content

naming: consolidate task naming into single package#1694

Merged
aluzzardi merged 2 commits intomoby:masterfrom
stevvooe:naming-package
Oct 25, 2016
Merged

naming: consolidate task naming into single package#1694
aluzzardi merged 2 commits intomoby:masterfrom
stevvooe:naming-package

Conversation

@stevvooe
Copy link
Contributor

This change consolidates task naming into a single package. The names of
tasks was at risk of diverging over time, since it is a calculated
property. We can further extend this package to do more naming and
validation work.

Signed-off-by: Stephen J Day [email protected]

// Assign name based on task name schema
name := store.TaskName(&task)
name := naming.Task(&task)
task.Annotations = api.Annotations{Name: name}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we remove this line that stores the task name in raft, as discussed previously?

cc @aluzzardi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As part of this PR?

Copy link
Member

Choose a reason for hiding this comment

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

You can split it into a separate branch if it's cleaner, but it's literally here ^^^

Since you're stopping by it would be too bad not to change it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added here as a separate commit. We basically get rid of this whole clause.

@aaronlehmann
Copy link
Collaborator

Thanks for doing this!

@aluzzardi
Copy link
Member

This is missing naming.go :)

+1 on @aaronlehmann's comment - we're a line away from removing naming from raft, I think it should be done in this PR as well

Overall LGTM

@stevvooe
Copy link
Contributor Author

naming.go is an exercise left to the compiler.

@stevvooe stevvooe closed this Oct 25, 2016
@stevvooe stevvooe reopened this Oct 25, 2016
This change consolidates task naming into a single package. The names of
tasks was at risk of diverging over time, since it is a calculated
property. We can further extend this package to do more naming and
validation work.

Signed-off-by: Stephen J Day <[email protected]>
@codecov-io
Copy link

codecov-io commented Oct 25, 2016

Current coverage is 55.94% (diff: 83.33%)

Merging #1694 into master will decrease coverage by 0.17%

@@             master      #1694   diff @@
==========================================
  Files            89         90     +1   
  Lines         14510      14507     -3   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits           8143       8116    -27   
- Misses         5278       5303    +25   
+ Partials       1089       1088     -1   

Sunburst

Powered by Codecov. Last update ef4cf8f...3950261

@aaronlehmann
Copy link
Collaborator

LGTM

@aluzzardi
Copy link
Member

Thanks! LGTM

@aluzzardi aluzzardi merged commit 8815c2f into moby:master Oct 25, 2016
@stevvooe stevvooe deleted the naming-package branch October 25, 2016 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants