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

Implemented pipeline detection for PGXS and pgrx #12

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Conversation

theory
Copy link
Member

@theory theory commented Nov 21, 2024

The PGXS pipeline examines the Makefile (via regular expressions), while the pgrx pipeline examines Cargo.toml (via the cargo_toml crate). Each produces a score (0-255), and the highest score wins. If all pipeline candidates return 0 it returns an error. Now Build::new handles a pipeline name specified in the release metadata, while Build::detect figures out which to use when none is specified.

Builder::new now takes a sudo param, to indicate whether sudo and passes it to Build::new and Build::detect.

Other tweaks:

  • Added an install method to the Builder, the Pipeline trait, and
    placeholder implementations in the Pgrx and Pgxs implementations.
  • Removed the download and unpack methods from the Builder,
    Pipeline trait, and implementations, as the api::Api struct handles
    this functionality.

@theory theory requested a review from vrmiguel November 21, 2024 00:18
@theory theory self-assigned this Nov 21, 2024
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.27%. Comparing base (57d7b8e) to head (1386ba9).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
+ Coverage   99.25%   99.27%   +0.01%     
==========================================
  Files           7        5       -2     
  Lines         268      275       +7     
==========================================
+ Hits          266      273       +7     
  Misses          2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@theory theory force-pushed the detect-pipeline branch 4 times, most recently from 8ed9588 to 00100b8 Compare November 21, 2024 20:26
The PGXS pipeline examines the Makefile (via regular expressions), while
the pgrx pipeline examines `Cargo.toml` (via the cargo_toml crate). Each
produces a score (0-255), and the highest score wins. If all pipeline
candidates return 0 it returns an error. Now Build::new handles a
pipeline name specified in the release metadata, while Build::detect
figures out which to use when none is specified.

Builder::new now takes a `sudo` param, to indicate whether `sudo` and
passes it to Build::new and Build::detect.

Other tweaks:

*   Added an `install` method to the Builder, the Pipeline trait, and
    placeholder implementations in the Pgrx and Pgxs implementations.
*   Removed the `download` and `unpack` methods from the Builder,
    Pipeline trait, and implementations, as the api::Api struct handles
    this functionality.
Base automatically changed from pass-dir-not-meta to main November 22, 2024 19:57
@theory theory merged commit 1386ba9 into main Nov 22, 2024
14 checks passed
@theory theory deleted the detect-pipeline branch November 22, 2024 19:57
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