Skip to content

Conversation

@mshriver
Copy link
Contributor

@mshriver mshriver commented Oct 15, 2025

Summary by Sourcery

Prepare release 2.8.2 by updating version numbers and enhancing the OpenAPI validation script.

Enhancements:

  • Refactor validate-openapi.sh to use an OPENAPI_DIR variable and mount only the OpenAPI directory with SELinux support
  • Upgrade the OpenAPI generator CLI version to v7.16.0 and simplify validation output by removing emojis

Chores:

  • Bump API spec, backend, and frontend package versions from 2.8.1 to 2.8.2

Copilot AI review requested due to automatic review settings October 15, 2025 07:06
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 15, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR updates the release to 2.8.2 by bumping versions in the OpenAPI spec, backend, and frontend configurations, and improves the OpenAPI validation script with a dedicated directory variable, an upgraded generator image, refined path checks, and a more robust Docker mount setup for SELinux.

Flow diagram for updated OpenAPI validation script

flowchart TD
    A["Start validation-openapi.sh"] --> B["Set OPENAPI_DIR and OPENAPI_FILE variables"]
    B --> C["Check if OpenAPI file exists at $OPENAPI_DIR/$OPENAPI_FILE"]
    C -->|Exists| D["Run Docker container with openapi-generator-cli:v7.16.0"]
    D --> E["Mount $OPENAPI_DIR to /local:Z (SELinux support)"]
    E --> F["Validate OpenAPI spec at /local/openapi.yaml"]
    F -->|Success| G["OpenAPI specification is valid!"]
    F -->|Failure| H["OpenAPI specification validation failed!"]
    C -->|Does not exist| I["Error: OpenAPI specification file not found"]
Loading

File-Level Changes

Change Details Files
Refactor and enhance OpenAPI validation script
  • Introduce OPENAPI_DIR and update OPENAPI_FILE reference
  • Upgrade GENERATOR_VERSION to v7.16.0
  • Adjust file existence check to include OPENAPI_DIR
  • Mount only the OpenAPI directory with :Z for SELinux compatibility
  • Remove emoji decorations from validation messages
scripts/validate-openapi.sh
Bump project version to 2.8.2 across configurations
  • Update version in OpenAPI spec to 2.8.2
  • Bump backend version in pyproject.toml
  • Bump frontend version in package.json
backend/ibutsu_server/openapi/openapi.yaml
backend/pyproject.toml
frontend/package.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the project version from 2.8.1 to 2.8.2 across the codebase and improves the OpenAPI validation script configuration.

  • Version bump from 2.8.1 to 2.8.2 in frontend, backend, and API specification
  • OpenAPI validation script refactored to use separate directory and file variables with SELinux support
  • OpenAPI generator version updated from v7.15.0 to v7.16.0

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
frontend/package.json Updates frontend version to 2.8.2
backend/pyproject.toml Updates backend version to 2.8.2
backend/ibutsu_server/openapi/openapi.yaml Updates API specification version to 2.8.2
scripts/validate-openapi.sh Refactors path handling and updates generator version

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Verify that mounting only the openapi directory in validate-openapi.sh (with the :Z flag) doesn’t break any relative references or external schema includes in your OpenAPI spec.
  • Double-check for any remaining version references elsewhere (e.g. CI configs or environment setup) to ensure everything is consistently bumped to 2.8.2.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Verify that mounting only the openapi directory in validate-openapi.sh (with the :Z flag) doesn’t break any relative references or external schema includes in your OpenAPI spec.
- Double-check for any remaining version references elsewhere (e.g. CI configs or environment setup) to ensure everything is consistently bumped to 2.8.2.

## Individual Comments

### Comment 1
<location> `scripts/validate-openapi.sh:35-41` </location>
<code_context>
     fi

     # Run the validation
+    # Mount the openapi directory directly to the container's working directory
+    # Use :Z for SELinux systems to allow container access
     $container_cmd run --rm \
-        -v "$(pwd):/local" \
</code_context>

<issue_to_address>
**suggestion:** Consider making SELinux volume flag conditional for non-SELinux systems.

On non-SELinux systems, ':Z' is not needed and could cause issues. Consider adding it only when SELinux is detected, or clarify SELinux is required.

```suggestion
    # Detect if SELinux is enabled
    if command -v getenforce >/dev/null 2>&1 && [ "$(getenforce)" = "Enforcing" ]; then
        VOLUME_FLAG=":Z"
    else
        VOLUME_FLAG=""
    fi

    # Run the validation
    # Mount the openapi directory directly to the container's working directory
    # Add :Z for SELinux systems to allow container access
    $container_cmd run --rm \
        -v "$(pwd)/$OPENAPI_DIR:/local${VOLUME_FLAG}" \
        "$GENERATOR_IMAGE" \
        validate -i "/local/$OPENAPI_FILE"
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@980e6c9). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff           @@
##             main    #732   +/-   ##
======================================
  Coverage        ?   8.63%           
======================================
  Files           ?     153           
  Lines           ?    7218           
  Branches        ?     596           
======================================
  Hits            ?     623           
  Misses          ?    6594           
  Partials        ?       1           
Flag Coverage Δ
backend 9.94% <ø> (?)
frontend 7.56% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mshriver mshriver merged commit 1968fc3 into ibutsu:main Oct 15, 2025
14 checks passed
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