Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/alluxio/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 82 to 86
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

              {{- $replicas := list -}}
              {{- range .Values.dataloader.targetPaths -}}
                {{- $replicas = append $replicas (default 1 .replicas | int) -}}
              {{- end -}}
              {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/alluxio/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 95 to 99
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

          {{- $replicas := list -}}
          {{- range .Values.dataloader.targetPaths -}}
            {{- $replicas = append $replicas (default 1 .replicas | int) -}}
          {{- end -}}
          {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/goosefs/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 65 to 69
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

              {{- $replicas := list -}}
              {{- range .Values.dataloader.targetPaths -}}
                {{- $replicas = append $replicas (default 1 .replicas | int) -}}
              {{- end -}}
              {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/goosefs/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 78 to 82
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

          {{- $replicas := list -}}
          {{- range .Values.dataloader.targetPaths -}}
            {{- $replicas = append $replicas (default 1 .replicas | int) -}}
          {{- end -}}
          {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/jindo/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 68 to 72
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

              {{- $replicas := list -}}
              {{- range .Values.dataloader.targetPaths -}}
                {{- $replicas = append $replicas (default 1 .replicas | int) -}}
              {{- end -}}
              {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/jindo/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 81 to 85
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

          {{- $replicas := list -}}
          {{- range .Values.dataloader.targetPaths -}}
            {{- $replicas = append $replicas (default 1 .replicas | int) -}}
          {{- end -}}
          {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/jindocache/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 82 to 86
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

              {{- $replicas := list -}}
              {{- range .Values.dataloader.targetPaths -}}
                {{- $replicas = append $replicas (default 1 .replicas | int) -}}
              {{- end -}}
              {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/jindocache/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 95 to 99
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

          {{- $replicas := list -}}
          {{- range .Values.dataloader.targetPaths -}}
            {{- $replicas = append $replicas (default 1 .replicas | int) -}}
          {{- end -}}
          {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/jindofsx/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 82 to 86
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

              {{- $replicas := list -}}
              {{- range .Values.dataloader.targetPaths -}}
                {{- $replicas = append $replicas (default 1 .replicas | int) -}}
              {{- end -}}
              {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/jindofsx/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 95 to 99
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

          {{- $replicas := list -}}
          {{- range .Values.dataloader.targetPaths -}}
            {{- $replicas = append $replicas (default 1 .replicas | int) -}}
          {{- end -}}
          {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/juicefs/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 87 to 91
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

              {{- $replicas := list -}}
              {{- range .Values.dataloader.targetPaths -}}
                {{- $replicas = append $replicas (default 1 .replicas | int) -}}
              {{- end -}}
              {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-dataloader/juicefs/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:

{{- $pathReplicas := ""}}
{{- range .Values.dataloader.targetPaths }}
{{- $pathReplicas = cat $pathReplicas ( default 1 .replicas ) ":"}}
{{- $pathReplicas = cat $pathReplicas (default 1 .replicas | int) ":"}}
{{- end }}
{{- $pathReplicas = $pathReplicas | nospace | trimSuffix ":"}}
Comment on lines 100 to 104
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, building the $pathReplicas string via repeated concatenation inside a loop can be less efficient and harder to read, especially with a large number of paths. A more idiomatic approach in Helm templates is to build a list of values and then join them into a string. This avoids intermediate string manipulation and cleanup steps like nospace and trimSuffix, leading to cleaner and more maintainable code.

This suggestion can be applied to all other modified files in this PR as they follow the same pattern.

          {{- $replicas := list -}}
          {{- range .Values.dataloader.targetPaths -}}
            {{- $replicas = append $replicas (default 1 .replicas | int) -}}
          {{- end -}}
          {{- $pathReplicas := $replicas | join ":" -}}

env:
Expand Down