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

feat(cli): respect --no-auto-updates flag in CLI config #7396

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

cngonzalez
Copy link
Member

Description

As auto-updates become the new "default" way to build and deploy studios, we should ensure we're offering ways to easily override default behavior. This PR adds a helper function used in the build and deploy functions that prioritizes CLI flags first, then sanity.cli.{ts|js} parameters, and then finally a default (which we can easily change).

What to review

The new file -- does it belong in utils (it was a bit hard to place since it was shared by two different actions)?
Ways to test I may have missed? (see below)

Testing

This function is quite simple and goes through several layers of abstraction -- I'm not sure if it's particularly useful to test on its own. It would be ideal to test the --no-auto-updates command line input, but I'm not sure it's possible. An integration test with the flags and a cliConfig context is also not particularly useful, because we have to mock the build action in our current tests.

In lieu of that, please find a recording of the various options and configuration.

--no-auto-updates.flag.small.mov

@cngonzalez cngonzalez requested a review from a team as a code owner August 20, 2024 15:03
@cngonzalez cngonzalez requested review from binoy14 and removed request for a team August 20, 2024 15:03
Copy link

vercel bot commented Aug 20, 2024

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

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 8:15pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 8:15pm
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 8:15pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 8:15pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 8:15pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Aug 20, 2024 8:15pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Aug 20, 2024

Component Testing Report Updated Aug 20, 2024 8:22 PM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 43s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 30s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 38s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 10s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 44s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 45s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 16s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 9s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 26s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 17s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 14s 21 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 1m 50s 30 0 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 19s 3 0 0

binoy14
binoy14 previously approved these changes Aug 20, 2024
Copy link
Contributor

@binoy14 binoy14 left a comment

Choose a reason for hiding this comment

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

Changes makes sense to me, thanks!

Left a comment about unit test which would be good to add

Copy link
Contributor

@binoy14 binoy14 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

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.

2 participants