Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(cli): add--provisioner-log-debug option#14558

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 2 commits intomainfromcj/build-debug
Sep 4, 2024
Merged

Conversation

johnstcn
Copy link
Member

@johnstcnjohnstcn commentedSep 4, 2024
edited
Loading

Allows starting a build in debug mode from the CLI without having to have the build fail first by adding--provisioner-log-debug.

provisioner bool
}

func (bdf *buildDebugFlags) cliOptions() []serpent.Option {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we instead hook into theCODER_VERBOSE setting?
I'm curious why we need a new setting.

Copy link
MemberAuthor

@johnstcnjohnstcnSep 4, 2024
edited
Loading

Choose a reason for hiding this comment

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

Enabling provisioner debug logs is only allowed if--enable-terraform-debug-mode is set. Hooking intoCODER_VERBOSE would potentially make unrelated stuff fail if this was not set.

If we did want to re-use this flag, we would need to first fetch the deployment config and check.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not a fan of piggy-backing on verbose either, it essentially changes the behavior of a build, not just the output of the CLI.

Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

I think the flag naming could be a bit better, but otherwise LGTM.

func (bdf *buildDebugFlags) cliOptions() []serpent.Option {
return []serpent.Option{
{
Flag: "debug-provisioner",
Copy link
Member

Choose a reason for hiding this comment

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

We're not so much debugging the provisioner as we're debugging the build via increased provisioner logs. I think we can do a bit better on the naming but I don't have any great ideas. Maybe--debug-build?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I could just straight-up make it--provisioner-log-debug? WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

That still sounds like provisioner debugging IMO, not build debugging 😅

@@ -8,6 +8,11 @@ USAGE:
Aliases: rm

OPTIONS:
--debug-provisioner bool
Copy link
Member

Choose a reason for hiding this comment

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

Should we keep this flag hidden? I believe this is only for template admins as it may leak some secrets in the TF verbose mode.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I'm happy to hide it 👍

mtojek reacted with heart emoji
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

Stamp 👍

@johnstcnjohnstcn changed the titlefeat(cli): add --debug-provisioner argumentfeat(cli): add--provisioner-log-debug optionSep 4, 2024
@johnstcnjohnstcn merged commitbcf9bc3 intomainSep 4, 2024
32 checks passed
@johnstcnjohnstcn deleted the cj/build-debug branchSeptember 4, 2024 13:39
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 4, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@dannykoppingdannykoppingdannykopping left review comments

@mtojekmtojekmtojek approved these changes

@DanielleMaywoodDanielleMaywoodAwaiting requested review from DanielleMaywood

Assignees

@johnstcnjohnstcn

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@johnstcn@mafredri@dannykopping@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp