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(pkger): add stack init cmd to influx cli #17448

Merged
merged 2 commits into from
Mar 27, 2020

Conversation

jsteenb2
Copy link
Contributor

@jsteenb2 jsteenb2 commented Mar 26, 2020

closes: #17235

@jsteenb2 jsteenb2 requested a review from a team as a code owner March 26, 2020 20:23
@jsteenb2 jsteenb2 requested review from bthesorceror and removed request for a team March 26, 2020 20:23
@jsteenb2 jsteenb2 force-pushed the 17235/pkger_stack_init_cli branch 6 times, most recently from fc3fa20 to ee12282 Compare March 26, 2020 21:52
cmd/influx/pkg.go Outdated Show resolved Hide resolved
return err
}

const fakeUserID = 0 // is 0 because user is pulled from token...
Copy link
Contributor

Choose a reason for hiding this comment

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

The userID can be inferred from the token if you use the auth service, but I'm not sure I understand what it's being used for here.

Is it a problem for the userID to be 0 in some cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the ID is real or not, the user assoicated with the token is what is used when creating resources at this time. That is pretty consistent across the API at this pint.

cmd/influx/pkg.go Outdated Show resolved Hide resolved
Copy link
Contributor

@imogenkinsman imogenkinsman left a comment

Choose a reason for hiding this comment

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

Left some comments / questions.

More broadly, I'm not sure I understand why a CLI command is necessary for a stack. I assumed it was going to be an internal implementation detail, not something that users interacted with directly.

@jsteenb2
Copy link
Contributor Author

jsteenb2 commented Mar 26, 2020

@jademcgough that's a good question. Say you are boostrapping your app for the first time. You've created your org, user, bucket, and now you want a stack to associate with some packages you want in the platform. That stack can be bootstrapped with this call here. The stack can have associated urls, which apply will automatically pull and run for the user associated with the stack_id provided. This avoids the user having to juggle side effects during run time.

Does that help illuminate the need for this?

@jsteenb2 jsteenb2 force-pushed the 17235/pkger_stack_init_cli branch from ee12282 to 31a0f32 Compare March 26, 2020 23:38
@jsteenb2 jsteenb2 force-pushed the 17235/pkger_stack_init_cli branch from 31a0f32 to fb5e2a4 Compare March 27, 2020 01:58
Copy link
Contributor

@kelwang kelwang left a comment

Choose a reason for hiding this comment

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

Looks good, just make sure, double test it out before merge

@jsteenb2 jsteenb2 merged commit f0c0b82 into master Mar 27, 2020
@jsteenb2 jsteenb2 deleted the 17235/pkger_stack_init_cli branch March 27, 2020 15:33
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.

Allow users to create a stack for managing pkg applications
3 participants