Closed simonw closed 2 years ago
Annoyingly it didn't give me that error in local dev:
% export GITHUB_TOKEN=...
% python build_directory.py content.db --fetch-missing-releases \
--always-fetch-releases-for-repo simonw/datasette-app
Fetching README for ['dogsheep/github-to-sqlite', 'dogsheep/pocket-to-sqlite', 'hydrosquall/datasette-nteract-data-explorer', 'rclement/datasette-dashboards', 'simonw/datasette-app', 'simonw/datasette-block-robots', 'simonw/datasette-edit-schema', 'simonw/datasette-leaflet-geojson', 'simonw/datasette-mp3-audio', 'simonw/datasette-pretty-json', 'simonw/datasette-publish-fly', 'simonw/datasette-publish-vercel', 'simonw/datasette-render-images', 'simonw/datasette-scale-to-zero', 'simonw/datasette-sentry', 'simonw/datasette-upload-csvs', 'simonw/datasette-upload-dbs', 'simonw/git-history', 'simonw/s3-credentials', 'simonw/s3-ocr', 'simonw/shot-scraper', 'simonw/sqlite-diffable', 'simonw/sqlite-utils']
Here's the query it's running. It's pretty big! 4,000 lines now: https://gist.github.com/simonw/80ef5a69f147741009d0edea4ef3b6ea
Truncated version:
{
repo_0: repository(name: "datasette-query-history", owner: "bretwalker") {
id
nameWithOwner
createdAt
openGraphImageUrl
usesCustomOpenGraphImage
defaultBranchRef {
target {
oid
}
}
repositoryTopics(first: 100) {
totalCount
nodes {
topic {
name
}
}
}
openIssueCount: issues(states: [OPEN]) {
totalCount
}
closedIssueCount: issues(states: [CLOSED]) {
totalCount
}
releases(last: 1) {
totalCount
nodes {
tagName
}
}
}
# ...
repo_137: repository(name: "yaml-to-sqlite", owner: "simonw") {
id
nameWithOwner
createdAt
openGraphImageUrl
usesCustomOpenGraphImage
defaultBranchRef {
target {
oid
}
}
repositoryTopics(first: 100) {
totalCount
nodes {
topic {
name
}
}
}
openIssueCount: issues(states: [OPEN]) {
totalCount
}
closedIssueCount: issues(states: [CLOSED]) {
totalCount
}
releases(last: 1) {
totalCount
nodes {
tagName
}
}
}
}
I tried running the full ./scripts/build.sh
script locally (after setting that GITHUB_TOKEN
environment variable) and that worked on my laptop too.
Likewise, the giant GraphQL query worked on https://docs.github.com/en/graphql/overview/explorer
Maybe I can shrink the query using GraphQL fragments: https://www.apollographql.com/docs/react/data/fragments/
Yes this seems to work on https://docs.github.com/en/graphql/overview/explorer
fragment repoFields on Repository {
id
nameWithOwner
createdAt
openGraphImageUrl
usesCustomOpenGraphImage
defaultBranchRef {
target {
oid
}
}
repositoryTopics(first: 100) {
totalCount
nodes {
topic {
name
}
}
}
openIssueCount: issues(states: [OPEN]) {
totalCount
}
closedIssueCount: issues(states: [CLOSED]) {
totalCount
}
releases(last: 1) {
totalCount
nodes {
tagName
}
}
}
{
repo_0: repository(name: "datasette-query-history", owner: "bretwalker") {
...repoFields
}
repo_1: repository(name: "datasette-graphql", owner: "simonw") {
...repoFields
}
}
That seems to have fixed it. Or at least deploys are working again now.
https://github.com/simonw/datasette.io/actions/runs/3156426439/jobs/5136126305
Looks like this first broke 3 days ago: https://github.com/simonw/datasette.io/actions/runs/3140951006/jobs/5102874022