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

adds check command #2452

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

adds check command #2452

wants to merge 3 commits into from

Conversation

ykethan
Copy link
Member

@ykethan ykethan commented Jan 27, 2025

Problem

folks may need to run sandbox command to compile/synthesize their backend for any errors.
The npx ampx check will dry run with just tsc and synth without deploying any resources.

Screen.Recording.2025-01-25.at.10.06.05.PM.mov

image

Issue number, if available:

Changes

Corresponding docs PR, if applicable:

Validation

Checklist

  • If this PR includes a functional change to the runtime behavior of the code, I have added or updated automated test coverage for this change.
  • If this PR requires a change to the Project Architecture README, I have included that update in this PR.
  • If this PR requires a docs update, I have linked to that docs PR above.
  • If this PR modifies E2E tests, makes changes to resource provisioning, or makes SDK calls, I have run the PR checks with the run-e2e label set.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ykethan ykethan requested review from a team as code owners January 27, 2025 15:06
Copy link

changeset-bot bot commented Jan 27, 2025

🦋 Changeset detected

Latest commit: 2943d66

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@aws-amplify/backend-deployer Minor
@aws-amplify/backend-cli Minor

Not sure what this means? Click here to learn what changesets are.

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

* Command that runs type checking and CDK synthesis without deployment
*/
export class CheckCommand implements CommandModule {
command = 'check';
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a big fan of the command name check. It's more closely related to build and perhaps --dryRun isn't bad either for the existing sandbox command. This way customers can utilize the watch nature of sandbox for builds as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that it's more of a "build", though the check name was inspired by other projects that provide similar functionality with the intent of a sort of "preflight" task before merging changes. There is another request to provide a "diff" function and integrate cdk-nag to perform diagnostics and/or highlight best practices that I think would fit nicely with the "check" theme

https://docs.astro.build/en/reference/cli-reference/#astro-check
https://svelte.dev/docs/cli/sv-check

Copy link
Contributor

Choose a reason for hiding this comment

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

There is definitely overlap between check and build. We might be slightly different in the sense that we "synth" as well. We discussed offline to do an API review of this change will all the proposals.

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.

3 participants