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

registry: allow publishing extensions of several Postgres versions #572

Merged
merged 9 commits into from
Dec 28, 2023

Conversation

vrmiguel
Copy link
Member

No description provided.

Comment on lines +115 to +139
Some(ext)
if ext == "json"
&& path.file_stem().and_then(OsStr::to_str) == Some("manifest") =>
{
// We're now iterating through manifest.json
let manifest = decompress_file(&mut entry, entry_size)?;
let manifest: Manifest = serde_json::from_str(&manifest)
.with_context(|| "Failed to deserialize manifest.json")?;

manifest_json = Some(manifest);
}
Some(_) | None => continue,
}
}

Ok(control_files)
anyhow::ensure!(
manifest_json.is_some(),
"Failed to find manifest.json in archive being uploaded"
);

Ok(ExtractedArchive {
control_files,
manifest: manifest_json.unwrap(),
})
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@vrmiguel Is this just to make sure a manifest.json file is included in the tar.gz? Are we doing anything with the manifest.json?

Copy link
Member Author

Choose a reason for hiding this comment

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

We're using the Manifest to check which Postgres version the extension was built for

Copy link
Contributor

@ianstanton ianstanton left a comment

Choose a reason for hiding this comment

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

Just one comment above but otherwise I think it looks good to try out :)

@vrmiguel vrmiguel merged commit 5420aa7 into main Dec 28, 2023
4 checks passed
@vrmiguel vrmiguel deleted the tem-2156 branch December 28, 2023 15:15
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