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

Add EnvHash to instance and calculate the hash based on it #1452

Merged
merged 9 commits into from Oct 31, 2019

Conversation

krhubert
Copy link
Contributor

close #1279

It was so easy to test that with e2e!

@krhubert krhubert added the enhancement New feature or request label Oct 30, 2019
@krhubert krhubert added this to the next milestone Oct 30, 2019
@krhubert krhubert self-assigned this Oct 30, 2019
@NicolasMahe
Copy link
Member

It was so easy to test that with e2e!

Speaking of which, could you add a check in e2e test about the env hash calculation?

@krhubert
Copy link
Contributor Author

I've added a transaction error log

+ return nil, fmt.Errorf("an error occurred in transaction: %s", data.TxResult.Result.Log)

Now the cli outputs:

Create service... !
 ›   Error: 2 UNKNOWN: an error occurred in transaction: 
 ›   [{"msg_index":0,"success":false,"log":"{\"codespace\":\"sdk\",\"code\":1,\"message\":\"Service.Configuration.Env[0] must be a valid 
 ›   env variable name\\nService.Configuration.Env[1] must be a valid env variable 
 ›   name\"}","events":[{"type":"message","attributes":[{"key":"action","value":"create_service"}]}]}]

I know it's not prefect error, but gives you context. Previously was:

Create service... !
 ›   Error: 2 UNKNOWN: an error occurred in transaction: 

And there was clue what's might going on.

========

Now envs are stable sort.

========

I've updated the validation error for env (thanks e2e tests ❤️ )

========

Add e2e test for env hash.

e2e/instance_test.go Outdated Show resolved Hide resolved
e2e/instance_test.go Outdated Show resolved Hide resolved
sdk/instance/instance.go Show resolved Hide resolved
@antho1404 antho1404 merged commit 2386f10 into dev Oct 31, 2019
@antho1404 antho1404 deleted the feature/instance-env-hash branch October 31, 2019 11:55
@NicolasMahe NicolasMahe added the release:change Pull requests that change something existant label Nov 26, 2019
@NicolasMahe NicolasMahe mentioned this pull request Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request release:change Pull requests that change something existant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change calculation of instance hash
3 participants