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

CI #3890

Merged
merged 7 commits into from
Dec 24, 2024
Merged

CI #3890

merged 7 commits into from
Dec 24, 2024

Conversation

rrousselGit
Copy link
Owner

@rrousselGit rrousselGit commented Dec 24, 2024

Related Issues

fixes #your-issue-number

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).

  • I have updated the CHANGELOG.md of the relevant packages.
    Changelog files must be edited under the form:

    ## Unreleased fix/major/minor
    
    - Description of your change. (thanks to @yourGithubId)
  • If this contains new features or behavior changes,
    I have updated the documentation to match those changes.

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions workflow configuration with new check steps.
    • Commented out inactive matrix options for build packages.

Copy link

coderabbitai bot commented Dec 24, 2024

Warning

Rate limit exceeded

@rrousselGit has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 9 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 65bc424 and 68b5443.

📒 Files selected for processing (2)
  • .github/workflows/build.yml (2 hunks)
  • .github/workflows/cleanup.yml (0 hunks)

Walkthrough

The pull request introduces modifications to the GitHub Actions workflow configuration file build.yml. The changes involve commenting out certain matrix options for channel and package_path, suggesting a temporary exclusion of some packages from the build process. Two new diagnostic steps have been added: one to list directory contents and another to conditionally run flutter pub get in a specific directory. The core workflow logic for dependency installation, code formatting, analysis, testing, and coverage reporting remains fundamentally unchanged.

Changes

File Change Summary
.github/workflows/build.yml - Commented out channel matrix option
- Commented out multiple package_path matrix entries
- Added "Check" step to list directory contents
- Added "Check2" step to conditionally run flutter pub get

Poem

🐰 In GitHub's garden of code so bright,
Workflows dance with new insights light,
Commented paths, a curious sight,
Checking directories left and right,
Our build pipeline takes gentle flight! 🚀


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 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.

@rrousselGit rrousselGit changed the title Logs CI Dec 24, 2024
Copy link

@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 (1)
.github/workflows/build.yml (1)

Line range hint 1-116: Document CI changes and create a restoration plan

The current changes appear to be temporary debugging modifications to the CI workflow. To maintain good CI/CD practices:

  1. Add a comment at the top of the file explaining:
    • Why these changes were made
    • Which packages are temporarily excluded
    • Link to any relevant issues
  2. Create a timeline for restoring full CI coverage
  3. Consider splitting the workflow into multiple jobs to isolate problematic packages

Here's a suggested header comment:

name: Build

+# Temporary CI configuration
+# TODO: Restore full package coverage (tracking issue: #XXXX)
+# - Currently testing only riverpod_generator due to CI setup issues
+# - Other packages temporarily disabled while investigating build failures
+# - Expected restoration date: YYYY-MM-DD
+
on:
  pull_request:
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ea53e56 and 65bc424.

📒 Files selected for processing (1)
  • .github/workflows/build.yml (2 hunks)

Comment on lines 85 to 93
- name: Check
run: ls -la .

- name: Check2
run: |
if test -d "integration/build_yaml"; then
flutter pub get integration/build_yaml
fi

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove redundant diagnostic steps

The new diagnostic steps appear to be temporary debugging additions:

  1. The "Check" step (ls -la) seems to be for debugging purposes
  2. The "Check2" step is an exact duplicate of the existing "Install dependencies (integration/buid.yaml)" step

Remove these redundant steps as they:

  • Increase workflow execution time
  • Add maintenance overhead
  • Don't provide additional value
-      - name: Check
-        run: ls -la .
-
-      - name: Check2
-        run: |
-          if test -d "integration/build_yaml"; then
-            flutter pub get integration/build_yaml
-          fi
-

Comment on lines 31 to 55
# - stable
- master
package_path:
- examples/counter
- examples/marvel
- examples/pub
- examples/random_number
- examples/stackoverflow
- examples/todos
- packages/riverpod
- packages/riverpod/example
- packages/flutter_riverpod
- packages/flutter_riverpod/example
- packages/hooks_riverpod
- packages/hooks_riverpod/example
- packages/riverpod_annotation
# TODO(rrousselGit) update riverpod_cli test setup to be supported by the CI
# - packages/riverpod_cli
# - examples/counter
# - examples/marvel
# - examples/pub
# - examples/random_number
# - examples/stackoverflow
# - examples/todos
# - packages/riverpod
# - packages/riverpod/example
# - packages/flutter_riverpod
# - packages/flutter_riverpod/example
# - packages/hooks_riverpod
# - packages/hooks_riverpod/example
# - packages/riverpod_annotation
# # TODO(rrousselGit) update riverpod_cli test setup to be supported by the CI
# # - packages/riverpod_cli
- packages/riverpod_generator
- packages/riverpod_generator/integration/build_yaml
# TODO(rrousselGit) update riverpod_graph test setup to be supported by the CI
# - packages/riverpod_graph
# TODO(rousselGit) blocked by https://github.com/invertase/dart_custom_lint/issues/16
# - packages/riverpod_lint_flutter_test
- website
# - website
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Critical test coverage reduction needs justification

The verification reveals significant concerns about the CI changes:

  1. All core packages (riverpod, flutter_riverpod, hooks_riverpod) have extensive test suites with 50+ test files but are currently excluded from CI.
  2. These are actively maintained packages at version 2.6.1/2.6.3, not deprecated or experimental ones.
  3. The TODOs in the CI configuration indicate known issues:
    • riverpod_cli needs CI setup updates
    • riverpod_graph has pending test setup changes
    • riverpod_lint_flutter_test is blocked by an external issue

While there might be valid reasons for temporarily reducing the test matrix, the current changes:

  • Remove testing for core packages that have extensive test coverage
  • Skip the stable channel testing entirely
  • Don't provide clear documentation about why these changes were made

Recommendations:

  1. Add a comment explaining why these packages were excluded and whether this is temporary
  2. Consider keeping at least the core packages (riverpod, flutter_riverpod, hooks_riverpod) in CI
  3. Create tracking issues for the TODO items if they don't exist already
  4. Keep the stable channel testing to ensure compatibility isn't broken
🔗 Analysis chain

Verify the impact of reduced test matrix coverage

The significant reduction in the test matrix raises several concerns:

  1. Testing only on master channel while commenting out stable could miss compatibility issues
  2. Most packages are excluded from CI, which could lead to undetected regressions
  3. Several TODOs indicate known CI setup issues for specific packages

Let's check which packages actually need testing:

Consider:

  1. Adding a comment explaining why these changes were made and their temporary nature
  2. Creating tracking issues for the TODO items to ensure they're addressed
  3. Implementing a phased approach to fix CI issues while maintaining some level of test coverage

Significant test coverage gaps detected in CI configuration

The verification results show that many packages with test directories are currently excluded from CI:

  • Core packages with tests: flutter_riverpod, hooks_riverpod, riverpod
  • Example apps with tests: counter, todos
  • Tools with tests: riverpod_graph, riverpod_lint_flutter_test

Let's verify if these packages are actively maintained and if their tests are currently passing:


Let's try a different approach to check the package activity and test status:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify which packages contain testable code
# Look for packages with test directories to determine which ones should be in CI

echo "Packages with test directories:"
fd -t d '^test$' packages/ examples/

echo -e "\nPackages with pubspec.yaml:"
fd pubspec.yaml packages/ examples/

Length of output: 1644


Script:

#!/bin/bash
# Check the last modification dates of test files in these packages
echo "Last modified test files in each package:"
for pkg in flutter_riverpod hooks_riverpod riverpod riverpod_graph riverpod_lint_flutter_test; do
  echo -e "\n=== $pkg ==="
  git log -1 --format="%ad" -- "packages/$pkg/test/"
done

# Check if there are any recent changes to these packages
echo -e "\nRecent changes to package directories:"
for pkg in flutter_riverpod hooks_riverpod riverpod riverpod_graph riverpod_lint_flutter_test; do
  echo -e "\n=== $pkg ==="
  git log -1 --format="%ad" -- "packages/$pkg/"
done

Length of output: 1787


Script:

#!/bin/bash
# Check for test files and their content in key packages
echo "=== Core packages test files ==="
fd -t f '.*_test\.dart$' packages/riverpod/test packages/flutter_riverpod/test packages/hooks_riverpod/test

echo -e "\n=== Package versions from pubspec.yaml ==="
for pkg in riverpod flutter_riverpod hooks_riverpod riverpod_generator; do
  echo -e "\n$pkg:"
  rg "version:" "packages/$pkg/pubspec.yaml" --no-line-number || true
done

echo -e "\n=== CI configuration comments ==="
rg "^\\s*#.*TODO" .github/workflows/build.yml

Length of output: 5567

@rrousselGit rrousselGit merged commit 17d5e37 into master Dec 24, 2024
45 checks passed
@rrousselGit rrousselGit deleted the ci branch December 24, 2024 10:14
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.

1 participant