') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); ARROW-16879: [R][CI] Test R GCS bindings with testbench by wjones127 · Pull Request #13542 · apache/arrow · GitHub
Skip to content

ARROW-16879: [R][CI] Test R GCS bindings with testbench - #13542

Merged
nealrichardson merged 26 commits into
apache:masterfrom
wjones127:ARROW-16879-r-gcs-testbench
Oct 4, 2022
Merged

ARROW-16879: [R][CI] Test R GCS bindings with testbench#13542
nealrichardson merged 26 commits into
apache:masterfrom
wjones127:ARROW-16879-r-gcs-testbench

Conversation

@wjones127

@wjones127wjones127 commented Jul 7, 2022

Copy link
Copy Markdown
Member

This PR:

  • Moves minio integration tests into a generic suite that is now run on minio (S3 emulator) and GCS testbench (GCS emulator). This is run in CI.
  • Move Minio and GCS test server initialization to within the tests. This makes it easier to setup the background processes in a cross-platform way.
  • MinIO and GCS tests are now run on R Ubuntu CI. MinIO is now run on Windows CI. I couldn't get GCS to run on Windows CI yet, due to some issue where the tests hang (I believe this is an issue with the test setup and not the functionality). See follow up at: ARROW-17149: [R] Enable GCS tests for Windows
  • Sets the default retry timeout to 15 seconds to mitigate issue described by ARROW-17020. This affects explicitly-created fs with GcsFileSystem$create() (and gs_bucket() introducted in ARROW-16887: [R][Docs] Update Filesystem Vignette for GCS #13601), but not URIs.

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@wjones127

Copy link
Copy Markdown
MemberAuthor

Tests seem to be failing right now because of a difference in how GCS and S3 handle paths:

library(arrow)
#> #> Attaching package: 'arrow'#> The following object is masked from 'package:utils':#> #> timestampexample_data<- arrow_table(x=Array$create(c(1, 2, 3)))
testbench_port<- Sys.getenv("TESTBENCH_PORT", "9001")
fs<-GcsFileSystem$create(
endpoint_override= sprintf("localhost:%s", testbench_port),
retry_limit_seconds=1,
scheme="http",
anonymous=TRUE# Will fail to resolve host name if anonymous isn't TRUE
)
fs$CreateDir("test")
write_parquet(example_data, fs$path("test/test.parquet"))
write_parquet(example_data, fs$path("test/test.parquet/"))
# GCS seems to handle them as separate pathsfs$ls("test")
#> [1] "test/test.parquet" "test/test.parquet"minio_key<- Sys.getenv("MINIO_ACCESS_KEY", "minioadmin")
minio_secret<- Sys.getenv("MINIO_SECRET_KEY", "minioadmin")
minio_port<- Sys.getenv("MINIO_PORT", "9000")
fs<-S3FileSystem$create(
access_key=minio_key,
secret_key=minio_secret,
scheme="http",
endpoint_override= paste0("localhost:", minio_port),
allow_bucket_creation=TRUE,
allow_bucket_deletion=TRUE
)
fs$CreateDir("test")
write_parquet(example_data, fs$path("test/test.parquet"))
write_parquet(example_data, fs$path("test/test.parquet/"))
# S3 implementation seems to remove the last slashfs$ls("test")
#> [1] "test/test.parquet"

Created on 2022-07-11 by the reprex package (v2.0.1)

@wjones127

Copy link
Copy Markdown
MemberAuthor

I've included the change set from #13577. The C++ changes will go away when I rebase after merging that PR.

Comment threadci/scripts/r_test.sh Outdated
Comment threadr/tests/testthat/helper-filesystems.R Outdated
@wjones127
wjones127force-pushed the ARROW-16879-r-gcs-testbench branch 3 times, most recently from f059ed4 to c4fd663CompareJuly 20, 2022 04:45
@wjones127wjones127 reopened this Jul 20, 2022
@wjones127
wjones127 marked this pull request as ready for review July 20, 2022 19:59

@nealrichardsonnealrichardson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is really cool, thanks for doing this.

Comment threadr/tests/testthat/test-gcs.R Outdated

@paleolimbotpaleolimbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just a few notes! Looks great!

Comment threadr/tests/testthat/helper-filesystems.R Outdated
Comment threadr/tests/testthat/test-gcs.R Outdated
Comment threadr/tests/testthat/test-gcs.R Outdated
@wjones127
wjones127force-pushed the ARROW-16879-r-gcs-testbench branch from 609a166 to 66c3c84CompareAugust 1, 2022 20:40
@wjones127
wjones127force-pushed the ARROW-16879-r-gcs-testbench branch from 66c3c84 to f107de9CompareSeptember 19, 2022 19:54
Comment thread.github/workflows/r.yml Outdated

@nealrichardsonnealrichardson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

CI failure is unrelated, will merge

@nealrichardson
nealrichardson merged commit b7f9dfc into apache:masterOct 4, 2022
@ursabot

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = 4660180 and contender = b7f9dfc. b7f9dfc is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.0% ⬆️0.0%] test-mac-arm
[Failed ⬇️0.27% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.96% ⬆️0.07%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] b7f9dfc2 ec2-t3-xlarge-us-east-2
[Failed] b7f9dfc2 test-mac-arm
[Failed] b7f9dfc2 ursa-i9-9960x
[Finished] b7f9dfc2 ursa-thinkcentre-m75q
[Finished] 46601808 ec2-t3-xlarge-us-east-2
[Failed] 46601808 test-mac-arm
[Failed] 46601808 ursa-i9-9960x
[Finished] 46601808 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@wjones127@ursabot@nealrichardson@paleolimbot