Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Introduce automatic ABI maintenance mechanism (1/2; prepare)#10335

Merged
ryoqun merged 6 commits intosolana-labs:masterfrom
ryoqun:abi-management-implementation-prepare
Jun 3, 2020
Merged

Introduce automatic ABI maintenance mechanism (1/2; prepare)#10335
ryoqun merged 6 commits intosolana-labs:masterfrom
ryoqun:abi-management-implementation-prepare

Conversation

@ryoqun
Copy link
Copy Markdown
Contributor

@ryoqun ryoqun commented May 30, 2020

Problem

ABI is hard to track.

Summary of Changes

This is the preparation pr for the next rollup of frozen_abi

Part of #7738

@ryoqun ryoqun requested a review from mvines May 30, 2020 01:21
@ryoqun ryoqun changed the title Introduce automatic ABI maintenance mechanism Introduce automatic ABI maintenance mechanism (1/2; prepare) May 30, 2020
@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2020

Codecov Report

Merging #10335 into master will decrease coverage by 0.1%.
The diff coverage is 77.6%.

@@            Coverage Diff            @@
##           master   #10335     +/-   ##
=========================================
- Coverage    81.4%    81.3%   -0.2%     
=========================================
  Files         290      294      +4     
  Lines       67610    68228    +618     
=========================================
+ Hits        55081    55487    +406     
- Misses      12529    12741    +212     

@ryoqun
Copy link
Copy Markdown
Contributor Author

ryoqun commented May 30, 2020

@mvines The CI is green! This is implementation-only split of #8012. This is still rather big pr, but could you review this?

Copy link
Copy Markdown
Contributor

@mvines mvines left a comment

Choose a reason for hiding this comment

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

@garious / @aeyakovenko - I'm almost 100% sure that ABI management is going to be a thing that both of you will rage about tripping over after it's rolled out (maybe more @aeyakovenko ;) ), so I suggest you both participate in building the shackles. Care to review?

Comment thread sdk/build.rs Outdated
}
::log::warn!("Not testing the abi digest under SOLANA_ABI_BULK_UPDATE!");
} else {
assert_eq!(#expected_digest, format!("{}", hash), "Possibly ABI changed? Confirm the diff by rerunning before and after this test failed with SOLANA_ABI_DUMP_DIR");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the starting point!

@ryoqun
Copy link
Copy Markdown
Contributor Author

ryoqun commented Jun 2, 2020

@garious / @aeyakovenko - I'm almost 100% sure that ABI management is going to be a thing that both of you will rage about tripping over after it's rolled out (maybe more @aeyakovenko ;) ), so I suggest you both participate in building the shackles. Care to review?

For devx matter, I've taken extra effort to easy the burden, btw. The implementation is really advanced/complex (at least for half-year rust programmer), well worth for its own crate but it's really encapsulated, I believe.

For devx, managing abi sanely just boils down to this test assertion: https://github.com/solana-labs/solana/pull/10335/files#r433615921

Basically, this is where you'll start to being tripped over. When you encounter this failure on CI, just run the abi test twice and diff the dumped abi digest text file and justify nothing odd is added/removed there, then commit the new digest. I made that digest file parsable for humans.

Or just page @ryoqun or remove frozen_abi if it's really urgent.

As the last resort, if you dare, take the look of the internal this PR is about to add. :)

Btw, this pr stranded for several months unfortunately for more important snapshot thing and it evolved for each rebase, I'm pretty sure this mechanism can detect most of abi changes nicely and updating is one-line change for engineers.

mvines
mvines previously approved these changes Jun 2, 2020
@ryoqun
Copy link
Copy Markdown
Contributor Author

ryoqun commented Jun 3, 2020

Wow, cool. I'll merge this finally! :)

@ryoqun ryoqun force-pushed the abi-management-implementation-prepare branch from 0d3fa06 to c4f259e Compare June 3, 2020 08:35
@mergify mergify Bot dismissed mvines’s stale review June 3, 2020 08:36

Pull request has been modified.

@ryoqun ryoqun added automerge Merge this Pull Request automatically once CI passes and removed automerge Merge this Pull Request automatically once CI passes labels Jun 3, 2020
@ryoqun ryoqun merged commit e63e793 into solana-labs:master Jun 3, 2020
@ryoqun
Copy link
Copy Markdown
Contributor Author

ryoqun commented Jun 3, 2020

@garious / @aeyakovenko - I'm almost 100% sure that ABI management is going to be a thing that both of you will rage about tripping over after it's rolled out (maybe more @aeyakovenko ;) ), so I suggest you both participate in building the shackles. Care to review?

For devx matter, I've taken extra effort to easy the burden, btw. The implementation is really advanced/complex (at least for half-year rust programmer), well worth for its own crate but it's really encapsulated, I believe.

For devx, managing abi sanely just boils down to this test assertion: https://github.com/solana-labs/solana/pull/10335/files#r433615921

Basically, this is where you'll start to being tripped over. When you encounter this failure on CI, just run the abi test twice and diff the dumped abi digest text file and justify nothing odd is added/removed there, then commit the new digest. I made that digest file parsable for humans.

Or just page @ryoqun or remove frozen_abi if it's really urgent.

As the last resort, if you dare, take the look of the internal this PR is about to add. :)

Btw, this pr stranded for several months unfortunately for more important snapshot thing and it evolved for each rebase, I'm pretty sure this mechanism can detect most of abi changes nicely and updating is one-line change for engineers.

@garious @aeyakovenko Because I got +1, I've merged this preparation pr and master is green at the moment. I guess it's now the last call for actually enabling abi maintenance (or burden). For more concrete example for what's needed by engineers to maintain the abi, please take a look at #8012, which I've rebased already.

danpaul000 pushed a commit to danpaul000/solana that referenced this pull request Jul 8, 2020
…labs#10335)

* Introduce automatic ABI maintenance mechanism

* Compile fix...

* Docs fix...

* Programs compilation fix...

* Simplify source credit

Co-authored-by: Michael Vines <mvines@gmail.com>

* Cargo.lock...

Co-authored-by: Michael Vines <mvines@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants