Skip to content

Isolate semoss bi#1370

Merged
kunal0137 merged 5 commits intodevfrom
isolate-semoss-bi
Jun 30, 2025
Merged

Isolate semoss bi#1370
kunal0137 merged 5 commits intodevfrom
isolate-semoss-bi

Conversation

@resmas-tx
Copy link
Copy Markdown
Contributor

Description

This change will delete the files in the legacy folder and replace them with files from the SEMOSS/bi project

Changes Made

  • Added steps under the "pnpm_build_dev" CI step to download files from the SEMOSS/bi project as a zip

How to Test

  1. Delete contents of the legacy folder
  2. Download files from the SEMOSS/bi project as a zip and add them to the legacy folder
  3. Remove the playsheet folder from the SEMOSS/bi project
  4. Continue with the next steps of the pipeline

Notes

N/A

@resmas-tx resmas-tx requested a review from a team as a code owner June 24, 2025 14:05
@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /describe

@QodoAI-Agent
Copy link
Copy Markdown

Title

Isolate semoss bi


User description

Description

This change will delete the files in the legacy folder and replace them with files from the SEMOSS/bi project

Changes Made

  • Added steps under the "pnpm_build_dev" CI step to download files from the SEMOSS/bi project as a zip

How to Test

  1. Delete contents of the legacy folder
  2. Download files from the SEMOSS/bi project as a zip and add them to the legacy folder
  3. Remove the playsheet folder from the SEMOSS/bi project
  4. Continue with the next steps of the pipeline

Notes

N/A


PR Type

Enhancement


Description

  • Clear and recreate the legacy folder in CI

  • Download and unzip SEMOSS/bi repository archive

  • Remove the playsheet directory from unzipped files

  • Move SEMOSS/bi content into legacy and clean up


Changes walkthrough 📝

Relevant files
Configuration changes
ci-pnpm-maven.yml
CI workflow steps for SEMOSS/bi import                                     

.github/workflows/ci-pnpm-maven.yml

  • Added step to delete and recreate legacy folder
  • Added download of SEMOSS/bi main.zip using authenticated curl
  • Unzipped archive, removed playsheet directory, and cleaned zip
  • Copied SEMOSS/bi content into legacy and removed temporary files
  • +31/-0   

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /review

    @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /improve

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Hardcoded branch

    Using the 'main' branch and directory 'bi-main' assumes the default branch name is 'main', which may change. Consider parameterizing the branch or deriving it dynamically to prevent future breaks.

    curl -L -u "${{ secrets.SEMOSS_GITHUB_USERNAME }}:${{ secrets.SEMOSS_GITHUB_PAT }}" -o tmp/main.zip https://github.com/SEMOSS/bi/archive/refs/heads/main.zip
    echo "Unzip contents of the SEMOSS/bi to the tmp folder"
    unzip tmp/main.zip -d tmp/
    echo "Delete the playsheet folder from semoss/bi files"
    rm -rf tmp/bi-main/playsheet/
    ls -als tmp/bi-main/
    Lack of error handling

    The run blocks do not include 'set -e' or explicit exit checks, so failures in commands (e.g., unzip, rm) may not abort the workflow. Add strict error handling to ensure CI fails fast on errors.

    - name: Delete contents of legacy folder
      run: |
          echo "Remove and recreate the legacy folder"
          rm -rf legacy
          mkdir legacy
          ls -als
    
    - name: Download contents of SEMOSS/bi project
      run: |
          echo "Download SEMOSS/bi as a zip file"
          mkdir -p tmp
          curl -L -u "${{ secrets.SEMOSS_GITHUB_USERNAME }}:${{ secrets.SEMOSS_GITHUB_PAT }}" -o tmp/main.zip https://github.com/SEMOSS/bi/archive/refs/heads/main.zip
          echo "Unzip contents of the SEMOSS/bi to the tmp folder"
          unzip tmp/main.zip -d tmp/
          echo "Delete the playsheet folder from semoss/bi files"
          rm -rf tmp/bi-main/playsheet/
          ls -als tmp/bi-main/
          echo "Remove zip file"
          rm tmp/main.zip
    
    - name: Move SEMOSS/bi files into the legacy folder
      run: |
          echo "Move contents of SEMOSS/bi into legacy folder"
          cp -r tmp/bi-main/. legacy/
          echo "Delete tmp folder"
          rm -rf tmp/
          echo "list files under legacy folder"
          ls -als legacy
    
    Noisy logs

    The 'ls -als' commands throughout the steps produce verbose output that could clutter CI logs. Remove or limit these listings to only necessary debug steps.

          ls -als
    
    - name: Download contents of SEMOSS/bi project
      run: |
          echo "Download SEMOSS/bi as a zip file"
          mkdir -p tmp
          curl -L -u "${{ secrets.SEMOSS_GITHUB_USERNAME }}:${{ secrets.SEMOSS_GITHUB_PAT }}" -o tmp/main.zip https://github.com/SEMOSS/bi/archive/refs/heads/main.zip
          echo "Unzip contents of the SEMOSS/bi to the tmp folder"
          unzip tmp/main.zip -d tmp/
          echo "Delete the playsheet folder from semoss/bi files"
          rm -rf tmp/bi-main/playsheet/
          ls -als tmp/bi-main/
          echo "Remove zip file"
          rm tmp/main.zip
    
    - name: Move SEMOSS/bi files into the legacy folder
      run: |
          echo "Move contents of SEMOSS/bi into legacy folder"
          cp -r tmp/bi-main/. legacy/
          echo "Delete tmp folder"
          rm -rf tmp/
          echo "list files under legacy folder"
          ls -als legacy

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Add strict shell error handling

    Ensure the script fails immediately on any error and prevents unset variables by
    adding strict shell options at the start of the run block. Also use mkdir -p for
    idempotent directory creation.

    .github/workflows/ci-pnpm-maven.yml [34-38]

     run: |
    +    set -euo pipefail
         echo "Remove and recreate the legacy folder"
         rm -rf legacy
    -    mkdir legacy
    +    mkdir -p legacy
         ls -als
    Suggestion importance[1-10]: 7

    __

    Why: Adding set -euo pipefail and switching to mkdir -p improves error handling and idempotence in the legacy folder cleanup.

    Medium
    Enable curl error handling

    Fail the download step on HTTP errors and suppress sensitive output by adding --fail
    -sS flags to curl. This ensures the workflow stops if the ZIP cannot be retrieved.

    .github/workflows/ci-pnpm-maven.yml [44]

    -curl -L -u "${{ secrets.SEMOSS_GITHUB_USERNAME }}:${{ secrets.SEMOSS_GITHUB_PAT }}" \
    +curl -L --fail -sS -u "${{ secrets.SEMOSS_GITHUB_USERNAME }}:${{ secrets.SEMOSS_GITHUB_PAT }}" \
         -o tmp/main.zip https://github.com/SEMOSS/bi/archive/refs/heads/main.zip
    Suggestion importance[1-10]: 7

    __

    Why: Including --fail -sS ensures the workflow stops on HTTP errors and hides sensitive output, enhancing reliability.

    Medium
    General
    Use checkout action for repo

    Replace the manual curl and unzip steps with the built-in actions/checkout for
    SEMOSS/bi to simplify authentication and fetching. This reduces custom scripting and
    leverages native GitHub Actions support.

    .github/workflows/ci-pnpm-maven.yml [40-51]

    -- name: Download contents of SEMOSS/bi project
    -  run: |
    -      mkdir -p tmp
    -      curl ...
    -      unzip tmp/main.zip -d tmp/
    -      rm -rf tmp/bi-main/playsheet/
    -      rm tmp/main.zip
    +- name: Checkout SEMOSS/bi repository
    +  uses: actions/checkout@v4
    +  with:
    +    repository: SEMOSS/bi
    +    ref: main
    +    token: ${{ secrets.SEMOSS_GITHUB_PAT }}
    +    path: tmp/bi-main
    Suggestion importance[1-10]: 7

    __

    Why: Leveraging actions/checkout simplifies the download logic, reduces custom scripting, and uses native GitHub Actions support.

    Medium
    Exclude .git metadata when copying

    Avoid copying unwanted Git metadata and hidden files by using rsync with an exclude
    pattern. This keeps the legacy folder clean and only includes necessary files.

    .github/workflows/ci-pnpm-maven.yml [56]

    -cp -r tmp/bi-main/. legacy/
    +rsync -a --exclude='.git*' tmp/bi-main/ legacy/
    Suggestion importance[1-10]: 5

    __

    Why: Using rsync with --exclude='.git*' reduces unwanted metadata but is a stylistic optimization with moderate impact.

    Low

    @kunal0137 kunal0137 merged commit 35fc915 into dev Jun 30, 2025
    2 of 3 checks passed
    @kunal0137 kunal0137 deleted the isolate-semoss-bi branch June 30, 2025 17:37
    @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /update_changelog

    @QodoAI-Agent
    Copy link
    Copy Markdown

    Changelog updates: 🔄

    2025-06-30 *

    Changed

    • Updated CI to remove legacy folder and import SEMOSS/bi files
    • Replaced obsolete legacy content with upstream SEMOSS/bi project files

    to commit the new content to the CHANGELOG.md file, please type:
    '/update_changelog --pr_update_changelog.push_changelog_changes=true'

    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.

    3 participants