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

Trunk Makefile builder #265

Merged
merged 40 commits into from
Apr 27, 2023
Merged

Trunk Makefile builder #265

merged 40 commits into from
Apr 27, 2023

Conversation

sjmiller609
Copy link
Contributor

@sjmiller609 sjmiller609 commented Apr 24, 2023

Refactored PGX builder to work in same was as C builder. In either case, the following procedure is performed:

@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-265.d3q0v4ajtiq4fs.amplifyapp.com

@@ -28,7 +28,7 @@ pub struct InstallCommand {
}

#[derive(thiserror::Error, Debug)]
pub enum PgxInstallError {
pub enum InstallError {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this file we make two changes:

  • handle pathed installs
  • check for architecture at the level of the whole artifact instead of each file

@@ -1,36 +1,21 @@
use bollard::container::{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the PGX logic, we delete everything that is not reusable and move reusable parts into containers.rs. Then we use the reusable logic that is shared with C builder in this builder.

@@ -8,7 +8,7 @@ use std::path::{Path, PathBuf};
pub enum PackagedFile {
ControlFile {},
SqlFile {},
SharedObject { architecture: Option<String> },
SharedObject {},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we set architecture at the level of the whole package instead of each file

@@ -1,5 +1,7 @@
use super::SubCommand;
use crate::commands::generic_build::build_generic;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this file, we add a new type of build - C build

@@ -137,17 +127,15 @@ impl SubCommand for InstallCommand {
tempfile.write_reader(gz)?;
tempfile.rewind()?;
let input = tempfile;
install(input, extension_dir, package_lib_dir, bitcode_dir, sharedir).await?;
install(input, package_lib_dir, sharedir).await?;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

installation directories are being simplified to just sharedir or pkglibdir instead of each file type. File type still used to determine if it is under sharedir or pkglibdir

image

@sjmiller609 sjmiller609 marked this pull request as ready for review April 26, 2023 19:10
@sjmiller609 sjmiller609 requested review from ianstanton and removed request for ianstanton April 26, 2023 19:10
@@ -1,6 +1,6 @@
[package]
name = "pg-trunk"
version = "0.3.2"
version = "0.4.0-alpha.1"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we have to republish packages since they are in a new format, so I don't want it as the default on cargo install for now

@sjmiller609 sjmiller609 changed the title Trunk generic builder Trunk Makefile builder Apr 26, 2023
Copy link
Member

@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.

Let's go! Awesome work @sjmiller609 🎉

@sjmiller609 sjmiller609 merged commit 1238ca3 into main Apr 27, 2023
@sjmiller609 sjmiller609 deleted the trunk-c-builder branch April 27, 2023 12:38
sjmiller609 pushed a commit that referenced this pull request Dec 5, 2023
* Add sample MessageQueue

* Update runtime configs

* Add sample OLAP

* Add sample OLTP

* Add sample MachineLearning

* Add sample Standard

* Bump crate
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