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: dont prepare on list #346

Merged
merged 7 commits into from
Sep 6, 2022
Merged

feat: dont prepare on list #346

merged 7 commits into from
Sep 6, 2022

Conversation

stek29
Copy link
Contributor

@stek29 stek29 commented Aug 31, 2022

This changes list command so it doesn't run withPreparedCharts, and just lists releases instead.

See discussion #344 for reasoning.

This might break environments which relied on list having to build everything - I can add a backwards compatible opt flag if that's an issue

changelog note for this PR

Add --skip-charts flag to list subcommand, to only list releases without preparing and templating charts for them

@stek29
Copy link
Contributor Author

stek29 commented Sep 2, 2022

@yxxhero PTAL, list being slow is really painful for us :(

@yxxhero
Copy link
Member

yxxhero commented Sep 3, 2022

@stek29 do you test this on your use case? Thanks very much.

@yxxhero
Copy link
Member

yxxhero commented Sep 3, 2022

@stek29

This might break environments which relied on list having to build everything - I can add a backwards compatible opt flag if that's an issue

I think so. please do it.

@stek29
Copy link
Contributor Author

stek29 commented Sep 3, 2022

@yxxhero I did test it with my use case – our CI pipeline generation stage now runs in under 10 seconds, and it was taking about 5 minutes before, and about 1.5 minutes when running helmfile itself in parallel.

@yxxhero
Copy link
Member

yxxhero commented Sep 3, 2022

@stek29 It's a good idea. @mumoshu

@yxxhero
Copy link
Member

yxxhero commented Sep 4, 2022

@stek29 can we add a option for this logic. example --skip-chart?

@yxxhero
Copy link
Member

yxxhero commented Sep 4, 2022

@stek29 Please fix conflic.

@stek29
Copy link
Contributor Author

stek29 commented Sep 4, 2022

@yxxhero I'll fix the conflict and add a bool flag later today or tomorrow morning (so in next 24h or so)

This changes list command so it doesn't run withPreparedCharts,
and just lists releases instead

Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
@stek29 stek29 force-pushed the list-noprepare branch 3 times, most recently from b0f78db to d9ea1ae Compare September 5, 2022 11:21
@stek29
Copy link
Contributor Author

stek29 commented Sep 5, 2022

@yxxhero should be ready now.

do you track changelog notes anywhere, should I add a note to changelog describing new flag?

@yxxhero
Copy link
Member

yxxhero commented Sep 5, 2022

@stek29 yes. Please add describtion for this flag for the next release changelog.

@yxxhero
Copy link
Member

yxxhero commented Sep 5, 2022

with-prepared-charts? why not skip-prepared-charts

@yxxhero
Copy link
Member

yxxhero commented Sep 5, 2022

@stek29 ping

pkg/app/app.go Outdated Show resolved Hide resolved
@stek29
Copy link
Contributor Author

stek29 commented Sep 5, 2022

@stek29 yes. Please add describtion for this flag for the next release changelog.

how do I do that?

with-prepared-charts? why not skip-prepared-charts

because function is named withPreparedCharts, to keep naming consistent.
should I change to skip- instead? also, imo skip-prepared-charts doesn't sound right to me, how about skip-charts or skip-prepare-charts, or even skip-with-prepared-charts instead?

@yxxhero
Copy link
Member

yxxhero commented Sep 5, 2022

@stek29 skip-charts is better? WDYT?

@yxxhero
Copy link
Member

yxxhero commented Sep 5, 2022

@stek29 add changelog describtion in issue describtion.

@stek29
Copy link
Contributor Author

stek29 commented Sep 5, 2022

@yxxhero but there's no issue - you don't accept issues for feature requests, only discussions

@yxxhero
Copy link
Member

yxxhero commented Sep 5, 2022

@stek29 PR describtion is ok.

@stek29 stek29 force-pushed the list-noprepare branch 2 times, most recently from 8c9ca18 to 7380354 Compare September 5, 2022 15:11
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
@stek29
Copy link
Contributor Author

stek29 commented Sep 5, 2022

@yxxhero i've fixed linting error, changed flag to --skip-charts, and added changelog note example to PR description

cmd/list.go Outdated Show resolved Hide resolved
pkg/app/app.go Outdated Show resolved Hide resolved
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
@stek29
Copy link
Contributor Author

stek29 commented Sep 6, 2022

@yxxhero I've also just noticed there was another test for List, in app_test.go

I've moved it to app_list_test.go and made it run with and without prepared charts

@yxxhero
Copy link
Member

yxxhero commented Sep 6, 2022

@stek29 Thanks very much.

Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
@stek29
Copy link
Contributor Author

stek29 commented Sep 6, 2022

@yxxhero I've changed WithPreparedCharts to SkipCharts in code too

@yxxhero
Copy link
Member

yxxhero commented Sep 6, 2022

@yxxhero I've changed WithPreparedCharts to SkipCharts in code too

@stek29 Thanks very much. I will review when I'm free.

Copy link
Member

@yxxhero yxxhero left a comment

Choose a reason for hiding this comment

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

LGTM

@yxxhero
Copy link
Member

yxxhero commented Sep 6, 2022

@stek29 Thanks very much. This is a great optimization.

@yxxhero yxxhero merged commit 700d708 into helmfile:main Sep 6, 2022
@yxxhero
Copy link
Member

yxxhero commented Sep 6, 2022

@stek29 can you create a PR for update https://github.com/helmfile/helmfile/blob/main/docs/index.md#cli-reference. Thanks very much.

@stek29 stek29 deleted the list-noprepare branch September 6, 2022 09:24
@stek29
Copy link
Contributor Author

stek29 commented Sep 6, 2022

@yxxhero sure, will do

any chance to get a release with this mr, btw?

@yxxhero
Copy link
Member

yxxhero commented Sep 6, 2022

@stek29 wait for you doc PR. Thanks very much.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants