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

Fix EnvSort so that env variables are populated properly #627

Closed
procrypt opened this issue May 31, 2017 · 1 comment
Closed

Fix EnvSort so that env variables are populated properly #627

procrypt opened this issue May 31, 2017 · 1 comment

Comments

@procrypt
Copy link

procrypt commented May 31, 2017

Environment variables in docker-compose file are populated in random order resulting in failure of the functional test in golang.

I have used multiple docker-compose files to test this out from
fixtures folder.
docker-compose file used 1 and 2

$ kompose convert --provider=openshift -f docker-k8s.yml -f docker-os.yml --stdout -j > a.json
$ kompose convert --provider=openshift -f docker-k8s.yml -f docker-os.yml --stdout -j > b.json
$ diff a.json b.json
126a127,130
>                     "name": "DB_DBID",
>                     "value": "openshift"
>                   },
>                   {
140,143d143
<                     "value": "openshift"
<                   },
<                   {
<                     "name": "DB_DBID",

Sorting this struct

type EnvVar struct {
	Name  string
	Value string
}

would fix this issue.
This issue is a blocker for #518

@procrypt
Copy link
Author

procrypt commented Jun 1, 2017

I'm working on this.

@procrypt procrypt changed the title Environment variables are populated in random order. Fix EnvSort so that env variables are populated properly. Jun 7, 2017
@procrypt procrypt changed the title Fix EnvSort so that env variables are populated properly. Fix EnvSort so that env variables are populated properly Jun 7, 2017
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

1 participant