-
-
Notifications
You must be signed in to change notification settings - Fork 6
feat: patchable init mirroring #1070
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
base: main
Are you sure you want to change the base?
Changes from all commits
27c46b2
b863cb8
9c85873
cf27542
3034966
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/druid.git" | ||
base = "09d36ee324747f1407705c27618b6d415c3fa8a9" | ||
mirror = "https://github.com/stackabletech/druid.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/druid.git" | ||
base = "a30af7a91d528e5c3a90356a5592abc7119191c6" | ||
mirror = "https://github.com/stackabletech/druid.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/druid.git" | ||
base = "520482cb9638e452b0553595b4f29bb397a63758" | ||
mirror = "https://github.com/stackabletech/druid.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hadoop.git" | ||
base = "a585a73c3e02ac62350c136643a5e7f6095a3dbb" | ||
mirror = "https://github.com/stackabletech/hadoop.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hadoop.git" | ||
base = "1be78238728da9266a4f88195058f08fd012bf9c" | ||
mirror = "https://github.com/stackabletech/hadoop.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hadoop.git" | ||
base = "bd8b77f398f626bb7791783192ee7a5dfaeec760" | ||
mirror = "https://github.com/stackabletech/hadoop.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hadoop.git" | ||
base = "4d7825309348956336b8f06a08322b78422849b1" | ||
mirror = "https://github.com/stackabletech/hadoop.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hbase-operator-tools.git" | ||
base = "478af00af79f82624264fd2bb447b97fecc8e790" | ||
mirror = "https://github.com/stackabletech/hbase-operator-tools.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hbase-operator-tools.git" | ||
base = "fd5a5fb90755949a90c502c76de8313130403fa3" | ||
mirror = "https://github.com/stackabletech/hbase-operator-tools.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/phoenix.git" | ||
base = "b738d66cb5863b759bb98eaa417b3b5731d41f95" | ||
mirror = "https://github.com/stackabletech/phoenix.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hbase.git" | ||
base = "a1767f4d76859c0068720a6c1e5cb78282ebfe1e" | ||
mirror = "https://github.com/stackabletech/hbase.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hbase.git" | ||
base = "de99f8754135ea69adc39da48d2bc2b2710a5366" | ||
mirror = "https://github.com/stackabletech/hbase.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hbase.git" | ||
base = "7ed50b4dd742269a78875fb32112215f831284ff" | ||
mirror = "https://github.com/stackabletech/hbase.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hive.git" | ||
base = "4df4d75bf1e16fe0af75aad0b4179c34c07fc975" | ||
mirror = "https://github.com/stackabletech/hive.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hive.git" | ||
base = "183f8cb41d3dbed961ffd27999876468ff06690c" | ||
mirror = "https://github.com/stackabletech/hive.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hive.git" | ||
base = "3af4517eb8cfd9407ad34ed78a0b48b57dfaa264" | ||
mirror = "https://github.com/stackabletech/hive.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/kafka.git" | ||
base = "e2494e6ffb89f8288ed2aeb9b5596c755210bffd" | ||
mirror = "https://github.com/stackabletech/kafka.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/kafka.git" | ||
base = "79a8f2b5f44f9d5a6867190d1dfc463d08d60b82" | ||
mirror = "https://github.com/stackabletech/kafka.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/kafka.git" | ||
base = "771b9576b00ecf5b64ab6e8bedf04156fbdb5cd6" | ||
mirror = "https://github.com/stackabletech/kafka.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/kafka.git" | ||
base = "84caaa6e9da06435411510a81fa321d4f99c351f" | ||
mirror = "https://github.com/stackabletech/kafka.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/nifi.git" | ||
base = "e0c4461d90bd4f6e5f2b81765bcff5cd97ed3e18" | ||
mirror = "https://github.com/stackabletech/nifi.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/nifi.git" | ||
base = "883338fe28883733417d10f6ffa9319e75f5ea06" | ||
mirror = "https://github.com/stackabletech/nifi.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/nifi.git" | ||
base = "b33ffac8aa10992482f7fa54e6cfccc46a5e8e27" | ||
mirror = "https://github.com/stackabletech/nifi.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/phoenix-omid.git" | ||
base = "3b9e16b7537adbc90a7403507fb8aabd8d1fab0c" | ||
mirror = "https://github.com/stackabletech/phoenix-omid.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/phoenix-omid.git" | ||
base = "cd546d58d93f380fec9bf65dbfa618f53493f662" | ||
mirror = "https://github.com/stackabletech/phoenix-omid.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/phoenix-omid.git" | ||
base = "88812c9e127063f3b3016262f81ea3e8b48ec157" | ||
mirror = "https://github.com/stackabletech/phoenix-omid.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/phoenix-omid.git" | ||
base = "c3e4da626fdb27060fd139a809e057965e52d163" | ||
mirror = "https://github.com/stackabletech/phoenix-omid.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,10 @@ use git2::{ | |
WorktreeAddOptions, | ||
}; | ||
use snafu::{ResultExt, Snafu}; | ||
use tracing_indicatif::span_ext::IndicatifSpanExt; | ||
|
||
use crate::{ | ||
error::{self, CommitRef}, | ||
utils::{progress_bar_style, Quantizer}, | ||
utils::setup_progress_tracking, | ||
}; | ||
|
||
#[derive(Debug, Snafu)] | ||
|
@@ -149,15 +148,11 @@ pub fn resolve_and_fetch_commitish( | |
error = &err as &dyn std::error::Error, | ||
"base commit not found locally, fetching from upstream" | ||
); | ||
let span_recv = tracing::info_span!("receiving"); | ||
let span_index = tracing::info_span!("indexing"); | ||
span_recv.pb_set_style(&progress_bar_style()); | ||
span_index.pb_set_style(&progress_bar_style()); | ||
let _ = span_recv.enter(); | ||
let _ = span_index.enter(); | ||
|
||
let (span_recv, mut quant_recv) = setup_progress_tracking(tracing::info_span!("receiving")); | ||
let (span_index, mut quant_index) = setup_progress_tracking(tracing::info_span!("indexing")); | ||
|
||
let mut callbacks = RemoteCallbacks::new(); | ||
let mut quant_recv = Quantizer::percent(); | ||
let mut quant_index = Quantizer::percent(); | ||
callbacks.transfer_progress(move |progress| { | ||
quant_recv.update_span_progress( | ||
progress.received_objects(), | ||
|
@@ -171,6 +166,7 @@ pub fn resolve_and_fetch_commitish( | |
); | ||
true | ||
}); | ||
|
||
repo.remote_anonymous(upstream_url) | ||
.context(CreateRemoteSnafu { | ||
repo, | ||
|
@@ -180,7 +176,9 @@ pub fn resolve_and_fetch_commitish( | |
&[commitish], | ||
Some( | ||
FetchOptions::new() | ||
.update_fetchhead(true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious about the fetchhead issues you ran into, do you have a repro for that? Does that happen with the current There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interestingly it works with the current Add the
For me, the second command fails with:
I'm not sure why FETCH_HEAD is empty. I'm also not sure why/if |
||
// Tags need to be present to later determine whether `commitish` is a tag or not | ||
// Patchable needs to know this when initializing a repository with the `--mirrored` option (to construct the refspec) | ||
.download_tags(git2::AutotagOption::Auto) | ||
.remote_callbacks(callbacks) | ||
// TODO: could be 1, CLI option maybe? | ||
.depth(0), | ||
|
@@ -193,8 +191,7 @@ pub fn resolve_and_fetch_commitish( | |
refs: vec![commitish.to_string()], | ||
})?; | ||
tracing::info!("fetched base commit"); | ||
// FETCH_HEAD is written by Remote::fetch to be the last reference fetched | ||
repo.revparse_single("FETCH_HEAD") | ||
repo.revparse_single(commitish) | ||
.and_then(|obj| obj.peel_to_commit()) | ||
} | ||
Err(err) => Err(err), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/hbase-connectors.git" | ||
base = "e5217d13ed729703580ff2d1b02378ada2d94f4d" | ||
mirror = "https://github.com/stackabletech/hbase-connectors.git" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
upstream = "https://github.com/apache/spark.git" | ||
base = "bb7846dd487f259994fdc69e18e03382e3f64f42" | ||
mirror = "https://github.com/stackabletech/spark.git" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I half think we should just decide on tags with a common format here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm but we can't really know if the upstream repository uses tags in a specific format (or if it uses tags at all). Zookeeper uses
release-3.9.2
, Trino470
, trino-storage usesv470
, ...Or do you mean we should re-tag the commit in our mirror?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly that we should always use tags, instead of checking whether upstream uses a tag or a branch. As for the format of those tags.. In retrospect, I can see it going either way. I like consistency and order (subjectively!), but leaving the original format makes it easier to compare hashes to the upstream, and we (patchable) only care about the commit hashes anyway.