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(ci): run benchmarks for each storage in separate workers #1536

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

mdelapenya
Copy link
Contributor

@mdelapenya mdelapenya commented Dec 28, 2024

What does this PR do?

It adds an initial job in the benchmark workflow in order to identify which modules where modified for a given build.

To detect the changes, we have created a shell script, ./github/scripts/changed-modules.sh. This script receives one single env var as input parameter, ALL_CHANGED_FILES, which on CI will be provided by a Github action, https://github.com/tj-actions/changed-files, that puts in there a list of the modified files, comparing the current PR changeset with the parent branch (main). We can tune this up to always check the latest main branch (open to discussion here).

The script will compare all existing modules (looking up all the go.mod files of interest, no test files) with the modified files, building an array of modified modules. At the moment there is a modified file in the .github directory, all the modules will be included in the build.

Finally, for running the benchmarks, we are adding a matrix for running them for the modified storage module, with the following rules:

  • all modules will run the benchmarks on ubuntu-latest.
  • services that are needed by a module will be started conditionally on the CI (e.g. redis, etcd)
  • the output file will prepend the module name, so that the final save-benchmark step can compare against that module, alone.

UPDATE: I've added the minio module to S3, so that the benchmarks for S3 work again.

Why is this important?

Separate concerns and better troubleshoot of issues with benchmarks: at the moment, all benchmarks are executed in serie, which 1) slows down the build, 2) could cause a PR to fail if one benchmark for another module failed.

With these changes we try to improve the contribution experience when working on one module.

Summary by CodeRabbit

  • New Features

    • Added a script to determine modules that need to be built based on modified files.
    • Enhanced S3 storage test setup with configurable MinIO image and credentials.
  • Chores

    • Improved test environment configuration for S3 storage testing.

Copy link
Contributor

coderabbitai bot commented Dec 28, 2024

Warning

Rate limit exceeded

@mdelapenya has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 20 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6ec8bcd and 3947000.

📒 Files selected for processing (1)
  • .github/scripts/changed-modules.sh (1 hunks)

Walkthrough

This pull request introduces a new Bash script changed-modules.sh in the .github/scripts/ directory to dynamically determine which repository modules need to be built based on modified files. Simultaneously, the s3/init_test.go file is updated to enhance the MinIO test setup, providing more flexibility in configuring test environments by allowing dynamic image selection and improved connection parameter management.

Changes

File Change Summary
.github/scripts/changed-modules.sh New script to identify modules that require building based on modified files in a CI environment.
s3/init_test.go Enhanced MinIO test configuration with dynamic image selection and improved credential management. Constants for MinIO image and credentials added.

Sequence Diagram

sequenceDiagram
    participant CI as CI Environment
    participant Script as changed-modules.sh
    participant Modules as Repository Modules

    CI->>Script: Trigger with modified files
    Script->>Script: Analyze changed files
    Script->>Modules: Determine modules to build
    Script-->>CI: Return list of modules
Loading

Possibly related PRs

  • /storage#1506: Introduces Testcontainers for Clickhouse, showing a similar approach to improving testing infrastructure and module management.

Poem

🐰 In the realm of code, a script takes flight,
Tracking modules with algorithmic might.
MinIO dances, tests now bright and clear,
Modules build, no complexity to fear!
A rabbit's tale of automation's glee 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 for this PR. (Beta)
  • @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 or @coderabbitai title 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 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 for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ReneWerner87
Copy link
Member

thank you, i also had such an idea for a short time, but then lost sight of it again

@mdelapenya
Copy link
Contributor Author

I faced troubles while contributing the testcontainers support in the other PR, and detected that the benchmark was failing for other reasons.

I'm not sure the implications of the changes with the benchmarks website, so please feel free to take over and change what you need

@mdelapenya mdelapenya marked this pull request as ready for review January 2, 2025 08:02
@mdelapenya mdelapenya requested a review from a team as a code owner January 2, 2025 08:02
@mdelapenya mdelapenya requested review from gaby, sixcolors, ReneWerner87 and efectn and removed request for a team January 2, 2025 08:02
@mdelapenya
Copy link
Contributor Author

Marked it as ready to review, as the only failure now is caused by a panic in the MySQL module.

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

🧹 Nitpick comments (8)
s3/init_test.go (2)

32-33: Context handling
You have set up a Background() context for container orchestration. Consider if you need a WithTimeout context to avoid potential indefinite waits in case of container runtime failures.


43-47: Error handling
Panicking on container connection errors is acceptable for test code, but you may want to provide additional logging or use t.Fatal for clarity.

.github/scripts/changed-modules.sh (6)

17-17: Shellcheck SC2155
It's generally recommended to declare and assign variables in separate steps to avoid potential masking of return values in Bash.

Here’s an example adjustment:

- readonly ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
+ cd "$(dirname "${BASH_SOURCE[0]}")/../.." || exit 1
+ readonly ROOT_DIR="$(pwd)"
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 17-17: Declare and assign separately to avoid masking return values.

(SC2155)


27-27: Shellcheck SC2053
Quote the string when comparing with == to avoid unintended pattern matching.

- if [[ $1 == $excluded_module ]]; then
+ if [[ "$1" == "$excluded_module" ]]; then
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 27-27: Quote the right-hand side of == in [[ ]] to prevent glob matching.

(SC2053)


36-36: Shellcheck SC2044
Using for with find output can be fragile. Consider a while-based approach or -exec.

-for modFile in $(find "${ROOT_DIR}" -name "go.mod" ...); do
+find "${ROOT_DIR}" -name "go.mod" ... | while read -r modFile; do
     ...
 done
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 36-36: For loops over find output are fragile. Use find -exec or a while read loop.

(SC2044)


45-45: Shellcheck SC2207
When sorting an array in Bash, mapfile or read loops are safer than splitting on IFS.

- IFS=$'\n' modules=($(sort <<<"${modules[*]}"))
+ mapfile -t modules < <(printf '%s\n' "${modules[@]}" | sort)

Also applies to: 52-52

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 45-45: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


72-72: Regex-based array checks
Using =~ on quoted strings in Bash can result in literal matches. Consider unquoting the pattern or checking membership with a loop.

🧰 Tools
🪛 Shellcheck (0.10.0)

[error] 72-72: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).

(SC2199)


[warning] 72-72: Remove quotes from right-hand side of =~ to match as a regex rather than literally.

(SC2076)


84-84: Output formatting
The surrounding quotes in echo "["$(IFS=,; echo "${modified_modules[*]}" | sed 's/ /,/g')"]" may inadvertently remove spacing. You might want to fully quote the entire echo command.

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 84-84: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 84-84: Quote this to prevent word splitting.

(SC2046)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a0d6e6d and 472d68a.

⛔ Files ignored due to path filters (4)
  • .github/workflows/benchmark.yml is excluded by !**/*.yml
  • .github/workflows/test-s3.yml is excluded by !**/*.yml
  • s3/go.mod is excluded by !**/*.mod
  • s3/go.sum is excluded by !**/*.sum, !**/*.sum
📒 Files selected for processing (2)
  • .github/scripts/changed-modules.sh (1 hunks)
  • s3/init_test.go (2 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
.github/scripts/changed-modules.sh

[warning] 17-17: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 27-27: Quote the right-hand side of == in [[ ]] to prevent glob matching.

(SC2053)


[warning] 36-36: For loops over find output are fragile. Use find -exec or a while read loop.

(SC2044)


[warning] 45-45: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 52-52: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 57-57: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.

(SC2124)


[warning] 67-67: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 67-67: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.

(SC2124)


[error] 72-72: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).

(SC2199)


[warning] 72-72: Remove quotes from right-hand side of =~ to match as a regex rather than literally.

(SC2076)


[warning] 84-84: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 84-84: Quote this to prevent word splitting.

(SC2046)

🔇 Additional comments (7)
s3/init_test.go (6)

4-4: Use of context package: good practice for test container management
Leveraging the context package for controlling container lifecycles is a great best practice.


9-9: Dependency import
Importing testcontainers-go for spinning up MinIO containers is appropriate here and helps keep tests self-contained.


18-24: Configurable MinIO environment variables
Defining constants for MinIO credentials and enabling override via TEST_MINIO_IMAGE is a robust way to parameterize tests.


27-30: Environmental override
Smart approach to override the default MinIO image from an environment variable. This ensures flexibility across environments.


34-38: Proper container setup
The container is configured with custom credentials. This is clean and makes the test more realistic.


51-51: Dynamic credentials
Replacing hard-coded credentials with the newly defined constants is a good improvement for maintainability.

Also applies to: 54-55

.github/scripts/changed-modules.sh (1)

57-57: Shellcheck SC2124
${ALL_CHANGED_FILES[@]} can collapse arrays into strings, possibly losing data. If ALL_CHANGED_FILES is expected to be a string, consider capturing it differently.

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 57-57: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.

(SC2124)

.github/scripts/changed-modules.sh Outdated Show resolved Hide resolved
Shellcheck SC2178 / SC2124
Assigning arrays to a string variable can lead to unexpected behavior.
Shellcheck SC2207
When sorting an array in Bash, mapfile or read loops are safer than splitting on IFS.
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 (4)
.github/scripts/changed-modules.sh (4)

16-21: Improve error handling in ROOT_DIR setup

Split the declaration and assignment to properly handle potential errors in directory resolution.

-readonly ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
+declare -r ROOT_DIR
+ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd) || exit 1
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 17-17: Declare and assign separately to avoid masking return values.

(SC2155)


44-54: Improve array sorting reliability

Use mapfile for more reliable array sorting.

-IFS=$'\n' modules=($(sort <<<"${modules[*]}"))
-unset IFS
+mapfile -t modules < <(printf '%s\n' "${modules[@]}" | sort)

-IFS=$'\n' allModules=($(sort <<<"${allModules[*]}"))
-unset IFS
+mapfile -t allModules < <(printf '%s\n' "${allModules[@]}" | sort)
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 45-45: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 52-52: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


80-84: Improve output formatting reliability

The current output formatting might break with special characters.

-echo "["$(IFS=,; echo "${modified_modules[*]}" | sed 's/ /,/g')"]"
+printf '[%s]\n' "$(IFS=,; echo "${modified_modules[*]}")"
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 84-84: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 84-84: Quote this to prevent word splitting.

(SC2046)


1-84: Excellent approach to CI optimization!

The script effectively implements the PR's objective of running benchmarks for each storage in separate workers by:

  1. Intelligently detecting modified modules
  2. Supporting selective testing based on changes
  3. Enabling parallel execution of benchmarks

This will significantly improve the contribution experience by:

  • Reducing CI execution time
  • Isolating benchmark failures to specific modules
  • Preventing unrelated test failures
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 17-17: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 27-27: Quote the right-hand side of == in [[ ]] to prevent glob matching.

(SC2053)


[warning] 36-36: For loops over find output are fragile. Use find -exec or a while read loop.

(SC2044)


[warning] 45-45: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 52-52: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 57-57: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.

(SC2124)


[error] 72-72: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).

(SC2199)


[warning] 72-72: Remove quotes from right-hand side of =~ to match as a regex rather than literally.

(SC2076)


[warning] 84-84: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 84-84: Quote this to prevent word splitting.

(SC2046)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 472d68a and 3de4b9e.

📒 Files selected for processing (1)
  • .github/scripts/changed-modules.sh (1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
.github/scripts/changed-modules.sh

[warning] 17-17: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 27-27: Quote the right-hand side of == in [[ ]] to prevent glob matching.

(SC2053)


[warning] 36-36: For loops over find output are fragile. Use find -exec or a while read loop.

(SC2044)


[warning] 45-45: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 52-52: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 57-57: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.

(SC2124)


[error] 72-72: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).

(SC2199)


[warning] 72-72: Remove quotes from right-hand side of =~ to match as a regex rather than literally.

(SC2076)


[warning] 84-84: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 84-84: Quote this to prevent word splitting.

(SC2046)

🔇 Additional comments (1)
.github/scripts/changed-modules.sh (1)

1-15: Well-documented script with clear test instructions!

The documentation effectively covers different test scenarios with expected outputs, making it easier for contributors to validate changes.

.github/scripts/changed-modules.sh Outdated Show resolved Hide resolved
.github/scripts/changed-modules.sh Outdated Show resolved Hide resolved
Regex-based array checks
Using =~ on quoted strings in Bash can result in literal matches. Consider unquoting the pattern or checking membership with a loop.
Shellcheck SC2178 / SC2124
Assigning arrays to a string variable can lead to unexpected behavior.
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

🧹 Nitpick comments (2)
.github/scripts/changed-modules.sh (2)

16-18: Enhance error handling in ROOT_DIR assignment

The current implementation could mask potential failures. Consider separating the declaration and assignment:

-readonly ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
+declare -r ROOT_DIR
+ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd) || exit 1
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 17-17: Declare and assign separately to avoid masking return values.

(SC2155)


77-81: Improve output formatting robustness

The current output formatting could be improved to handle special characters and ensure proper JSON-like output.

-echo "["$(IFS=,; echo "${modified_modules[*]}" | sed 's/ /,/g')"]"
+printf '[%s]\n' "$(IFS=,; echo "${modified_modules[*]}")"
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 81-81: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 81-81: Quote this to prevent word splitting.

(SC2046)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3de4b9e and 6ec8bcd.

📒 Files selected for processing (1)
  • .github/scripts/changed-modules.sh (1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
.github/scripts/changed-modules.sh

[warning] 17-17: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 62-62: Expanding an array without an index only gives the first element.

(SC2128)


[error] 69-69: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).

(SC2199)


[warning] 81-81: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 81-81: Quote this to prevent word splitting.

(SC2046)

🔇 Additional comments (4)
.github/scripts/changed-modules.sh (4)

1-15: Well-documented script with clear examples!

The script documentation effectively covers the main use cases and provides clear examples of how to test the functionality.


34-51: Clean and efficient module discovery implementation!

The code demonstrates good practices:

  • Safe file processing with while read loop
  • Proper array handling
  • Efficient sorting using mapfile

62-75: ⚠️ Potential issue

Fix array handling and pattern matching

There are several issues in the modified files processing:

  1. The for loop doesn't properly handle filenames with spaces
  2. Array comparison is not robust
  3. Pattern matching could be improved

Apply these changes:

-for file in $modified_files; do
+for file in "${modified_files[@]}"; do
     if [[ $file == .github/* ]]; then
         modified_modules=("${allModules[@]}")
         break
     fi
 
-    module_name=$(echo $file | cut -d'/' -f1)
+    module_name=$(echo "$file" | cut -d'/' -f1)
-    if [[ ! ${modified_modules[@]} =~ ${module_name} ]]; then
+    if ! printf '%s\n' "${modified_modules[@]}" | grep -Fxq "\"$module_name\""; then
         if is_excluded "$module_name"; then
             continue
         fi
         modified_modules+=("\"$module_name\"")
     fi
 done

Likely invalid or redundant comment.

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 62-62: Expanding an array without an index only gives the first element.

(SC2128)


[error] 69-69: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).

(SC2199)


1-81: Verify CI workflow integration

Since this script is crucial for the new CI workflow that runs benchmarks in separate workers, please ensure:

  1. The CI workflow correctly sets the ALL_CHANGED_FILES environment variable
  2. The script's output is properly parsed by the matrix job configuration
  3. Error cases (no modules found, invalid paths) are handled gracefully by the CI workflow
✅ Verification successful

Let me check the content of the benchmark workflow file to verify the integration.


CI workflow integration is properly configured

The script is correctly integrated with the CI workflow:

  • The ALL_CHANGED_FILES environment variable is properly set using the tj-actions/changed-files action output
  • The script's output is correctly parsed in the matrix job configuration using fromJSON(needs.detect-modules.outputs.modules)
  • Error handling is in place through the workflow's structure:
    • The detect-modules job captures and validates the output
    • The matrix strategy uses fail-fast: false to handle failures gracefully
    • The modules count is tracked and displayed for verification
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify CI workflow configuration

# Check if the workflow file exists and contains the necessary configuration
gh api repos/{owner}/{repo}/contents/.github/workflows -q '.[].name' | grep -q "benchmark"

# Verify the workflow file contains the required environment variable
rg -l "ALL_CHANGED_FILES" .github/workflows/

Length of output: 169


Script:

#!/bin/bash
# Check the benchmark workflow configuration
cat .github/workflows/benchmark.yml

Length of output: 7899

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 17-17: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 62-62: Expanding an array without an index only gives the first element.

(SC2128)


[error] 69-69: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).

(SC2199)


[warning] 81-81: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 81-81: Quote this to prevent word splitting.

(SC2046)

@mdelapenya
Copy link
Contributor Author

I'm seen instability in how the different technologies run the benchmarks. I'm pretty sure the test code is not waiting for the service to be running, something to be easily fixed once there is a testcontainers with a proper wait-strategy backing the service.

Other than that, I think this is ready for review, as I addressed the majority of the suggestions from coderrabit (great tool!). I intentionally not addressed some of them, as they caused the script to not work as intended.

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