Skip to content

Add alternative provider retrieval measurement #571

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

pyropy
Copy link
Contributor

@pyropy pyropy commented Apr 9, 2025

This PR adds support for new alternative-provider check measurement fields added in CheckerNetwork/spark-checker#132. New fields are saved alongside others in the measurements table.

Closes #570
Relates to:

@pyropy pyropy self-assigned this Apr 9, 2025
@pyropy pyropy changed the title Add network wide retrieval measurement WIP: Add network wide retrieval measurement Apr 9, 2025
@pyropy pyropy requested a review from Copilot April 10, 2025 10:40
Copy link

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

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • migrations/067.do.measurement-network-retrieval.sql: Language not supported
Comments suppressed due to low confidence (1)

api/index.js:144

  • Ensure that the updated SQL parameter count and ordering correctly match the columns in your INSERT statement to avoid mismatches during query execution.
$1, $2, ... $26,

@pyropy pyropy changed the title WIP: Add network wide retrieval measurement Add network wide retrieval measurement Apr 10, 2025
@pyropy pyropy marked this pull request as ready for review April 10, 2025 10:42
api/index.js Outdated
@@ -190,7 +209,14 @@ const getMeasurement = async (req, res, client, measurementId) => {
endAt: resultRow.end_at,
byteLength: resultRow.byte_length,
carTooLarge: resultRow.car_too_large,
attestation: resultRow.attestation
attestation: resultRow.attestation,
networkRetrieval: {
Copy link
Member

Choose a reason for hiding this comment

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

Kudos for re-creating this structure in the JSON data uploaded to Storacha! 👏🏻

Let's use the same property name as we use in spark-checker, see CheckerNetwork/spark-checker#132 (comment)

@pyropy pyropy marked this pull request as draft April 15, 2025 16:32
@pyropy pyropy changed the title Add network wide retrieval measurement Add alternative provider retrieval measurement Apr 15, 2025
@pyropy pyropy marked this pull request as ready for review April 15, 2025 17:08
@pyropy pyropy requested review from Copilot and bajtos April 15, 2025 17:27
Copy link

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

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • migrations/067.do.measurement-alternative-provider-check.sql: Language not supported
Comments suppressed due to low confidence (1)

api/index.js:144

  • Ensure that the updated prepared statement's parameter placeholders exactly match the number of provided values and the expected database column mappings to avoid runtime errors.
+        $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Add support for network wide retrievability metric
2 participants