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

Fix github actions issue with --framework default value change (#9230) #9231

Conversation

ysmoradi
Copy link
Member

@ysmoradi ysmoradi commented Nov 13, 2024

This closes #9230

Summary by CodeRabbit

  • New Features
    • Updated CI/CD workflows to target .NET 8.0 framework for various projects, enhancing compatibility and performance.
  • Bug Fixes
    • Standardized global JSON configuration across jobs to ensure consistency in the build process.
  • Chores
    • Removed outdated .NET 9 based configurations to streamline the development environment.

@ysmoradi ysmoradi requested a review from msynk November 13, 2024 12:54
Copy link

coderabbitai bot commented Nov 13, 2024

Walkthrough

The changes in this pull request involve modifications to two GitHub Actions workflow configuration files, specifically targeting the .github/workflows/bit.full.ci.yml and .github/workflows/todo-sample.cd.yml. The updates primarily focus on adding the --framework option to dotnet new bit-bp commands, specifying target frameworks such as net8.0 and net9.0 for various projects. Additionally, the workflows maintain their structure while standardizing the framework version across the CI/CD process, ensuring consistent environment setup and artifact handling.

Changes

File Path Change Summary
.github/workflows/bit.full.ci.yml Added --framework net8.0 or --framework net9.0 to multiple dotnet new bit-bp commands for various test projects.
.github/workflows/todo-sample.cd.yml Updated dotnet new bit-bp commands to include --framework net8.0 for building Blazor applications and standardized global JSON configuration.

Assessment against linked issues

Objective Addressed Explanation
GitHub actions are issue with new --framework default value change (#9230)

Poem

🐇 In the land of code where rabbits play,
New frameworks hop in, brightening the day.
With net8.0 and net9.0 in tow,
Our workflows dance, putting on a show!
Hooray for the changes, let the tests run free,
In this garden of code, we’re as happy as can be! 🌼


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

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: 0

🧹 Outside diff range and nitpick comments (3)
.github/workflows/bit.full.ci.yml (3)

163-163: Maintain consistency in framework versions for storage tests

Similar to the database tests, the storage test projects use different framework versions:

  • TestLocal: net8.0
  • TestAzureBlobStorage: net9.0

Consider using the same framework version for both storage options to ensure consistent behavior and testing.

Also applies to: 167-167


173-173: Consider architectural implications of mixed framework versions

The backend setup tests also use different framework versions:

  • Standalone API: net8.0
  • Integrated API: net9.0

This pattern of mixing framework versions across different test configurations suggests a need for a clear framework versioning strategy. Consider:

  1. Documenting the rationale for framework version choices
  2. Creating a matrix strategy in the workflow to test each configuration with both framework versions
  3. Using environment variables to control framework versions centrally

Also applies to: 180-180


Line range hint 64-219: Consider implementing a structured framework version strategy

While the PR successfully adds the --framework parameter to all template commands, the alternating use of net8.0 and net9.0 across different test configurations suggests a need for a more structured approach. Consider:

  1. Using GitHub Actions matrix strategy to test each configuration with both framework versions
  2. Adding workflow inputs to control framework versions:
on:
  workflow_dispatch:
    inputs:
      framework-version:
        description: 'Target framework version'
        required: true
        default: 'net8.0'
        type: choice
        options:
        - net8.0
        - net9.0
  1. Using environment variables to centrally manage framework versions:
env:
  DEFAULT_FRAMEWORK: net8.0
  PREVIEW_FRAMEWORK: net9.0

This would make the framework version choices more maintainable and easier to update in the future.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between db4a34a and ee2edd2.

📒 Files selected for processing (2)
  • .github/workflows/bit.full.ci.yml (6 hunks)
  • .github/workflows/todo-sample.cd.yml (4 hunks)
🔇 Additional comments (7)
.github/workflows/bit.full.ci.yml (4)

64-64: Framework version correctly specified for SimpleTest

The --framework net8.0 parameter matches the test execution environment, ensuring consistency between project creation and test execution.


219-219: Framework version correctly specified for empty template

The use of --framework net8.0 for the SSR per page template is appropriate as it uses the stable framework version.


107-107: Consider standardizing framework versions across database tests

The database test projects use a mix of net8.0 and net9.0 frameworks. While both versions are supported by the workflow (as evidenced by the global.json setup), using preview versions (net9.0) in some tests but not others could lead to inconsistent test coverage and potential compatibility issues.

Consider standardizing all tests to use net8.0 for stability, or document the reasoning behind using different framework versions for different database tests.

Let's check the framework requirements in the repository:

Also applies to: 127-127, 145-145, 153-153


186-186: Clarify framework version selection criteria

The sample configurations use different framework versions:

  • Full-featured configuration (TestProject): net9.0
  • Minimal configuration (TestProject2): net8.0

Is there a specific reason for using different framework versions based on the feature set? This should be documented if intentional, or standardized if not.

Let's check if this pattern exists elsewhere:

Also applies to: 191-191

.github/workflows/todo-sample.cd.yml (3)

45-45: Framework specification is consistently applied across all jobs

The addition of --framework net8.0 to all dotnet new bit-bp commands aligns with the PR objective of fixing the framework default value issue. The change is consistently applied across all build jobs (API+Blazor, Windows, Android, iOS).

Also applies to: 143-143, 212-212, 312-312


312-312: Verify cross-platform framework consistency

The framework specifications are consistent across all platforms (Web, Windows, Android, iOS). Let's verify that all platform-specific framework targets are correctly aligned with the base .NET 8.0 framework.

#!/bin/bash
# Description: Verify framework consistency across platforms
# Check framework specifications in project files
echo "Checking framework specifications in project files:"
find TodoSample/src -name "*.csproj" -exec grep -l "TargetFramework" {} \; -exec grep "TargetFramework" {} \;

143-143: Verify Windows desktop framework configuration

The Windows build correctly specifies both .NET 8.0 for project creation and appropriate frameworks (net8.0-x86-desktop,webview2) for VPK packaging. However, let's verify that these framework specifications are compatible.

@msynk msynk merged commit ca35392 into develop Nov 13, 2024
6 of 7 checks passed
@msynk msynk deleted the 9230-github-actions-are-issue-with-new-framework-default-value-change branch November 13, 2024 13:01
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.

GitHub actions are issue with new --framework default value change
2 participants