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

Setup turborepo #45

Closed
wants to merge 22 commits into from
Closed

Setup turborepo #45

wants to merge 22 commits into from

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Feb 13, 2023

In a monorepo, we don't want to run certain task more frequently than we have.
This enables C.I. to run faster, and save some energy

Previously (on main): https://github.com/CrowdStrike/ember-headless-form/actions/runs/4166228177/usage

  • Perceived duration: 5m 15s
  • Total task run time: 22m 39s

Now (on this branch):
cache miss

  • Perceived duration: 3m 51s
  • Total task run time: 15m 13s

full cache hit

  • Perceived duration: 2m 41s
  • Total task run time: 10m 49s

Included extra reviewers, because this is something I want to introduce in toucan-core as well.


Test Plan

try things out locally, and provide feedback -- hopefully everything is "transparent" -- with the only places turbo deliberately isn't used:

  • pnpm lint:fix
  • pnpm start -- though, I did add a pnpm turbo:start for testing -- turbo lacks the error-recovery behavior that concurrently has (existing pnpm start)

@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2023

⚠️ No Changeset found

Latest commit: dd23af9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@ynotdraw ynotdraw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this is fast! I'm so pumped for this.

build

Tasks:    4 successful, 4 total
Cached:    4 cached, 4 total
Time:    464ms >>> FULL TURBO

And then a subsequent run:

Tasks:    4 successful, 4 total
Cached:    4 cached, 4 total
Time:    125ms >>> FULL TURBO

test

Tasks:    7 successful, 7 total
Cached:    3 cached, 7 total
Time:    16.024s

subsequent run (full cache):

Tasks:    7 successful, 7 total
Cached:    7 cached, 7 total
Time:    143ms >>> FULL TURBO

uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: foo-123
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not seeing this in https://github.com/felixmosh/turborepo-gh-artifacts#action-inputs, but in code seeing a description of An access token of the local turbo-server. Is this required? Or does it help the Setup Tests step in some way?

Looks like server-token gets passed as --token to the turbo CLI (https://turbo.build/repo/docs/reference/command-line-reference#--token), eh?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. For our use case the value doesn't matter 🎉

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have it then? We cannot just omit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last i checked, there are errors without. Like, turbo thinks setup is incomplete or something. It's been a while since i tried though, so i'll double check. Maybe something is different now.

Copy link
Contributor

@simonihmig simonihmig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! 🚀

Left some minor comments, but approving already! Thanks for figuring this out!

uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: foo-123
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have it then? We cannot just omit?

turbo.json Outdated Show resolved Hide resolved
test-app/package.json Outdated Show resolved Hide resolved
@NullVoxPopuli
Copy link
Contributor Author

I found a pnpm bug! yay! pnpm/pnpm#5144 (comment)

@simonihmig
Copy link
Contributor

superseded by #52

@simonihmig simonihmig closed this Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants