-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: add dev gateways with dashboards #116
Draft
laurentsenta
wants to merge
9
commits into
main
Choose a base branch
from
feat/test-dev-gateways-with-dashboards
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
28a57ed
ci: add dev e2e
laurentsenta 415ca48
fix: cannot use custom workflow in matrix
laurentsenta 94c0e3e
ci: tweaks
laurentsenta 3b5297f
add aggregates
laurentsenta 33cd737
feat: add kubo
laurentsenta dcddf02
update-badge generic
laurentsenta 85948b9
table: generate nicer table
laurentsenta f6c2a7b
fix: apply Lidel's notes on wording
laurentsenta bda8985
fix: the tags used in shared github actions
galargh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Test Dev (e2e) | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
bifrost-gateway: | ||
uses: singulargarden/bifrost-gateway2/.github/workflows/gateway-conformance.yml@main | ||
with: | ||
artifact_json_name: conformance-bifrost-gateway.json | ||
kubo-gateway: | ||
uses: singulargarden/kubo/.github/workflows/gateway-conformance.yml@master | ||
with: | ||
artifact_json_name: conformance-kubo-gateway.json | ||
aggregate: | ||
runs-on: "ubuntu-latest" | ||
needs: [bifrost-gateway, kubo-gateway] | ||
# the tests might have failed | ||
if: always() | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: "gateway-conformance" | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: artifacts | ||
- name: Aggregate results | ||
working-directory: ./artifacts | ||
run: | | ||
set -e | ||
set -o pipefail | ||
mkdir ./aggregates | ||
|
||
# download-artifact downloads artifacts in a directory named after the artifact | ||
# details: https://github.com/actions/download-artifact#download-all-artifacts | ||
for folder in ./conformance-*.json; do | ||
file="${folder}/output.json" | ||
new_file="aggregates/${folder#conformance-}" | ||
jq -ns 'inputs' "$file" | node ../gateway-conformance/aggregate.js 1 > "${new_file}" | ||
done | ||
|
||
node ../gateway-conformance/aggregate-into-table.js ./aggregates/*.json > /tmp/table.md | ||
node ../gateway-conformance/aggregate-update-names.js ../gateway-conformance/names.json /tmp/table.md > ./table.md | ||
- name: Set summary | ||
if: (failure() || success()) | ||
run: cat ./artifacts/table.md >> $GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const fs = require('fs'); | ||
|
||
const jsonFilePath = process.argv[2]; | ||
const markdownFilePath = process.argv[3]; | ||
|
||
// Check if file paths are provided | ||
if (!jsonFilePath || !markdownFilePath) { | ||
console.error('Both a JSON file path and a Markdown file path must be provided.'); | ||
process.exit(1); | ||
} | ||
|
||
const jsonData = JSON.parse(fs.readFileSync(jsonFilePath, 'utf8')); | ||
const sortedKeys = Object.keys(jsonData).sort((a, b) => b.length - a.length); | ||
|
||
let markdown = fs.readFileSync(markdownFilePath, 'utf8'); | ||
|
||
for (const key of sortedKeys) { | ||
const newName = jsonData[key][1] | ||
? `[${jsonData[key][0]}](${jsonData[key][1]})` | ||
: jsonData[key][0]; | ||
|
||
const regex = new RegExp(key, 'g'); | ||
markdown = markdown.replace(regex, newName); | ||
} | ||
|
||
// output the new markdown to stdout | ||
fs.writeFileSync(1, markdown); |
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. We need either:
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"Cors": [ | ||
"Cross-Origin Resource Sharing", | ||
null | ||
], | ||
"DagPbConversion": [ | ||
"DAG-PB Conversion to DAG-CBOR/JSON", | ||
"https://ipld.io/specs/codecs/dag-pb/spec/#logical-format" | ||
], | ||
"DNSLinkGateway": [ | ||
"DNSLink Gateway", | ||
"https://specs.ipfs.tech/http-gateways/dnslink-gateway/" | ||
], | ||
"DNSLinkGatewayUnixFSDirectoryListing": [ | ||
"Generated UnixFS Directory Listing for DNSLink", | ||
"https://specs.ipfs.tech/http-gateways/dnslink-gateway/" | ||
], | ||
"GatewayBlock": [ | ||
"Gateway Block", | ||
null | ||
], | ||
"GatewayCache": [ | ||
"HTTP Caching", | ||
null | ||
], | ||
"GatewayCacheWithIPNS": [ | ||
"HTTP Caching with IPNS", | ||
null | ||
], | ||
"GatewayIPNSRecord": [ | ||
"Signed IPNS Record", | ||
null | ||
], | ||
"GatewayJSONCborAndIPNS": [ | ||
"[DAG-]CBOR/JSON on IPNS", | ||
null | ||
], | ||
"GatewayJsonCbor": [ | ||
"[DAG-]CBOR/JSON", | ||
"https://specs.ipfs.tech/http-gateways/path-gateway/#traversing-through-dag-json-and-dag-cbor" | ||
], | ||
"GatewaySubdomainAndIPNS": [ | ||
"Subdomain Gateway with IPNS", | ||
"https://specs.ipfs.tech/http-gateways/subdomain-gateway/" | ||
], | ||
"GatewaySubdomains": [ | ||
"Subdomain Gateway", | ||
"https://specs.ipfs.tech/http-gateways/subdomain-gateway/" | ||
], | ||
"GatewaySymlink": [ | ||
"UnixFS Symlink", | ||
null | ||
], | ||
"NativeDag": [ | ||
"Native DAG-CBOR/JSON", | ||
null | ||
], | ||
"Web Pathing": [ | ||
"Pathing", | ||
"https://specs.ipfs.tech/http-gateways/path-gateway/#content-resolution" | ||
], | ||
"PlainCodec": [ | ||
"Plain CBOR/JSON", | ||
null | ||
], | ||
"RedirectsFileSupport": [ | ||
"_redirects File Support", | ||
"https://specs.ipfs.tech/http-gateways/web-redirects-file/" | ||
], | ||
"RedirectsFileSupportWithDNSLink": [ | ||
"_redirects File Support with DNSLink", | ||
"https://specs.ipfs.tech/http-gateways/web-redirects-file/" | ||
], | ||
"SubdomainGatewayDNSLinkInlining": [ | ||
"Subdomain Gateway DNSLink Inlining", | ||
"https://specs.ipfs.tech/http-gateways/subdomain-gateway/#host-request-header" | ||
], | ||
"Tar": [ | ||
"TAR Responses", | ||
null | ||
], | ||
"TrustlessCarDagScopeAll": [ | ||
"CAR with dag-scope=all", | ||
"https://specs.ipfs.tech/http-gateways/trustless-gateway/#dag-scope-request-query-parameter" | ||
], | ||
"TrustlessCarDagScopeBlock": [ | ||
"CAR with dag-scope=block", | ||
"https://specs.ipfs.tech/http-gateways/trustless-gateway/#dag-scope-request-query-parameter" | ||
], | ||
"TrustlessCarDagScopeEntity": [ | ||
"CAR with dag-scope=entity", | ||
"https://specs.ipfs.tech/http-gateways/trustless-gateway/#dag-scope-request-query-parameter" | ||
], | ||
"TrustlessCarEntityBytes": [ | ||
"CAR with entity-bytes", | ||
"https://specs.ipfs.tech/http-gateways/trustless-gateway/#entity-bytes-request-query-parameter" | ||
], | ||
"TrustlessCarPathing": [ | ||
"Trustless CAR with Web Pathing", | ||
"https://specs.ipfs.tech/http-gateways/trustless-gateway/" | ||
], | ||
"TrustlessRaw": [ | ||
"Trustless Raw Block (application/vnd.ipld.raw)", | ||
"https://specs.ipfs.tech/http-gateways/trustless-gateway/" | ||
], | ||
"UnixFSDirectoryListing": [ | ||
"UnixFS Directory Listing", | ||
null | ||
], | ||
"UnixFSDirectoryListingOnSubdomainGateway": [ | ||
"UnixFS Directory Listing on Subdomain Gateway", | ||
null | ||
], | ||
"conformance-bifrost-gateway": [ | ||
"ipfs/bifrost-gateway", | ||
"https://github.com/ipfs/bifrost-gateway" | ||
], | ||
"conformance-kubo-gateway": [ | ||
"ipfs/kubo", | ||
"https://github.com/ipfs/kubo" | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Rather than "Production" and "Dev" maybe use...
Gateway Instance Conformance Dashboard
Gateway Implementation Conformance Dashboard
Dev and Prod sounds like one is "development/preproduction" and one is "production".