8000 Remove user-facing config of limits and requests by lllamnyp · Pull Request #935 · cozystack/cozystack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove user-facing config of limits and requests #935

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

Merged
merged 1 commit into from
May 23, 2025

Conversation

lllamnyp
Copy link
Member
@lllamnyp lllamnyp commented May 12, 2025

This patch introduces reusable library charts that provide backward-compatibility for users that specify their resources as explicit requests and limits for cpu, however this input is processed so that limits are set equal to requests except for CPU which only gets requests. Users can now embrace the new form by directly specifying resources in the first level of nesting (e.g. resources.cpu=100m instead of .resources.requests.cpu=100m). The order of precedence is top-level, then requests, then limits, ensuring that nothing will break in terms of scheduling, however workloads that specified limits much higher than requests might get a performance hit, now that they cannot use all this excess capacity. This should only affect memory-hungry workloads in low-contention environments.

Summary by CodeRabbit

  • New Features

    • Introduced a reusable Helm library chart, "cozy-lib", providing common templates and resource helpers for other charts.
    • Added resource preset and sanitization templates to standardize Kubernetes resource configurations.
    • ClickHouse chart now depends on "cozy-lib" for improved resource handling.
    • Added a new packaging script and streamlined Helm chart packaging processes across multiple packages.
  • Bug Fixes

    • Resource configuration logic in the ClickHouse deployment was updated to use the new library templates, ensuring more consistent resource definitions.
  • Chores

    • Added new Makefiles and version mapping for streamlined Helm chart packaging and validation.
    • Updated ClickHouse chart version to 0.9.0 and reflected this in version mapping files.
    • Refactored Makefile targets to consolidate packaging logic and improve maintainability.

@lllamnyp lllamnyp requested review from kvaps and klinch0 as code owners May 12, 2025 16:01
Copy link
Contributor
coderabbitai bot commented May 12, 2025
## Walkthrough

This change introduces a new Helm library chart `cozy-lib` with resource preset and sanitization templates. The ClickHouse application chart is updated to depend on this library and use its resource helpers. Makefiles for `apps`, `extra`, and the new `library` package are refactored to delegate packaging to a new script and include version map checks and repository generation for the library chart.

## Changes

| File(s)                                                                                  | Change Summary |
|-----------------------------------------------------------------------------------------|----------------|
| Makefile, packages/apps/Makefile, packages/extra/Makefile                               | Updated `repos` targets to include `packages/library` for version map checks and repo packaging. Refactored `repo` targets to call the new packaging script with dynamic temp directories. |
| packages/apps/clickhouse/Chart.yaml, packages/apps/clickhouse/charts/cozy-lib           | Bumped ClickHouse chart version to 0.9.0, added `cozy-lib` as a dependency, and referenced it in the charts directory. |
| packages/apps/clickhouse/templates/clickhouse.yaml                                      | Changed resource configuration to use `cozy-lib` Helm helpers for resource sanitization and presets. |
| packages/apps/versions_map                                                              | Updated ClickHouse version from 0.8.0 to 0.9.0. |
| packages/library/Makefile, packages/library/versions_map                                | Added new Makefile and versions_map for the `cozy-lib` library chart, supporting packaging, version map generation, and repo creation. |
| packages/library/cozy-lib/.helmignore, packages/library/cozy-lib/Chart.yaml, packages/library/cozy-lib/Makefile, packages/library/cozy-lib/README.md, packages/library/cozy-lib/templates/_resourcepresets.tpl, packages/library/cozy-lib/templates/_resources.tpl, packages/library/cozy-lib/values.schema.json, packages/library/cozy-lib/values.yaml | Added new Helm library chart `cozy-lib` with resource preset and sanitization templates, chart metadata, ignore rules, schema, documentation, and a Makefile target for README generation. |
| hack/package_chart.sh                                                                    | Added new shell script to automate Helm chart packaging from git archives, supporting optional dependency extraction. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant MainMakefile
    participant LibraryMakefile
    participant Git
    participant Helm
    participant AppsMakefile
    participant ExtraMakefile
    participant ClickHouseChart

    User->>MainMakefile: make repos
    MainMakefile->>LibraryMakefile: make -C packages/library check-version-map
    LibraryMakefile->>Git: git diff --exit-code versions_map
    MainMakefile->>LibraryMakefile: make -C packages/library repo
    LibraryMakefile->>Git: git archive cozy-lib@commit
    LibraryMakefile->>Helm: helm package cozy-lib
    MainMakefile->>AppsMakefile: make -C packages/apps repo
    AppsMakefile->>Git: git archive clickhouse@commit (+ cozy-lib if exists)
    AppsMakefile->>Helm: helm package clickhouse (with cozy-lib dependency)
    MainMakefile->>ExtraMakefile: make -C packages/extra repo
    ExtraMakefile->>Git: git archive extra@commit (+ cozy-lib if exists)
    ExtraMakefile->>Helm: helm package extra

Possibly related PRs

  • Don't overcommit memory #913: Introduces resource presets directly inside application charts' Helm templates, while this PR refactors resource handling into a reusable library chart and updates ClickHouse to use it.

Suggested labels

ok-to-test

Suggested reviewers

  • klinch0
  • kvaps

Poem

In the warren of code, a library grew,
With presets and helpers—resourceful and new!
ClickHouse now hops with a chart that's more bright,
Sharing its carrots with cozy delight.
The rabbits all cheer, their tails held high—
For templates and charts, oh my, oh my!
🐰✨


<!-- walkthrough_end -->

<!-- announcements_start -->

> [!NOTE]
> <details>
> <summary>⚡️ AI Code Reviews for VS Code, Cursor, Windsurf</summary>
> 
> CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
> Learn more [here](http://coderabbit.ai/ide).
> 
> </details>

<!-- announcements_end -->

---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 6f702b58a1811eef1f139d5068b380bb892576ae and 9592f7fe463ff5cfa03b55ac4915bd6fb254cfcb.

</details>

<details>
<summary>📒 Files selected for processing (19)</summary>

* `Makefile` (1 hunks)
* `hack/gen_versions_map.sh` (2 hunks)
* `hack/package_chart.sh` (1 hunks)
* `packages/apps/Makefile` (1 hunks)
* `packages/apps/clickhouse/Chart.yaml` (1 hunks)
* `packages/apps/clickhouse/charts/cozy-lib` (1 hunks)
* `packages/apps/clickhouse/templates/clickhouse.yaml` (1 hunks)
* `packages/apps/versions_map` (1 hunks)
* `packages/extra/Makefile` (1 hunks)
* `packages/library/Makefile` (1 hunks)
* `packages/library/cozy-lib/.helmignore` (1 hunks)
* `packages/library/cozy-lib/Chart.yaml` (1 hunks)
* `packages/library/cozy-lib/Makefile` (1 hunks)
* `packages/library/cozy-lib/README.md` (1 hunks)
* `packages/library/cozy-lib/templates/_resourcepresets.tpl` (1 hunks)
* `packages/library/cozy-lib/templates/_resources.tpl` (1 hunks)
* `packages/library/cozy-lib/values.schema.json` (1 hunks)
* `packages/library/cozy-lib/values.yaml` (1 hunks)
* `packages/library/versions_map` (1 hunks)

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (2)</summary>

* packages/apps/clickhouse/Chart.yaml
* packages/library/cozy-lib/Chart.yaml

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (16)</summary>

* packages/library/cozy-lib/README.md
* packages/library/cozy-lib/values.yaml
* packages/apps/versions_map
* packages/apps/clickhouse/charts/cozy-lib
* packages/library/cozy-lib/values.schema.json
* packages/library/versions_map
* Makefile
* packages/library/cozy-lib/Makefile
* packages/library/cozy-lib/.helmignore
* packages/library/cozy-lib/templates/_resourcepresets.tpl
* packages/library/cozy-lib/templates/_resources.tpl
* packages/extra/Makefile
* packages/apps/clickhouse/templates/clickhouse.yaml
* packages/library/Makefile
* packages/apps/Makefile
* hack/package_chart.sh

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

<details>
<summary>hack/gen_versions_map.sh</summary>

[warning] 21-21: In POSIX sh, echo flags are undefined.

(SC3037)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (2)</summary><blockquote>

<details>
<summary>hack/gen_versions_map.sh (2)</summary>

`19-20`: **Good use of a temporary file with automatic cleanup**

Using `mktemp` to generate a secure temp file and registering a `trap` to remove it on exit ensures you don’t leak large variables into subshells and leaves no orphaned files behind.

---

`27-27`: **Loop header is clear and efficient**

The `while read -r chart version commit; do` construct with direct file redirection avoids spawning a subshell and correctly preserves whitespace. No changes needed here.

</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJAT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8QYu1woinfIrLi0nJyk3HPqHxyFlugSadHOeALAQgbkvyCaO2AIbe4coIIYeEgCwXLlUA7+aGV2IsQFAZRRGfaRCHEjHJFxNaMqRwsnDUT2Feky+Y3TeSZ4fuQ6YKM8kgydC2wb2YAJAAAAkt8u4cDK+hoBC0ERSMgJlCSJtBEvUhHjR0+D4ARZ9M0tn8B7ikggJ/EafrP1CQPAeo4gT3jUU3QnJqAvLQsvyDVDkMXs+AMVHljQgAQvA4kfiFuID6GsiAsco9DKATlMwG28w6OvVOWFPompnbWwWYXJFp14hKMD6PRC5l4slpMNdgKDCAUsiGU0MR6FQGegIw3oyMAwEUuiX/x9FE7YyDxToD/x4K6mTaC0u2iMBHw6wTIAABYAA7M+G2CPgHMAANgmXrAJltAZ8JsAmVzKBA2wdYOsDGUMAxlJAOZbQAmXrLHwYyhZbQDGWYdMOSMQwEUrGW0BMO2wR5c+AYCPgGAtATZZkFeVoBHwAgTDhMsw6bBAVDAIFWMtfDTLnwcyhzACrQCbAblgyiAJABfBoAPsPyhzAwHWBoASAEyt5WMreXrKxlYytANCs2Diw0ARKx8LQEyAOZSVKyhzPCqKWnKJlYy1YDkEfCbAGAz4ZWEssw4bLMg2wHFZh2pWZBMOYyhzPytoAMBAVPyo5QyqGXzKuVsykFbCsfAAraA7KzYL8s5UOY0AvKhgBMoEAMAZlj4bYEoDmVzLtlEyuVYirmWZAplmHTZTqtmWPhHwm2TII+HdWbB1gtAbYJCocwCBNgDmZ8KoAczrBHl6yrFdaqgDrAtlQqiZR9jOWbAZG2wBgNkFWWbLtgOQMZesBNUCBaAtqv5dsF2VfK7aAy1pQ+XaU2lOl4kbpbQH/i7QblQAA== -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=cozystack/cozystack&utm_content=935):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

Base automatically changed from 912-fix-resource-presets to main May 13, 2025 15:19
@lllamnyp lllamnyp force-pushed the fix/no-user-facing-limits branch from df07e7b to c19f470 Compare May 14, 2025 15:27
Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🔭 Outside diff range comments (1)
packages/apps/Makefile (1)

25-26: ⚠️ Potential issue

Update version-map file reference for apps.
The check-version-map target still diffs versions_map, but your loop reads from apps/versions_map2. To keep consistency and avoid false failures, change it to:

@@ check-version-map: gen-versions-map
-	git diff --exit-code -- versions_map
+	git diff --exit-code -- versions_map2
🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 26-26: Makefile target 'image-cozystack' failed due to failure in 'repos' target.


[error] 26-26: Top-level make build failed with exit code 2 due to errors in sub-make targets.

🧹 Nitpick comments (6)
packages/library/cozy-lib/Makefile (1)

4-6: Declare generate as a phony target
To avoid conflicts with files named generate, it’s best practice to mark it .PHONY. For example:

+ .PHONY: generate
generate:
	readme-generator -v values.yaml -s values.schema.json -r README.md
packages/library/Makefile (3)

1-2: Add phony targets and enforce strict shell flags.
It’s best practice to declare your Makefile targets as .PHONY and enable -euo pipefail so that any command failure aborts the recipe immediately. For example:

+ .PHONY: repo fix-chartnames gen-versions-map check-version-map
+ .SHELLFLAGS += -eu -o pipefail

4-11: Clean up the temporary directory after packaging.
You create $(TMP) via mktemp -d but never remove it. This can leave orphaned directories on repeated runs. Consider adding a cleanup step at the end of the repo target:

@@ repo:
-	done
+	done
+	rm -rf "$(TMP)"

13-14: Future-proof fix-chartnames depth.
The find . -maxdepth 2 will catch current charts under packages/library/<chart>, but if in future charts live deeper (e.g., nested libraries), they’ll be skipped. You may want to remove -maxdepth 2 or adjust it, or explicitly document this constraint.

packages/apps/Makefile (2)

2-2: Ensure temp directory is torn down.
You allocate TMP := $(shell mktemp -d) but never delete it. Add a remove step (rm -rf "$(TMP)") after your loop in the repo target to avoid leftover directories.


1-3: Declare phony targets and strict shell settings.
Mirroring the library Makefile, add at the top:

+ .PHONY: repo fix-chartnames gen-versions-map check-version-map
+ .SHELLFLAGS += -eu -o pipefail

This will catch errors early and avoid accidental file collisions.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9377f55 and c19f470.

📒 Files selected for processing (16)
  • Makefile (1 hunks)
  • packages/apps/Makefile (1 hunks)
  • packages/apps/clickhouse/Chart.yaml (1 hunks)
  • packages/apps/clickhouse/charts/cozy-lib (1 hunks)
  • packages/apps/clickhouse/templates/clickhouse.yaml (1 hunks)
  • packages/apps/versions_map (1 hunks)
  • packages/library/Makefile (1 hunks)
  • packages/library/cozy-lib/.helmignore (1 hunks)
  • packages/library/cozy-lib/Chart.yaml (1 hunks)
  • packages/library/cozy-lib/Makefile (1 hunks)
  • packages/library/cozy-lib/README.md (1 hunks)
  • packages/library/cozy-lib/templates/_resourcepresets.tpl (1 hunks)
  • packages/library/cozy-lib/templates/_resources.tpl (1 hunks)
  • packages/library/cozy-lib/values.schema.json (1 hunks)
  • packages/library/cozy-lib/values.yaml (1 hunks)
  • packages/library/versions_map (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Pull Request
packages/library/cozy-lib/values.yaml

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/library/cozy-lib/README.md

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/library/versions_map

[error] 1-2: Makefile check-version-map failed due to unexpected diff in versions_map file.

packages/library/cozy-lib/values.schema.json

[error] 1-1: Makefile target 'check-version-map' failed 8000 due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/library/cozy-lib/templates/_resourcepresets.tpl

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/library/cozy-lib/Chart.yaml

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/library/cozy-lib/Makefile

[error] 20-20: Makefile target 'check-version-map' failed due to missing Chart.yaml file and versions_map diff mismatch.


[error] 31-31: Makefile target 'repos' failed due to failure in 'check-version-map' target.


[error] 26-26: Makefile target 'image-cozystack' failed due to failure in 'repos' target.


[error] 26-26: Top-level make build failed with exit code 2 due to errors in sub-make targets.

Makefile

[error] 20-20: Makefile target 'check-version-map' failed due to missing Chart.yaml file and versions_map diff mismatch.


[error] 31-31: Makefile target 'repos' failed due to failure in 'check-version-map' target.


[error] 26-26: Makefile target 'image-cozystack' failed due to failure in 'repos' target.


[error] 26-26: Top-level make build failed with exit code 2 due to errors in sub-make targets.

packages/library/cozy-lib/templates/_resources.tpl

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/library/cozy-lib/.helmignore

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/library/Makefile

[error] 20-20: Makefile target 'check-version-map' failed due to missing Chart.yaml file and versions_map diff mismatch.


[error] 31-31: Makefile target 'repos' failed due to failure in 'check-version-map' target.


[error] 26-26: Makefile target 'image-cozystack' failed due to failure in 'repos' target.


[error] 26-26: Top-level make build failed with exit code 2 due to errors in sub-make targets.

packages/apps/Makefile

[error] 20-20: Makefile target 'check-version-map' failed due to missing Chart.yaml file and versions_map diff mismatch.


[error] 31-31: Makefile target 'repos' failed due to failure in 'check-version-map' target.


[error] 26-26: Makefile target 'image-cozystack' failed due to failure in 'repos' target.


[error] 26-26: Top-level make build failed with exit code 2 due to errors in sub-make targets.

🔇 Additional comments (18)
packages/library/cozy-lib/README.md (1)

1-2: Verify Chart.yaml presence in cozy-lib.
The pipeline failure indicates a missing Chart.yaml. Ensure that packages/library/cozy-lib/Chart.yaml exists and is committed so the check-version-map and packaging targets pass.

🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/apps/versions_map (1)

12-12: Approve clickhouse version bump to 0.9.0.
The mapping clickhouse 0.9.0 HEAD aligns with the updated Helm chart version in packages/apps/clickhouse/Chart.yaml. No further action required.

packages/library/cozy-lib/values.yaml (1)

1-1: Empty values.yaml is intentional.
An empty object in values.yaml fits the minimal configuration schema for this library chart. Ensure any future default values are declared in values.schema.json and documented in the README.

🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/library/versions_map (1)

1-1:

✅ Verification successful

Ensure versions_map matches Chart.yaml version.
The entry cozy-lib 0.1.0 HEAD must match the version: field in packages/library/cozy-lib/Chart.yaml. Verify that Chart.yaml declares version: 0.1.0 so the check-version-map Makefile target succeeds.

Run:


🏁 Script executed:

#!/bin/bash
# Verify Chart.yaml version matches versions_map
grep '^version:' packages/library/cozy-lib/Chart.yaml

Length of output: 70


versions_map and Chart.yaml versions are in sync

The entry cozy-lib 0.1.0 HEAD matches the version: 0.1.0 in packages/library/cozy-lib/Chart.yaml, so the check-version-map Makefile target will succeed.

🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 1-2: Makefile check-version-map failed due to unexpected diff in versions_map file.

packages/library/cozy-lib/values.schema.json (2)

1-5: Initialize empty schema for library chart
Defining an empty properties object is acceptable for bootstrapping the chart’s schema. You can populate this schema with the top-level keys (e.g., resources.cpu, resources.memory) once the sanitization and preset templates expose parameters.

🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.


1-5:

✅ Verification successful

Validate presence of Chart.yaml for the library
The documentation‐generation and version‐mapping targets rely on a Chart.yaml in this directory. Please ensure packages/library/cozy-lib/Chart.yaml exists, or packaging and CI will fail. You can verify with:


🏁 Script executed:

#!/bin/bash
# Verify Chart.yaml exists for cozy-lib
if [ ! -f "packages/library/cozy-lib/Chart.yaml" ]; then
  echo "ERROR: packages/library/cozy-lib/Chart.yaml is missing." >&2
  exit 1
fi

Length of output: 53


Chart.yaml presence verified
Verified that packages/library/cozy-lib/Chart.yaml exists and CI/packaging targets will succeed. No further action required.

🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/apps/clickhouse/Chart.yaml (2)

19-20: Ensure version bump consistency with versions_map
You’ve updated the chart version to 0.9.0. Confirm that this change is mirrored in packages/apps/versions_map (and any other version‐mapping files) so that make check-version-map passes.


27-30: Declare new library dependency
Adding cozy-lib as a library dependency is correct. Verify that the chart repository URL is accessible and that the library is published at 0.1.0.

packages/library/cozy-lib/Makefile (1)

1-2: Include shared build logic
Pulling in common-envs.mk and package.mk is appropriate for standardizing package workflows.

packages/library/cozy-lib/.helmignore (1)

1-24: .helmignore is comprehensive
The ignore patterns cover common VCS artifacts, backups, and IDE files, which is exactly what we need to keep the chart packages clean.

🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/library/cozy-lib/templates/_resourcepresets.tpl (2)

1-49: Resource presets implementation looks good!

This new template provides a well-structured set of predefined resource configurations ranging from "nano" to "2xlarge". The implementation is consistent with the PR objectives - CPU is defined only in requests but not in limits, which aligns with the goal of setting limits equal to requests except for CPU.

The error handling for invalid presets is robust, and the documentation clearly indicates these presets are intended for basic testing rather than production use.

🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.


1-49:

❌ Incorrect review comment

Pipeline failure needs to be addressed

The pipeline is failing with an error related to the 'check-version-map' target due to a missing Chart.yaml file. This needs to be resolved before merging.


🏁 Script executed:

#!/bin/bash
# Check if the Chart.yaml file exists in the expected location for the version map
cd packages/library
echo "Current directory: $(pwd)"
find . -name "versions_map" -type f -exec cat {} \;
echo "Checking for Chart.yaml files in library subdirectories:"
find . -name "Chart.yaml" -type f

Length of output: 401


Chart.yaml found — check pipeline configuration

The Chart.yaml file is present at packages/library/cozy-lib/Chart.yaml. The failure in the check-version-map target reflects a path/configuration mismatch, not a missing file. Please update the version-map logic or pipeline settings to point to the correct location.

• Chart.yaml location: packages/library/cozy-lib/Chart.yaml

Likely an incorrect or invalid review comment.

🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/library/cozy-lib/Chart.yaml (1)

1-18: Chart definition is correctly configured as a library chart

The Chart.yaml file properly defines a Helm library chart with appropriate metadata. Using a library chart for shared templates is a good architectural decision that promotes code reuse.

🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.

packages/apps/clickhouse/templates/clickhouse.yaml (2)

125-125: Resource sanitization integration looks good

The use of the new cozy-lib.resources.sanitize template is properly integrated here for handling resources when explicitly defined.


127-127: Resource presets integration looks good

The use of the new cozy-lib.resources.preset template for handling resource presets simplifies the template and standardizes resource handling across the codebase.

packages/library/cozy-lib/templates/_resources.tpl (2)

1-53: Resource sanitization implementation is well-designed

The cozy-lib.resources.sanitize template is well-implemented with comprehensive documentation and examples. The logic properly:

  1. Consolidates inputs from limits, requests, and top-level entries
  2. Implements the intended handling where CPU has only requests (no limits)
  3. Ensures all other resources have identical values for requests and limits

This implementation aligns perfectly with the PR objectives of maintaining backward compatibility while simplifying resource configuration.

🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 1-1: Makefile target 'check-version-map' failed due to missing Chart.yaml file, causing 'repos' and 'image-cozystack' targets to fail with exit code 2.


30-44: Verify precedence order for resource specifications

The current implementation gives precedence to top-level entries over both requests and limits entries. According to the PR objectives, the precedence should be: top-level, then requests, then limits. However, the current implementation might not follow this order exactly as it merges limits first (lines 30-34), then requests (lines 35-39), and finally top-level entries (lines 40-44).

The final result may be correct because top-level entries overwrite earlier entries, but it would be clearer to process the maps in reverse precedence order: limits, then requests, then top-level.

packages/library/Makefile (1)

16-20: Confirm version map diff path.
The check-version-map target runs git diff --exit-code -- versions_map from within packages/library, which matches packages/library/versions_map. Ensure your gen_versions_map.sh writes there and that you haven’t relocated or renamed the file.

🧰 Tools
🪛 GitHub Actions: Pull Request

[error] 20-20: Makefile target 'check-version-map' failed due to missing Chart.yaml file and versions_map diff mismatch.

@lllamnyp lllamnyp self-assigned this May 23, 2025
@lllamnyp lllamnyp force-pushed the fix/no-user-facing-limits branch from c19f470 to 4d25250 Compare May 23, 2025 10:16
Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
hack/package_chart.sh (2)

15-21: Make working-directory check more flexible
The script currently insists on running from ./packages by testing basename $PWD, which can break in CI or when invoked via absolute paths. Consider computing the script’s own directory (e.g., SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)") and resolving paths relative to that. This decouples the script from the user’s cwd.


23-30: Use numeric comparison and fix echo usage
Shell built-ins support arithmetic tests; it’s clearer to write if [ "$#" -ne 3 ] && [ "$#" -ne 4 ]. Also avoid mixing strings and arrays in a single echo call (SC2145). For example:

-if [ "x$#" != "x3" ] && [ "x$#" != "x4" ]
+if [ "$#" -ne 3 ] && [ "$#" -ne 4 ]
...
-   echo "Got $#: $@" >&2
+   echo "Got $#:" "$@" >&2
🧰 Tools
🪛 Shellcheck (0.10.0)

[error] 26-26: Argument mixes string and array. Use * or separate argument.

(SC2145)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c19f470 and 4d25250.

📒 Files selected for processing (18)
  • Makefile (1 hunks)
  • hack/package_chart.sh (1 hunks)
  • packages/apps/Makefile (1 hunks)
  • packages/apps/clickhouse/Chart.yaml (1 hunks)
  • packages/apps/clickhouse/charts/cozy-lib (1 hunks)
  • packages/apps/clickhouse/templates/clickhouse.yaml (1 hunks)
  • packages/apps/versions_map (1 hunks)
  • packages/extra/Makefile (1 hunks)
  • packages/library/Makefile (1 hunks)
  • packages/library/cozy-lib/.helmignore (1 hunks)
  • packages/library/cozy-lib/Chart.yaml (1 hunks)
  • packages/library/cozy-lib/Makefile (1 hunks)
  • packages/library/cozy-lib/README.md (1 hunks)
  • packages/library/cozy-lib/templates/_resourcepresets.tpl (1 hunks)
  • packages/library/cozy-lib/templates/_resources.tpl (1 hunks)
  • packages/library/cozy-lib/values.schema.json (1 hunks)
  • packages/library/cozy-lib/values.yaml (1 hunks)
  • packages/library/versions_map (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (16)
  • packages/apps/versions_map
  • packages/apps/clickhouse/charts/cozy-lib
  • packages/library/cozy-lib/README.md
  • packages/library/cozy-lib/values.schema.json
  • packages/library/versions_map
  • packages/apps/clickhouse/Chart.yaml
  • Makefile
  • packages/library/cozy-lib/templates/_resourcepresets.tpl
  • packages/library/cozy-lib/.helmignore
  • packages/library/cozy-lib/Makefile
  • packages/library/cozy-lib/Chart.yaml
  • packages/apps/clickhouse/templates/clickhouse.yaml
  • packages/library/cozy-lib/templates/_resources.tpl
  • packages/apps/Makefile
  • packages/library/Makefile
  • packages/library/cozy-lib/values.yaml
🧰 Additional context used
🪛 GitHub Actions: Pull Request
packages/extra/Makefile

[error] 20-20: Target 'check-version-map' failed with error


[error] 32-32: Target 'repos' failed due to failure in sub-make in packages/library


[error] 26-26: Target 'image-cozystack' failed due to failure in sub-make in packages/core/installer


[error] 27-27: Top-level 'build' target failed due to failure in sub-make in packages/core/installer

🪛 Shellcheck (0.10.0)
hack/package_chart.sh

[error] 26-26: Argument mixes string and array. Use * or separate argument.

(SC2145)


[warning] 43-43: version appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 51-51: Use "${var:?}" to ensure this never expands to / .

(SC2115)


[warning] 54-54: Use "${var:?}" to ensure this never expands to / .

(SC2115)

🔇 Additional comments (1)
packages/extra/Makefile (1)

1-2: Output and temp-dir setup is consistent
Using a repo-specific OUT=../_out/repos/extra and creating a fresh temp directory with mktemp -d aligns with the pattern in other packages, ensuring isolation and no leftover artifacts.

@lllamnyp lllamnyp force-pushed the fix/no-user-facing-limits branch from 4d25250 to 10afea1 Compare May 23, 2025 10:44
Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (5)
hack/package_chart.sh (5)

1-3: Consider stricter shell settings and portable interpreter.

To catch unset variables and pipeline failures, add set -u and set -o pipefail. For better portability, use #!/usr/bin/env sh (or bash if you rely on bash features).

Possible diff:

-#!/bin/sh
-set -e
+#!/usr/bin/env sh
+set -euo pipefail

5-13: Simplify and maintain the usage message.

The series of printf calls can be replaced with a here-document for readability:

-usage() {
-    printf "%s\n" "Usage:" >&2 ;
-    printf -- "%s\n" '---' >&2 ;
-    printf "%s %s\n" "$0" "INPUT_DIR OUTPUT_DIR TMP_DIR [DEPENDENCY_DIR]" >&2 ;
-    printf -- "%s\n" '---' >&2 ;
-    printf "%s\n" "Takes a helm repository from INPUT_DIR, with an optional library repository in" >&2 ;
-    printf "%s\n" "DEPENDENCY_DIR, prepares a view of the git archive at select points in history" >&2 ;
-    printf "%s\n" "in TMP_DIR and packages helm charts, outputting the tarballs to OUTPUT_DIR" >&2 ;
-}
+usage() {
+    cat << EOF >&2
+Usage:
+---
+$0 INPUT_DIR OUTPUT_DIR TMP_DIR [DEPENDENCY_DIR]
+---
+Takes a helm repository from INPUT_DIR, with an optional library repository in DEPENDENCY_DIR,
+prepares a view of the git archive at select points in history in TMP_DIR,
+and packages helm charts, outputting the tarballs to OUTPUT_DIR.
+EOF
+}

15-21: Quote $PWD in the directory check.

The current check may break if the directory name contains spaces or glob chars. Change to:

-if [ "x$(basename $PWD)" != "xpackages" ]
+if [ "x$(basename "$PWD")" != "xpackages" ]

32-39: Validate input and optional dependency directories.

Before proceeding, verify that INPUT_DIR (and if provided, DEPENDENCY_DIR) exist and contain the expected versions_map. This will surface missing or misnamed directories early.


50-50: Check extracted chart path before packaging.

Ensure the directory exists and is not empty before calling helm package, to provide a clearer error message if extraction failed:

if [ ! -d "${tmp_dir}/${input_dir}/${package}" ] || [ -z "$(ls -A "${tmp_dir}/${input_dir}/${package}")" ]; then
    echo "Error: Chart directory '${tmp_dir}/${input_dir}/${package}' is missing or empty" >&2
    exit 1
fi
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d25250 and 10afea1.

📒 Files selected for processing (18)
  • Makefile (1 hunks)
  • hack/package_chart.sh (1 hunks)
  • packages/apps/Makefile (1 hunks)
  • packages/apps/clickhouse/Chart.yaml (1 hunks)
  • packages/apps/clickhouse/charts/cozy-lib (1 hunks)
  • packages/apps/clickhouse/templates/clickhouse.yaml (1 hunks)
  • packages/apps/versions_map (1 hunks)
  • packages/extra/Makefile (1 hunks)
  • packages/library/Makefile (1 hunks)
  • packages/library/cozy-lib/.helmignore (1 hunks)
  • packages/library/cozy-lib/Chart.yaml (1 hunks)
  • packages/library/cozy-lib/Makefile (1 hunks)
  • packages/library/cozy-lib/README.md (1 hunks)
  • packages/library/cozy-lib/templates/_resourcepresets.tpl (1 hunks)
  • packages/library/cozy-lib/templates/_resources.tpl (1 hunks)
  • packages/library/cozy-lib/values.schema.json (1 hunks)
  • packages/library/cozy-lib/values.yaml (1 hunks)
  • packages/library/versions_map (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (17)
  • packages/library/cozy-lib/values.yaml
  • packages/library/cozy-lib/README.md
  • packages/apps/clickhouse/charts/cozy-lib
  • packages/apps/versions_map
  • packages/library/versions_map
  • packages/library/cozy-lib/values.schema.json
  • packages/apps/clickhouse/Chart.yaml
  • Makefile
  • packages/library/cozy-lib/Chart.yaml
  • packages/library/cozy-lib/templates/_resources.tpl
  • packages/apps/Makefile
  • packages/library/cozy-lib/.helmignore
  • packages/extra/Makefile
  • packages/apps/clickhouse/templates/clickhouse.yaml
  • packages/library/cozy-lib/templates/_resourcepresets.tpl
  • packages/library/cozy-lib/Makefile
  • packages/library/Makefile
🧰 Additional context used
🪛 Shellcheck (0.10.0)
hack/package_chart.sh

[error] 26-26: Argument mixes string and array. Use * or separate argument.

(SC2145)

🔇 Additional comments (2)
hack/package_chart.sh (2)

51-55: Cleanup uses safe parameter expansion.

Great use of ${var:?} to prevent unintended deletions. This guarantees neither tmp_dir, input_dir, package, nor dependency_dir are empty when cleaning up.


56-57: Confirm versions_map source file is quoted.

The redirection done < "${input_dir}/versions_map" is correctly quoted, preventing word-splitting. No changes needed here.

@lllamnyp lllamnyp force-pushed the fix/no-user-facing-limits branch 4 times, most recently from abf9652 to 1474bea Compare May 23, 2025 11:46
Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 10afea1 and 1474bea.

📒 Files selected for processing (19)
  • Makefile (1 hunks)
  • hack/gen_versions_map.sh (1 hunks)
  • hack/package_chart.sh (1 hunks)
  • packages/apps/Makefile (1 hunks)
  • packages/apps/clickhouse/Chart.yaml (1 hunks)
  • packages/apps/clickhouse/charts/cozy-lib (1 hunks)
  • packages/apps/clickhouse/templates/clickhouse.yaml (1 hunks)
  • packages/apps/versions_map (1 hunks)
  • packages/extra/Makefile (1 hunks)
  • packages/library/Makefile (1 hunks)
  • packages/library/cozy-lib/.helmignore (1 hunks)
  • packages/library/cozy-lib/Chart.yaml (1 hunks)
  • packages/library/cozy-lib/Makefile (1 hunks)
  • packages/library/cozy-lib/README.md (1 hunks)
  • packages/library/cozy-lib/templates/_resourcepresets.tpl (1 hunks)
  • packages/library/cozy-lib/templates/_resources.tpl (1 hunks)
  • packages/library/cozy-lib/values.schema.json (1 hunks)
  • packages/library/cozy-lib/values.yaml (1 hunks)
  • packages/library/versions_map (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/library/cozy-lib/Chart.yaml
🚧 Files skipped from review as they are similar to previous changes (17)
  • packages/apps/versions_map
  • packages/apps/clickhouse/charts/cozy-lib
  • packages/library/cozy-lib/values.yaml
  • packages/library/cozy-lib/README.md
  • packages/library/cozy-lib/values.schema.json
  • packages/library/versions_map
  • packages/library/cozy-lib/templates/_resourcepresets.tpl
  • packages/apps/clickhouse/Chart.yaml
  • packages/apps/clickhouse/templates/clickhouse.yaml
  • packages/extra/Makefile
  • packages/library/cozy-lib/.helmignore
  • packages/library/cozy-lib/Makefile
  • packages/library/cozy-lib/templates/_resources.tpl
  • packages/library/Makefile
  • packages/apps/Makefile
  • hack/package_chart.sh
  • Makefile
🧰 Additional context used
🪛 Shellcheck (0.10.0)
hack/gen_versions_map.sh

[warning] 19-19: In POSIX sh, echo flags are undefined.

(SC3037)

@lllamnyp lllamnyp force-pushed the fix/no-user-facing-limits branch from 1474bea to 860d18c Compare May 23, 2025 12:44
Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
hack/gen_versions_map.sh (1)

19-21: Use printf for POSIX compliance and quote the temp file path
Replace echo -n (undefined in pure POSIX sh) with printf '%s' to reliably suppress the newline, and quote the temp‐file variable in the redirection to safely handle paths with spaces.

-miss_map=$(mktemp)
-trap 'rm -f "$miss_map"' EXIT
-echo -n "$new_map" | awk 'NR==FNR { nm[$1 " " $2] = $3; next } { if (!($1 " " $2 in nm)) print $1, $2, $3}' - "$file" > $miss_map
+miss_map=$(mktemp)
+trap 'rm -f "$miss_map"' EXIT
+printf '%s' "$new_map" | awk 'NR==FNR { nm[$1 " " $2] = $3; next } { if (!($1 " " $2 in nm)) print $1, $2, $3}' - "$file" > "$miss_map"
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 21-21: In POSIX sh, echo flags are undefined.

(SC3037)

🧹 Nitpick comments (1)
hack/gen_versions_map.sh (1)

27-61: Quote the temp file in the while‐loop redirection
The input redirection done < $miss_map should be quoted to prevent word splitting if the temp‐file path contains whitespace.

-  done < $miss_map
+  done < "$miss_map"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1474bea and 860d18c.

📒 Files selected for processing (19)
  • Makefile (1 hunks)
  • hack/gen_versions_map.sh (2 hunks)
  • hack/package_chart.sh (1 hunks)
  • packages/apps/Makefile (1 hunks)
  • packages/apps/clickhouse/Chart.yaml (1 hunks)
  • packages/apps/clickhouse/charts/cozy-lib (1 hunks)
  • packages/apps/clickhouse/templates/clickhouse.yaml (1 hunks)
  • packages/apps/versions_map (1 hunks)
  • packages/extra/Makefile (1 hunks)
  • packages/library/Makefile (1 hunks)
  • packages/library/cozy-lib/.helmignore (1 hunks)
  • packages/library/cozy-lib/Chart.yaml (1 hunks)
  • packages/library/cozy-lib/Makefile (1 hunks)
  • packages/library/cozy-lib/README.md (1 hunks)
  • packages/library/cozy-lib/templates/_resourcepresets.tpl (1 hunks)
  • packages/library/cozy-lib/templates/_resources.tpl (1 hunks)
  • packages/library/cozy-lib/values.schema.json (1 hunks)
  • packages/library/cozy-lib/values.yaml (1 hunks)
  • packages/library/versions_map (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/library/cozy-lib/Chart.yaml
🚧 Files skipped from review as they are similar to previous changes (17)
  • packages/library/cozy-lib/README.md
  • packages/apps/clickhouse/charts/cozy-lib
  • packages/apps/versions_map
  • packages/library/cozy-lib/values.yaml
  • packages/library/versions_map
  • packages/library/cozy-lib/values.schema.json
  • packages/library/cozy-lib/Makefile
  • Makefile
  • packages/library/cozy-lib/templates/_resourcepresets.tpl
  • packages/extra/Makefile
  • packages/library/cozy-lib/.helmignore
  • packages/apps/clickhouse/templates/clickhouse.yaml
  • packages/apps/clickhouse/Chart.yaml
  • packages/library/cozy-lib/templates/_resources.tpl
  • hack/package_chart.sh
  • packages/apps/Makefile
  • packages/library/Makefile
🧰 Additional context used
🪛 Shellcheck (0.10.0)
hack/gen_versions_map.sh

[warning] 21-21: In POSIX sh, echo flags are undefined.

(SC3037)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build and Test

@lllamnyp lllamnyp force-pushed the fix/no-user-facing-limits branch from 860d18c to 6f702b5 Compare May 23, 2025 13:06
Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (5)
hack/gen_versions_map.sh (1)

61-61: Quote the temp file in input redirection
Avoid unquoted variable expansions in input redirection to prevent word splitting or globbing:

-done < $miss_map
+done < "$miss_map"
hack/package_chart.sh (4)

1-3: Enable strict mode for unset variables
Consider treating unset variables as errors by adding -u alongside -e:

-set -e
+set -eu

15-21: Quote basename $PWD and simplify working-directory check
To handle spaces robustly and improve readability, quote the argument to basename and compare directly:

-if [ "x$(basename $PWD)" != "xpackages" ]
+if [ "$(basename "$PWD")" != "packages" ]

23-30: Use numeric comparison for argument count
Using arithmetic operators (-ne) clarifies intent and is more idiomatic:

-if [ "x$#" != "x3" ] && [ "x$#" != "x4" ]
+if [ "$#" -ne 3 ] && [ "$#" -ne 4 ]

25-27: Avoid mixing string and array in echo
ShellCheck SC2145 flags mixing a format string with $@. You can consolidate or use $*:

-echo "Got $# arguments:" "$@" >&2
+echo "Got $# arguments: $*" >&2
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 860d18c and 6f702b5.

📒 Files selected for processing (19)
  • Makefile (1 hunks)
  • hack/gen_versions_map.sh (2 hunks)
  • hack/package_chart.sh (1 hunks)
  • packages/apps/Makefile (1 hunks)
  • packages/apps/clickhouse/Chart.yaml (1 hunks)
  • packages/apps/clickhouse/charts/cozy-lib (1 hunks)
  • packages/apps/clickhouse/templates/clickhouse.yaml (1 hunks)
  • packages/apps/versions_map (1 hunks)
  • packages/extra/Makefile (1 hunks)
  • packages/library/Makefile (1 hunks)
  • packages/library/cozy-lib/.helmignore (1 hunks)
  • packages/library/cozy-lib/Chart.yaml (1 hunks)
  • packages/library/cozy-lib/Makefile (1 hunks)
  • packages/library/cozy-lib/README.md (1 hunks)
  • packages/library/cozy-lib/templates/_resourcepresets.tpl (1 hunks)
  • packages/library/cozy-lib/templates/_resources.tpl (1 hunks)
  • packages/library/cozy-lib/values.schema.json (1 hunks)
  • packages/library/cozy-lib/values.yaml (1 hunks)
  • packages/library/versions_map (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • packages/library/cozy-lib/Chart.yaml
  • packages/library/cozy-lib/templates/_resources.tpl
🚧 Files skipped from review as they are similar to previous changes (15)
  • packages/library/cozy-lib/values.yaml
  • packages/library/versions_map
  • packages/library/cozy-lib/README.md
  • packages/apps/versions_map
  • packages/apps/clickhouse/charts/cozy-lib
  • packages/library/cozy-lib/values.schema.json
  • packages/apps/clickhouse/Chart.yaml
  • packages/extra/Makefile
  • packages/library/cozy-lib/Makefile
  • packages/apps/clickhouse/templates/clickhouse.yaml
  • packages/library/cozy-lib/templates/_resourcepresets.tpl
  • packages/library/cozy-lib/.helmignore
  • Makefile
  • packages/library/Makefile
  • packages/apps/Makefile
🧰 Additional context used
🧠 Learnings (1)
hack/package_chart.sh (1)
Learnt from: lllamnyp
PR: cozystack/cozystack#935
File: hack/package_chart.sh:43-49
Timestamp: 2025-05-23T10:57:31.683Z
Learning: When using the `read` command with multiple variables in shell scripts, setting `IFS=` (empty) will cause the entire line to be read into the first variable. To prevent backslash interpretation while maintaining normal field splitting, use `read -r` without changing IFS.
🪛 Shellcheck (0.10.0)
hack/gen_versions_map.sh

[warning] 21-21: In POSIX sh, echo flags are undefined.

(SC3037)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build and Test
🔇 Additional comments (1)
hack/package_chart.sh (1)

45-57: Packaging loop logic looks solid
The loop correctly handles optional dependencies, safely archives charts at specific commits, uses parameter expansion guards for rm -rf, and produces the Helm repo index. Nicely done.

This patch introduces reusable library charts that provide
backward-compatibility for users that specify their resources as
explicit requests and limits for cpu, however this input is processed so
that limits are set equal to requests except for CPU which only gets
requests. Users can now embrace the new form by directly specifying
resources in the first level of nesting (e.g. resources.cpu=100m instead
of .resources.requests.cpu=100m). The order of precedence is top-level,
then requests, then limits, ensuring that nothing will break in terms of
scheduling, however workloads that specified limits much higher than
requests might get a performance hit, now that they cannot use all this
excess capacity. This should only affect memory-hungry workloads in
low-contention environments.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
@lllamnyp lllamnyp force-pushed the fix/no-user-facing-limits branch from 6f702b5 to 9592f7f Compare May 23, 2025 14:33
Copy link
Member
@kvaps kvaps left a comment

Choose a reason for hiding this comment

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

LGTM

@lllamnyp lllamnyp merged commit a8ba6b1 into main May 23, 2025
6 of 7 checks passed
@lllamnyp lllamnyp deleted the fix/no-user-facing-limits branch May 23, 2025 15:11
kvaps added a commit that referenced this pull request Jun 10, 2025 10057
This PR includes fixes and updates for cozystack dashboard:

### [fix client rate
limiter](cozystack/kubeapps@b1467ce)

fixes the error `client rate limiter Wait returned an error: context
canceled`
The QPS and Burst options were set after the kubernetes client
initalized and had no effect

The limits are also increased fivefold:

```diff
-         - --kube-api-qps=50.0
-         - --kube-api-burst=100
+         - --kube-api-qps=250.0
+         - --kube-api-burst=500
```


### [fix relative
urls](cozystack/kubeapps@e2153e2)

Fixes regression introduced in
#935 which suddenly removed
previus workaround #102

Now the proper fix prepared.

Related to upstream issue
vmware-tanzu/kubeapps#7740

### [remove version
selector](cozystack/kubeapps@f412a6a)

from both package insallation page and upgrading page
<img width="505" alt="Screenshot 2025-06-10 at 1 47 10"
src="https://github.com/user-attachments/assets/36068264-2878-4b82-a159-6c911f1c1eef"
/>

now it always will default to the latest package version

### [always fetch details from the latest
version](cozystack/kubeapps@741a7dd)

If old package version installed it will display information from the
latest package in repository. This and previus fix actually remove the
need for having versions_map logic and pack multiple charts for the
release. But informs user about newer versions and allows to perform
upgrade on demand in specific time:

<img width="423" alt="Screenshot 2025-06-10 at 1 52 53"
src="https://github.com/user-attachments/assets/dd571c9f-c2bc-403f-9aa0-3d8853600241"
/>

### [Remove plugin name from
header]cozystack/kubeapps@ffc0b02

We always use flux though

<img width="386" alt="Screenshot 2025-06-10 at 1 55 39"
src="https://github.com/user-attachments/assets/df6f52b5-82ab-4e7a-a973-2a82eb38ebfb"
/>

### [Fix switching context from app
view](cozystack/kubeapps@d89e721)

Fixes the error message while swtiching tenant from the application view

```
An error occurred while fetching the application: Unable to get installed package.
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added new configuration options for API request rate limits in the
dashboard settings.

- **Style**
- Updated dashboard appearance to hide version information and specific
label elements.

- **Chores**
- Updated internal references to the latest version of the dashboard
source code.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
kvaps added a commit that referenced this pull request Jun 16, 2025
This PR includes fixes and updates for cozystack dashboard:

### [fix client rate
limiter](cozystack/kubeapps@b1467ce)

fixes the error `client rate limiter Wait returned an error: context
canceled`
The QPS and Burst options were set after the kubernetes client
initalized and had no effect

The limits are also increased fivefold:

```diff
-         - --kube-api-qps=50.0
-         - --kube-api-burst=100
+         - --kube-api-qps=250.0
+         - --kube-api-burst=500
```


### [fix relative
urls](cozystack/kubeapps@e2153e2)

Fixes regression introduced in
#935 which suddenly removed
previus workaround #102

Now the proper fix prepared.

Related to upstream issue
vmware-tanzu/kubeapps#7740

### [remove version
selector](cozystack/kubeapps@f412a6a)

from both package insallation page and upgrading page
<img width="505" alt="Screenshot 2025-06-10 at 1 47 10"
src="https://github.com/user-attachments/assets/36068264-2878-4b82-a159-6c911f1c1eef"
/>

now it always will default to the latest package version

### [always fetch details from the latest
version](cozystack/kubeapps@741a7dd)

If old package version installed it will display information from the
latest package in repository. This and previus fix actually remove the
need for having versions_map logic and pack multiple charts for the
release. But informs user about newer versions and allows to perform
upgrade on demand in specific time:

<img width="423" alt="Screenshot 2025-06-10 at 1 52 53"
src="https://github.com/user-attachments/assets/dd571c9f-c2bc-403f-9aa0-3d8853600241"
/>

### [Remove plugin name from
header]cozystack/kubeapps@ffc0b02

We always use flux though

<img width="386" alt="Screenshot 2025-06-10 at 1 55 39"
src="https://github.com/user-attachments/assets/df6f52b5-82ab-4e7a-a973-2a82eb38ebfb"
/>

### [Fix switching context from app
view](cozystack/kubeapps@d89e721)

Fixes the error message while swtiching tenant from the application view

```
An error occurred while fetching the application: Unable to get installed package.
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added new configuration options for API request rate limits in the
dashboard settings.

- **Style**
- Updated dashboard appearance to hide version information and specific
label elements.

- **Chores**
- Updated internal references to the latest version of the dashboard
source code.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

2 participants
0