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

Replacelogin_before_ready withstartup_script_behavior#125

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

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedJun 2, 2023
edited
Loading

Fixes#124

@mafredrimafredriforce-pushed themafredri/replace-login_before_ready-with-startup_script_behavior branch fromfbd5cd1 todb53750CompareJune 2, 2023 14:48
@mafredrimafredri marked this pull request as ready for reviewJune 2, 2023 15:28
@mafredrimafredriforce-pushed themafredri/replace-login_before_ready-with-startup_script_behavior branch fromdb53750 to609d6e0CompareJune 2, 2023 15:28
// the user setting this or "login_before_ready". For all
// intents and purposes, until deprecation, setting
// "login_before_ready = false" is equivalent to setting
// "startup_script_behavior = blocking".
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

We will handle this case in coder/coder, ifstartup_script_behavior is empty string, we take the value fromlogin_before_ready.

mtojek reacted with thumbs up 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.

Nothing blocking 👍

shutdown_script = "echo bye bye"
shutdown_script_timeout = 120
login_before_ready =false
startup_script_behavior ="blocking"
Copy link
Member

Choose a reason for hiding this comment

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

nit: can we add some test cases whenstartup_script_behavior is non-blocking?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Added a bunch of test cases, although since there's no logic now it's a bit silly. 😄

return&schema.Resource{
Description:"Use this resource to associate an agent.",
CreateContext:func(c context.Context,resourceData*schema.ResourceData,iinterface{}) diag.Diagnostics {
CreateContext:func(ctx context.Context,resourceData*schema.ResourceData,iinterface{}) diag.Diagnostics {
Copy link
Member

Choose a reason for hiding this comment

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

nit: I'm curious if there is a way to check ifCheckContext calledupdateStartupScriptBehaviorIfLoginBeforeReady or if it wasReadWithoutTimeout.

BTW It would be nice to write a comment on why we need to call it in both contexts. I think that we usually stick withReadContext.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Both are called, but I never got this method working because the value reverts at the end resulting inStep 1/1 error: After applying this test step, the plan was not empty..

This function was actually supposed to be removed in favor of empty default forstartup_script_behavior, so it's good you asked.

mtojek reacted with thumbs up emoji
@mafredrimafredri merged commite381576 intomainJun 5, 2023
@mafredrimafredri deleted the mafredri/replace-login_before_ready-with-startup_script_behavior branchJune 5, 2023 08:52
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 5, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@mtojekmtojekmtojek approved these changes

@kylecarbskylecarbsAwaiting requested review from kylecarbs

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Replacelogin_before_ready withstartup_script_behavior

2 participants

@mafredri@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp