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

fix(deploy): try-catch attempt to read redwood.toml in makeMergedSchema #8155

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

jtoar
Copy link
Contributor

@jtoar jtoar commented Apr 27, 2023

Deploy target CI is down for Netlify and Vercel with the error:

Error: Could not find a "redwood.toml" file, are you sure you're in a Redwood project?
    at getConfigPath (/var/task/node_modules/@redwoodjs/project-config/dist/configPath.js:20:11)
    at getConfig (/var/task/node_modules/@redwoodjs/project-config/dist/config.js:91:63)
    at Object.posts (/var/task/node_modules/@redwoodjs/graphql-server/dist/makeMergedSchema/makeMergedSchema.js:69:44)
    at useRedwoodDirectiveValidatorResolver (/var/task/node_modules/@redwoodjs/graphql-server/dist/plugins/useRedwoodDirective.js:108:22)
    at field.resolve (/var/task/node_modules/@envelop/on-resolve/cjs/index.js:33:48)
    at async field.resolve (/var/task/node_modules/@envelop/on-resolve/cjs/index.js:33:42)
    at async field.resolve (/var/task/node_modules/@envelop/on-resolve/cjs/index.js:33:42)
    at async Promise.all (index 0)
    at async promiseForObject (/var/task/node_modules/@graphql-tools/executor/cjs/execution/promiseForObject.js:14:28)
    at async /var/task/node_modules/@envelop/core/cjs/orchestrator.js:376:27

This is because these deploy environments bundle the functions they're given to deploy and don't seem to include the redwood.toml file. While we figure out how to include the toml file or debate whether or not it should be, we can at least try-catch the attempt to read it and proceed with a default value for experimental OpenTelemetry if it's not there.

@jtoar jtoar added the release:fix This PR is a fix label Apr 27, 2023
@jtoar jtoar changed the title fix: try-catch attempt to read redwood.toml in serverless fix(deploy): try-catch attempt to read redwood.toml in makeMergedSchema Apr 27, 2023
@jtoar jtoar changed the title fix(deploy): try-catch attempt to read redwood.toml in makeMergedSchema fix(deploy): try-catch attempt to read redwood.toml in makeMergedSchema Apr 27, 2023
@replay-io
Copy link

replay-io bot commented Apr 27, 2023

16 replays were recorded for 4abefa3.

image 0 Failed
image 16 Passed
    requireAuth graphql checks
          ```
          locator.waitFor: Target closed
          =========================== logs ===========================
          waiting for locator('.rw-form-error-title').locator('text=You don\'t have permission to do that') to be visible
          ============================================================
          ```
        </ol>
      </details>
      <li><a href=https://app.replay.io/recording/7980906a-d77b-44ee-bd33-e4a3e97638e7>useAuth hook, auth redirects checks</a></li>
      <li><a href=https://app.replay.io/recording/f59a2fc6-4f96-4571-a261-326ee8a6c7d1>Check that a specific blog post is prerendered</a></li>
      <li><a href=https://app.replay.io/recording/85794689-681b-47b9-991e-ce541141ec1e>Check that about is prerendered</a></li>
      <li><a href=https://app.replay.io/recording/7e74a250-0ac5-4284-bc03-a8cd36664a49>Check that homepage is prerendered</a></li>
      <li><a href=https://app.replay.io/recording/51d30e8c-d219-45e6-80c4-60dc25c890b1>Check that meta-tags are rendering the correct dynamic data</a></li>
      <li><a href=https://app.replay.io/recording/b99ef4e2-cbb8-4b7f-8ff8-e6125fe4dea0>Check that you can navigate from home page to specific blog post</a></li>
      <li><a href=https://app.replay.io/recording/e647de10-531e-4118-a3ff-dc74946e341b>Waterfall prerendering (nested cells)</a></li>
      <li><a href=https://app.replay.io/recording/09dff855-bf13-435d-bc1f-01fd3fa07a9e>RBAC: Admin user should be able to delete contacts</a></li>
      <li><a href=https://app.replay.io/recording/1b63c604-3d75-4282-9af2-2e5b99973f93>RBAC: Should not be able to delete contact as non-admin user</a></li>
      <li><a href=https://app.replay.io/recording/a65914f9-5629-4078-8a66-212176fce630>Smoke test with dev server</a></li>
      <li><a href=https://app.replay.io/recording/5318e3e0-9733-4484-bbc7-128ebd98dae0>Smoke test with rw serve</a></li>
      <li><a href=https://app.replay.io/recording/fd4f7974-a747-40a6-b970-5f94b715f124>Loads Cell mocks when Cell is nested in another story</a></li>
      <li><a href=https://app.replay.io/recording/0e8bb20c-75a4-4b5a-9185-06fa1d2dc9ca>Loads Cell Stories</a></li>
      <li><a href=https://app.replay.io/recording/2c4edbbd-a297-4bb9-976d-7cc1c85c440f>Loads MDX Stories</a></li>
      <li><a href=https://app.replay.io/recording/7da3f779-fae8-448e-b754-210d82a9c953>Mocks current user, and updates UI while dev server is running</a></li>
      

View test run on Replay ↗︎

@jtoar jtoar merged commit 3663c0e into main Apr 27, 2023
@jtoar jtoar deleted the ds-fix-netlify-vercel-deploy-exp-telem branch April 27, 2023 22:47
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant