Skip to content

Conversation

@tisonkun
Copy link
Member

@tisonkun tisonkun commented Dec 15, 2025

This refers to #10

I found it quite tricky, and we may need some collaboration from other languages as well to make the snapshot generation more sane.

This is only for tracking the general test structure, how the snapshot generator should work, and the integration tests use generated snapshots.

So far, we can check in the snapshot files as is; just ensure they are excluded from the final crate release. And since they are in binary format, either generating it on the fly or downloading it from somewhere (e.g., GitHub raw assets, nightlies.apache.org) isn't that technically different.

The main purpose here, from what I can see, is to improve interoperability regression tests between different language implementations by exposing the functionality to create snapshots. Then we may have a dedicated repo to hold these snapshots, tag them with the generated date, and download them before running the test.

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@freakyzoidberg
Copy link
Member

I wonder if we could move the generation part in a docker, the docker file could be shared (or even copied between repo, it would rarely have to be modified) ?

The docker could be used in CI, and when needed, locally too

This would encapsulate the convention, and I think I'd rather copy once a docker - than having to sync a folder of synopsis, or go down the road of submodules.

@tisonkun
Copy link
Member Author

I wonder if we could move the generation part in a docker, the docker file could be shared (or even copied between repo, it would rarely have to be modified) ?

The docker could be used in CI, and when needed, locally too

This would encapsulate the convention, and I think I'd rather copy once a docker - than having to sync a folder of synopsis, or go down the road of submodules.

This sounds great! We'll have a Docker image to generate all the snapshots supported by that language (e.g., Go). When developing this language (e.g., Rust), we run a container of that image, mount the snapshot dir to the container, and the container's logic generates all its snapshots to that dir.

We can exclude the snapshots from VCS, as well.

@notfilippo
Copy link
Contributor

notfilippo commented Dec 15, 2025

We can exclude the snapshots from VCS, as well.

My preference would be that after a git clone I am able to run cargo test on the full test suite (including serde) without running other scripts. If we have a simple command in a .sh file which generates the snapshot (e.g. via docker, which seems great!) I would argue we should still check the generated files in the repo. CI can make sure to let us know when the files need to be updated.

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.

3 participants