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

modules: tests that ensure that from the same git commit (clean or otherwise) that we get identical module output #3129

Closed
myitcv opened this issue May 8, 2024 · 0 comments
Assignees
Labels
FeatureRequest New feature or request modules Issues related to CUE modules and the experimental implementation

Comments

@myitcv
Copy link
Member

myitcv commented May 8, 2024

Determining that a module's contents correctly corresponds to its declared git commit is one of the reasons
we added the source field to module.cue. We should have tests that check that.

One challenge is that creating a module involves compressing the contents with the zip deflate compressor,
but there's no guarantee that that's deterministic over time and changing Go versions. This means
it might be better to check the contents of the zip file and the module manifest rather than requiring
a specific checksum for the manifest and its contents.

@myitcv myitcv added FeatureRequest New feature or request modules Issues related to CUE modules and the experimental implementation labels May 8, 2024
@myitcv myitcv self-assigned this May 30, 2024
cueckoo pushed a commit that referenced this issue Jun 5, 2024
https://cuelang.org/issue/3129 captures the fact the 'cue mod publish'
should be idempotent with respect to the contents of a module. It is
also the case that given the same "state" (with respect to source.kind),
'cue mod publish' should be idempotent.

Along with a rather large explanation on the expectations of the
in-memory OCI server, this CL adds a simple check that 'cue mod publish'
is idempotent for the two existing source.kind values, "self" and "git".

For #3129.

Signed-off-by: Paul Jolly <paul@myitcv.io>
Change-Id: I131e58c7726912e656b2023626fe36a9792e7e55
cueckoo pushed a commit that referenced this issue Jun 5, 2024
https://cuelang.org/issue/3129 captures the fact the 'cue mod publish'
should be idempotent with respect to the contents of a module. It is
also the case that given the same "state" (with respect to source.kind),
'cue mod publish' should be idempotent.

Along with a rather large explanation on the expectations of the
in-memory OCI server, this CL adds a simple check that 'cue mod publish'
is idempotent for the two existing source.kind values, "self" and "git".

Fixes #3129.

Signed-off-by: Paul Jolly <paul@myitcv.io>
Change-Id: I131e58c7726912e656b2023626fe36a9792e7e55
@cueckoo cueckoo closed this as completed in 604c577 Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest New feature or request modules Issues related to CUE modules and the experimental implementation
Projects
Status: Done
Status: v0.9.0
Development

No branches or pull requests

2 participants