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

refactor(titus): Moving constraints from lists to maps #7069

Merged
merged 4 commits into from
Jun 3, 2019

Conversation

alanmquach
Copy link
Contributor

Moving deck over to maps so we can get quickly get rid of the lists (because it's not possible to represent a map as a list).

API already supports the map based constraints:

  • currently returns both
  • for operations, the constraints map (if present) will take precedence over the old lists, so we're safe to send only maps
  • pipelines cluster configs will be transformed from lists to maps upon editing the cluster

originalCluster.hardConstraints.reduce((a, c) => set(a, c, 'true'), {})) ||
{},
soft:
(originalCluster.constarints && originalCluster.constarints.soft) ||
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like I am constarintly expecting this line to be falsy

Copy link
Contributor

@anotherchrisberry anotherchrisberry left a comment

Choose a reason for hiding this comment

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

constarints is no good; the rest of it looks good!

@alanmquach
Copy link
Contributor Author

Oh geez. Nice catch thanks!

@alanmquach alanmquach merged commit 008544f into spinnaker:master Jun 3, 2019
@alanmquach alanmquach deleted the titus-map-constraints branch June 3, 2019 20:16
christopherthielen added a commit to christopherthielen/deck that referenced this pull request Jun 5, 2019
8398d77 refactor(*): make accountExtractor return an array of strings (spinnaker#7068)
008544f refactor(titus): Moving constraints from lists to maps (spinnaker#7069)
christopherthielen added a commit that referenced this pull request Jun 5, 2019
8398d77 refactor(*): make accountExtractor return an array of strings (#7068)
008544f refactor(titus): Moving constraints from lists to maps (#7069)
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.

3 participants