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

Agent Config Typescript Definitions #2658

Merged
merged 5 commits into from
Aug 16, 2023

Conversation

mattiekat
Copy link
Contributor

@mattiekat mattiekat commented Aug 15, 2023

Description

Updates the typescript definitions based on the rust code. This is the first in a series of PRs for handling Rust config streamlining.

Drive-by changes

  • A couple of the core types I refined, please validate the definitions.

Related issues

Progress on #2215
Relates to #2491

Backward compatibility

Yes

Testing

Unit Tests

@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (51b81b8) 65.39% compared to head (8e8cf4a) 65.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2658   +/-   ##
=======================================
  Coverage   65.39%   65.39%           
=======================================
  Files          89       89           
  Lines        1358     1358           
  Branches      182      182           
=======================================
  Hits          888      888           
  Misses        463      463           
  Partials        7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mattiekat mattiekat marked this pull request as ready for review August 15, 2023 16:25
Copy link
Contributor

@jmrossy jmrossy left a comment

Choose a reason for hiding this comment

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

Looking good to me so far!

typescript/sdk/src/metadata/agentConfig.ts Show resolved Hide resolved
typescript/sdk/src/metadata/agentConfig.ts Outdated Show resolved Hide resolved
typescript/sdk/src/metadata/agentConfig.ts Outdated Show resolved Hide resolved
typescript/sdk/src/metadata/agentConfig.ts Show resolved Hide resolved
typescript/sdk/src/metadata/chainMetadataTypes.ts Outdated Show resolved Hide resolved
@mattiekat mattiekat enabled auto-merge (squash) August 16, 2023 00:47
@mattiekat mattiekat merged commit d88fd4c into main Aug 16, 2023
@mattiekat mattiekat deleted the mattie/config/typescript-definitions branch August 16, 2023 01:08
mattiekat added a commit that referenced this pull request Aug 18, 2023
### Description

This is a big one for #2215...

1. Splits the parsing of configs from the config definitions to support
both the old, new, and future parsers simultaneously. (We might want to
rename it from parser to config format or something; not set on this
name).
2. Implements the new config format without switching to it or enabling
it. This means this PR does introduce dead code that is going to be used
in the next PR.

### Drive-by changes

- Deleted some unused (or single use) macros defined in hyperlane base
- Updated the definition of the config parsing trait to simplify
implementation
- Added some more ergonomic methods of handling errors in config parsing
- Removed any raw `unwrap()` I noticed since these cause difficult to
debug errors in prod.
- Added some additional validation to catch code mistakes in config path
definitions

### Related issues

- Progress on #2215
- Comes after #2658

### Backward compatibility

Yes

### Testing
Manual (E2E only for now to make sure I did not break the old config
format)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants