Skip to content

Conversation

muir
Copy link
Collaborator

@muir muir commented Sep 24, 2025

This adds a java library that parallels the Go and Python libraries.
Some small adjustments were made to existing code along the way.

@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2025

Codecov Report

❌ Patch coverage is 51.46089% with 515 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.09%. Comparing base (6ca7eba) to head (73dc9cd).

Files with missing lines Patch % Lines
...ava/src/main/java/com/singlestore/s2iam/S2IAM.java 48.90% 101 Missing and 39 partials ⚠️
...singlestore/s2iam/providers/azure/AzureClient.java 46.97% 55 Missing and 24 partials ⚠️
...com/singlestore/s2iam/providers/gcp/GCPClient.java 43.79% 50 Missing and 27 partials ⚠️
python/src/s2iam/api.py 46.23% 38 Missing and 12 partials ⚠️
...com/singlestore/s2iam/providers/aws/AWSClient.java 63.84% 31 Missing and 16 partials ⚠️
python/src/s2iam/gcp/__init__.py 40.54% 39 Missing and 5 partials ⚠️
python/src/s2iam/azure/__init__.py 49.23% 24 Missing and 9 partials ⚠️
.../main/java/com/singlestore/s2iam/S2IAMRequest.java 73.58% 8 Missing and 6 partials ⚠️
...m/exceptions/NoCloudProviderDetectedException.java 0.00% 10 Missing ⚠️
...a/com/singlestore/s2iam/options/WithProviders.java 0.00% 6 Missing ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #44      +/-   ##
============================================
- Coverage     66.91%   63.09%   -3.83%     
- Complexity        0       59      +59     
============================================
  Files            20       41      +21     
  Lines          2914     3921    +1007     
  Branches        149      366     +217     
============================================
+ Hits           1950     2474     +524     
- Misses          787     1142     +355     
- Partials        177      305     +128     
Flag Coverage Δ
aws-negative 31.90% <25.73%> (-2.49%) ⬇️
aws-positive 42.89% <37.04%> (-2.06%) ⬇️
azure-negative 31.57% <27.89%> (-1.62%) ⬇️
azure-positive 44.19% <37.22%> (-2.48%) ⬇️
base 35.53% <ø> (ø)
gcp-negative 30.42% <25.44%> (-2.56%) ⬇️
gcp-positive 41.72% <36.38%> (-1.69%) ⬇️
go 61.56% <50.04%> (-3.71%) ⬇️
java 61.82% <50.98%> (?)
python 62.02% <50.32%> (-3.80%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 54 out of 55 changed files in this pull request and generated 8 comments.

muir added 2 commits October 16, 2025 10:50
…lper, orchestrator validation, gcp rationale, builder test dedupe, detection simplification)
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 55 out of 56 changed files in this pull request and generated 10 comments.

Comment on lines +33 to +35
# Single metadata probe (no retries). GCP metadata is either immediately
# reachable or absent; retries add latency and can hide real negative
# signals (firewall / wrong environment). Fast fail mirrors Go impl.
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

Raising the single-attempt GCP metadata timeout to 10s increases worst-case negative-path latency (e.g., on non-GCP hosts) before other providers can win. Consider keeping a lower per-attempt timeout (e.g., previous 3s) and relying on the orchestrator’s overall 10s ceiling, or making this value configurable to avoid slowing failure cases.

Copilot uses AI. Check for mistakes.

Comment on lines +66 to +70
trace_configs = []
want_trace = debugging
tc: Optional[aiohttp.TraceConfig] = None
if want_trace:
tc = aiohttp.TraceConfig()
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

detect() has grown very large (setup, tracing, classification, cancellation handling, probing, diagnostics) making future changes error-prone. Splitting into focused helpers (e.g., _build_trace_configs(), _probe_metadata(), _handle_cancellation(), _classify_error()) would reduce cognitive load and isolate concerns without altering behavior.

Copilot generated this review using guidance from repository custom instructions.

tc.on_request_end.append(_trace_request_end)
trace_configs.append(tc)

async def _probe() -> None:
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

detect() has grown very large (setup, tracing, classification, cancellation handling, probing, diagnostics) making future changes error-prone. Splitting into focused helpers (e.g., _build_trace_configs(), _probe_metadata(), _handle_cancellation(), _classify_error()) would reduce cognitive load and isolate concerns without altering behavior.

Copilot generated this review using guidance from repository custom instructions.

@muir muir deployed to cloud-VMs October 16, 2025 21:18 — with GitHub Actions Active
@muir muir marked this pull request as ready for review October 16, 2025 21:28
@muir muir requested a review from mgiannakopoulos October 16, 2025 21:28
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