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

chore: convert log command #6324

Conversation

khendrikse
Copy link
Contributor

@khendrikse khendrikse commented Jan 17, 2024

πŸŽ‰ Thanks for submitting a pull request! πŸŽ‰

Summary

Fixes: https://linear.app/netlify/issue/CT-479/convert-logs-command-to-clack

This converts the logs command into using the new NetlifyLog. It is part of a bigger piece of work that can be seen in #6293. This is also the reason why this PR is merged into the branch CP-101/design-system-clack-implementation. It's a way in which I'm trying to keep possible failing tests, but also the review work to a minimum amount of work for those who are reviewing.
CleanShot 2024-01-17 at 16 39 44

#6325 was also merged into this branch which converts the open command to clack


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code πŸ§‘β€πŸ’». This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire πŸ”₯ (e.g. incident related), you can skip this step.
  • Read the contribution guidelines πŸ“–. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) πŸ§ͺ
  • Update or add documentation (if features were changed or added) πŸ“
  • Make sure the status checks below are successful βœ…

A picture of a cute animal (not mandatory, but encouraged)

@khendrikse khendrikse requested a review from a team as a code owner January 17, 2024 15:43
@khendrikse khendrikse self-assigned this Jan 17, 2024
@lemusthelroy
Copy link
Contributor

Just a note to say this branch now includes code to convert the open command to clack

}

const levelsToPrint = options.level || LOG_LEVELS_LIST

const { functions = [] } = await client.searchSiteFunctions({ siteId })

if (functions.length === 0) {
log(`No functions found for the site`)
return
NetlifyLog.error(`No functions found for the site`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Think we need to exit here

const { result } = await inquirer.prompt({
name: 'result',
type: 'list',
const result = await select({
Copy link
Contributor

Choose a reason for hiding this comment

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

I've managed to narrow down the failing tests to this select prompt but I have no idea why that would cause the timeouts. Digging further...

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah it's because we previously mocked the interaction for inquirer but we need to do the same here for the clack prompt

@lemusthelroy lemusthelroy merged commit d8e422c into CP-101/design-system-clack-implementation Jan 19, 2024
30 checks passed
@lemusthelroy lemusthelroy deleted the CT-479/convert-log-command branch January 19, 2024 09:34
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

2 participants