Skip to content
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

docs: break build on bad sdk version #4791

Merged
merged 3 commits into from
Nov 1, 2024

Conversation

rolodato
Copy link
Member

@rolodato rolodato commented Nov 1, 2024

https://docs.flagsmith.com/clients/android is incorrectly showing a fallback version of x.y.z since we're not properly checking for CI during the docs build.

Also changes the source for Android SDK versions to be GitHub releases (i.e. JitPack) until we can sort out publishing to Maven Central.

Tested locally:

$ CI=1 npm run build
[...]
[ERROR] Error: Unable to build website for locale en.
    at tryToBuildLocale (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/commands/build.js:54:19)
    at async /Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/commands/build.js:65:9
    at async mapAsyncSequential (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/utils/lib/jsUtils.js:20:24)
    at async Command.build (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/commands/build.js:63:5) {
  [cause]: Error: Docusaurus static site generation failed for 1 paths:
  - "/clients/android"
      at generateStaticFiles (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/ssg.js:85:15)
      at async executeSSG (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/commands/build.js:175:23)
      ... 4 lines matching cause stack trace ...
      at async Command.build (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/commands/build.js:63:5) {
    [cause]: AggregateError
        at generateStaticFiles (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/ssg.js:86:20)
        at async executeSSG (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/commands/build.js:175:23)
        at async buildLocale (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/commands/build.js:135:31)
        at async tryToBuildLocale (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/commands/build.js:47:13)
        at async /Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/commands/build.js:65:9
        at async mapAsyncSequential (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/utils/lib/jsUtils.js:20:24)
        at async Command.build (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/commands/build.js:63:5) {
      [errors]: [
        Error: Can't render static file for pathname "/clients/android"
            at generateStaticFile (/Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/@docusaurus/core/lib/ssg.js:119:15)
            at runNextTicks (node:internal/process/task_queues:60:5)
            at process.processImmediate (node:internal/timers:447:9)
            at async /Users/rolodato/source/flagsmith/flagsmith/docs/node_modules/p-map/index.js:57:22 {
          [cause]: Error: no version found for android that matches ~1. available versions: []
              at Version (server.bundle.js:55365:577)
              at AndroidVersion (server.bundle.js:55365:741)
              at Uc (server.bundle.js:91194:44)
              at Xc (server.bundle.js:91196:253)
              at Z (server.bundle.js:91202:89)
              at Yc (server.bundle.js:91205:98)
              at $c (server.bundle.js:91204:140)
              at Z (server.bundle.js:91202:345)
              at Yc (server.bundle.js:91205:98)
              at Xc (server.bundle.js:91197:145)
        }
      ]
    }
  }
}

This now works: https://docs-git-docs-break-build-on-bad-sdk-version-flagsmith.vercel.app/clients/android

@rolodato rolodato requested a review from a team as a code owner November 1, 2024 00:26
@rolodato rolodato requested review from gagantrivedi and removed request for a team November 1, 2024 00:26
Copy link

vercel bot commented Nov 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2024 8:43am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Nov 1, 2024 8:43am
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Nov 1, 2024 8:43am

@rolodato rolodato changed the title Docs/break build on bad sdk version docs: break build on bad sdk version Nov 1, 2024
@github-actions github-actions bot added the docs Documentation updates label Nov 1, 2024
@matthewelwell matthewelwell added this pull request to the merge queue Nov 1, 2024
Merged via the queue into main with commit 973bdf9 Nov 1, 2024
10 checks passed
@matthewelwell matthewelwell deleted the docs/break-build-on-bad-sdk-version branch November 1, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants