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: lint all templates to fix indentation and update style #465

Merged
merged 11 commits into from
Nov 18, 2023

Conversation

wrenix
Copy link
Collaborator

@wrenix wrenix commented Nov 11, 2023

Pull Request

Description of the change

  • replace indent with nindent (and spaces)
  • array of yaml indent
  • with+if replace with with (with is already an if)
  • nginx if over all probes
  • use more with
  • default "just" in values.yaml

Benefits

readable code

Possible drawbacks

none

Applicable issues

none

Additional information

@wrenix wrenix force-pushed the chore/cleanup branch 4 times, most recently from cf703bf to 0c1ada9 Compare November 11, 2023 14:12
Copy link
Collaborator

@jessebot jessebot left a comment

Choose a reason for hiding this comment

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

Left a few comments, but overall good linting/formatting changes :) What did you use to do this and in which text editor/IDE?

@jessebot
Copy link
Collaborator

Can you also bump this a patch version in the Chart.yaml? I know it's just linting and formatting, but it's always helpful, just in case.

@wrenix
Copy link
Collaborator Author

wrenix commented Nov 11, 2023

sadly i do that handly and use the https://helix-editor.com/ - but i see that not readible code very often (and start sometimes with some cleanups before i work there)

PS: i am thinking of createn an PR, to manage nextcoud-apps and there configuration with an initcontainer and script using occ-commands ...

@jessebot
Copy link
Collaborator

jessebot commented Nov 11, 2023

sadly i do that handly and use the https://helix-editor.com/ - but i see that not readible code very often (and start sometimes with some cleanups before i work there)

well you did a good job! also that editor looks neat :)

PS: i am thinking of createn an PR, to manage nextcoud-apps and there configuration with an initcontainer and script using occ-commands ...

please see this comment as apparently we already have a post install task mechanism here?:
#272 (comment)

update: just realized you're in that thread too 😄

It would be great to get some docs on that though!

@wrenix
Copy link
Collaborator Author

wrenix commented Nov 11, 2023

so i hope for the first step, i have everything solved.

PS: I create a discussion issue for my idea of application management, see #466

Copy link
Collaborator

@jessebot jessebot left a comment

Choose a reason for hiding this comment

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

This looks good to me and I learned some stuff along the way, which is always awesome! Due to the size of this PR, I'm going to tag in a couple of other collaborators to review this and make sure I didn't miss anything.

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

LGTM, just some whitespace nitpicks

charts/nextcloud/templates/deployment.yaml Outdated Show resolved Hide resolved
charts/nextcloud/templates/deployment.yaml Outdated Show resolved Hide resolved
charts/nextcloud/templates/deployment.yaml Outdated Show resolved Hide resolved
charts/nextcloud/templates/deployment.yaml Outdated Show resolved Hide resolved
charts/nextcloud/templates/deployment.yaml Outdated Show resolved Hide resolved
charts/nextcloud/templates/deployment.yaml Outdated Show resolved Hide resolved
charts/nextcloud/templates/deployment.yaml Outdated Show resolved Hide resolved
charts/nextcloud/templates/deployment.yaml Outdated Show resolved Hide resolved
@jessebot jessebot changed the title chore: cleanup deployment.yaml chore: lint all templates to fix indentation and update style Nov 18, 2023
@jessebot jessebot merged commit a303a5f into nextcloud:main Nov 18, 2023
2 checks passed
@wrenix wrenix deleted the chore/cleanup branch November 18, 2023 22:44
@DanishVaid
Copy link

DanishVaid commented Nov 18, 2023

@wrenix I think this introduced a regression. The change in charts/nextcloud/templates/config.yaml line 14 from indent -> nindent causes an extra newline and that leads to a PHP error:

Config file has leading content, please remove everything before "<?php" in custom.config.php
Fatal error: Uncaught Error: Typed static property OC::$server must not be accessed before initialization in /var/www/html/index.php:71 Stack trace: #0 {main} thrown in /var/www/html/index.php on line 71

wrenix added a commit to wrenix/nextcloud-helm that referenced this pull request Nov 19, 2023
wrenix added a commit to wrenix/nextcloud-helm that referenced this pull request Nov 19, 2023
wrenix added a commit to wrenix/nextcloud-helm that referenced this pull request Nov 19, 2023
wrenix added a commit to wrenix/nextcloud-helm that referenced this pull request Nov 19, 2023
wrenix added a commit to wrenix/nextcloud-helm that referenced this pull request Nov 19, 2023
jessebot pushed a commit that referenced this pull request Nov 20, 2023
…abels) (#476)

* fix: after #465 (remove before <?php and correct indent of extraVolumes)

Signed-off-by: WrenIX <[email protected]>

* fix: podLabel inside of with

Signed-off-by: WrenIX <[email protected]>

---------

Signed-off-by: WrenIX <[email protected]>
Signed-off-by: WrenIX <[email protected]>
This was referenced Nov 20, 2023
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.

4 participants