Skip to content

fix(e2e): viper errors with invalid config and genesis manifest keys (backport #4016)#4313

Merged
cason merged 3 commits intov1.xfrom
cason/pr-4016-manual-backport-v1.x
Oct 20, 2024
Merged

fix(e2e): viper errors with invalid config and genesis manifest keys (backport #4016)#4313
cason merged 3 commits intov1.xfrom
cason/pr-4016-manual-backport-v1.x

Conversation

@cason
Copy link
Copy Markdown

@cason cason commented Oct 20, 2024

Addresses comments #3969 (review) and #3967 (review) on previous PRs.

The solution is in fact simple, as it is possible to tell viper to return an error if one of the configured entries (key/value pairs) were not applied to the destination structure, because they don't exist or are invalid.


This is an manual backport of pull request #4016.

PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments

Daniel and others added 2 commits October 20, 2024 11:20
Closes #3961.

Similarly to #3967, introduces a new `genesis` field for manifest files.
The format is `key = value` and multiple entries can be provided. For
example,

```
genesis = [ 
    "consensus_params.evidence.max_bytes = 1000", 
    "chain_id = pr3969" 
]
```

After the genesis document is produced by the `setup` implementation of
the runner, the provided genesis customized configurations are applied
to the generated genesis file. The solution also uses `viper`, as it
allows setting only some specific keys, leaving the pre-produced content
untouched.

Note: this PR is based atop
#3964 for simplicity, but it
does not need to.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Andy Nogueira <me@andynogueira.dev>
…eys (#4016)

Addresses comments
#3969 (review)
and
#3967 (review)
on previous PRs.

The solution is in fact simple, as it is possible to tell viper to
return an error if one of the configured entries (key/value pairs) were
not applied to the destination structure, because they don't exist or
are invalid.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Andy Nogueira <me@andynogueira.dev>
@cason cason requested a review from a team as a code owner October 20, 2024 09:28
@cason cason requested a review from a team October 20, 2024 09:28
Copy link
Copy Markdown
Author

@cason cason left a comment

Choose a reason for hiding this comment

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

Diffs match. But I can't approve this manual backport.

Base automatically changed from cason/pr-3969-manual-backport-v1.x-2 to v1.x October 20, 2024 10:57
@cason cason merged commit df25950 into v1.x Oct 20, 2024
@cason cason deleted the cason/pr-4016-manual-backport-v1.x branch October 20, 2024 20:55
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

Successfully merging this pull request may close these issues.

2 participants