Skip to content

Add interpolation type cast for max_replicas_per_node - #2182

Merged
thaJeztah merged 1 commit into
docker:masterfrom
rumpl:fix-max_replicas_per_node_interpolation
Nov 5, 2019
Merged

Add interpolation type cast for max_replicas_per_node#2182
thaJeztah merged 1 commit into
docker:masterfrom
rumpl:fix-max_replicas_per_node_interpolation

Conversation

@rumpl

@rumplrumpl commented Nov 4, 2019

Copy link
Copy Markdown
Member

Fixesdocker-archive-public/docker.app#688

- What I did
Added interpolation type cast mapping for missing deploy.placement.max_replicas_per_node.

- How to verify it

Changed the unit test

- A picture of a cute animal (not mandatory but encouraged)
image

@GordonTheTurtle

Copy link
Copy Markdown

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "fix-max_replicas_per_node_interpolation" git@github.com:rumpl/cli.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@rumpl
rumplforce-pushed the fix-max_replicas_per_node_interpolation branch from 3041997 to d090152CompareNovember 4, 2019 13:27

@silvin-lubeckisilvin-lubecki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

overall LGTM, but left a comment

Comment threadcli/compose/loader/loader_test.go Outdated
func TestLoadWithInterpolationCastFull(t *testing.T) {
dict, err := ParseYAML([]byte(`
version: "3.7"
version: "3.9"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you change this to version 3.8? This feature was added in 19.03 (through #1612), which has compose schema 3.8 as maximum

Changing to version 3.8 would allow us to back port this fix

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Done

Fixesdocker-archive-public/docker.app#688
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
@rumpl
rumplforce-pushed the fix-max_replicas_per_node_interpolation branch from d090152 to cb29ef6CompareNovember 5, 2019 07:31

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

Sign up for freeto 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.

Subkeys render error - max_replicas_per_node

4 participants

@rumpl@GordonTheTurtle@thaJeztah@silvin-lubecki