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

Functions workspace bundling #1165

Merged
merged 7 commits into from
Jun 2, 2021
Merged

Functions workspace bundling #1165

merged 7 commits into from
Jun 2, 2021

Conversation

chrismclarke
Copy link
Member

@chrismclarke chrismclarke commented Jun 2, 2021

PR Checklist

  • - Latest master branch merged
  • - PR title descriptive (can be used in release notes)

PR Type

  • Bug fix (non-breaking change which fixes an issue)

Description

Following #1164, more changes required to make functions compile and deploy. Main issue is that now using yarn workspaces symlinked dependencies break build as firebase doesn't upload node_modules directly but instead installs on own server. The workaround is to add webpack to create a custom bundle including the required shared workspace modules.

Another issue was handling imports from src folder typings, which require compilation before they are ready to import. A new tsconfig.src-types.json file was created to handle this and added to the functions build pipeline.

This whole system of sharing code with firebase functions has been pretty unstable from the beginning, often breaking depending on what was being shared across folders and requiring things like manual scripts to copy/paste files between them. Whilst the new system still isn't perfect (webpack feels like overkill to solve the problem), it should at least be a bit more predictable and stable moving forwards.

Additional issues were also found and fixed related to styled components and linting.

Git Issues

Closes #

Screenshots/Videos

If useful, provide screenshot or capture to highlight main changes


What happens next?

Thanks for the contribution! We try to make sure all PRs are reviewed ahead of a monthly dev call (first Monday of the month, open to all!).

If the PR is working as intended it'll be merged and included in the next platform release, if not changes will be requested and re-reviewed once updated.

If you need more immediate feedback you can try reaching out on slack in the platform-dev channel.

@chrismclarke chrismclarke changed the title Fix/functions Functions workspace bundling Jun 2, 2021
@cypress
Copy link

cypress bot commented Jun 2, 2021



Test summary

68 0 0 0Flakiness 1


Run details

Project onearmy-community-platform
Status Passed
Commit 4122fe5
Started Jun 2, 2021 7:30 PM
Ended Jun 2, 2021 7:34 PM
Duration 04:05 💡
OS Linux Ubuntu - 20.04
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/sign-up.spec.ts Flakiness
1 [Sign-up - new user] > sign in as new user

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@chrismclarke chrismclarke merged commit fd74184 into master Jun 2, 2021
@chrismclarke chrismclarke deleted the fix/functions branch June 2, 2021 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant