idf-eclipse-plugin icon indicating copy to clipboard operation
idf-eclipse-plugin copied to clipboard

Enable test-specific validation bypass with 'testRun' flag on CI runners

Open AndriiFilippov opened this issue 4 months ago • 2 comments

Description

Implementing a conditional check to read a system property testRun and use it to optionally skip certain validations.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

I have tested implemented code locally on my Windows 11 machine by running: mvn clean install -Djarsigner.skip=true -DskipTests=false -DtestRun=TEST

Validations controlled by the 'testRun' flag were skipped during the run ✅ All tests passed successfully ✅

Test Configuration:

  • ESP-IDF Version:
  • OS (Windows,Linux and macOS): Windows 11 / Linux Ubuntu

Checklist

  • [X] PR Self Reviewed
  • [ ] Applied Code formatting
  • [ ] Added Documentation
  • [ ] Added Unit Test
  • [ ] Verified on all platforms - Windows,Linux and macOS

Summary by CodeRabbit

  • New Features

    • Integrated Espressif Installation Manager (EIM): download/launch from IDE, new ESP-IDF Manager editor, auto tool setup, and change detection with prompts.
    • Added console feedback and improved onboarding, including migration of old workspaces.
  • Refactor

    • Simplified environment handling; removed legacy installers, wizards, and update command.
    • UI/UX updates in manager view; product version bumped to 4.0.0.
  • CI

    • Modernized workflows, added beta tag handling, Maven caching, updated actions, and test flags.
  • Documentation

    • New EIM-based installation flow and migration guide; docs versioning added.
  • Tests

    • Updated integration tests, timeouts, and paths.

AndriiFilippov avatar Aug 19 '25 13:08 AndriiFilippov

[!IMPORTANT]

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Replaces legacy in-IDE tools management with EIM-based installation/management, adds EIM loader, parser, watcher, and startup flows; removes prior installers/wizards; updates environment handling to System.getenv; adjusts UI/editor to EIM; modernizes CI (triggers, actions, beta handling); bumps versions to 4.0.0; updates docs/tests accordingly.

Changes

Cohort / File(s) Summary
CI workflows modernization
.github/workflows/ci.yml, .github/workflows/ci_windows.yml, .github/workflows/ci_release.yml, .github/workflows/ci_beta.yml
Update triggers (incl. release/** and beta tags), modernize actions (checkout v4, install-esp-idf), adjust Maven flags, add dynamic S3 paths; remove macOS beta workflow.
Version and product bump
bundles/com.espressif.idf.branding/META-INF/MANIFEST.MF, features/com.espressif.idf.feature/feature.xml, releng/com.espressif.idf.configuration/pom.xml, releng/com.espressif.idf.product/idf.product
Increment versions from 3.5.0 to 4.0.0 qualifiers across branding, feature, releng, and product.
Core env/tooling refactor
.../idf/core/IDFEnvironmentVariables.java, .../idf/core/util/IDFUtil.java, .../idf/core/build/IDFBuildConfiguration.java, .../idf/core/logging/Logger.java, .../idf/core/util/EspToolCommands.java, .../idf/core/toolchain/ESPToolChainManager.java
Add new env constants; switch to System.getenv(); remove IDF_TOOLS_PATH propagation; add Logger overload; refine directory filtering; add python-env resolver.
Public constants cleanup
.../idf/core/IDFCorePreferenceConstants.java
Remove multiple public preference keys (GitHub assets, pip index URLs, IDF_TOOLS_PATH).
EIM core: constants, parser, loader, setup
.../idf/core/tools/EimConstants.java, .../idf/core/tools/EimIdfConfiguratinParser.java, .../idf/core/tools/EimLoader.java, .../idf/core/tools/SetupToolsInIde.java, .../idf/core/tools/ToolInitializer.java, .../idf/core/tools/DownloadListener.java, .../idf/core/tools/Messages.java, .../idf/core/tools/messages.properties
Introduce EIM constants, JSON parser, downloader/launcher, IDE setup job, initializer, download listener, and i18n for OpenOCD rules flow.
EIM VO models
.../idf/core/tools/vo/EimJson.java, .../idf/core/tools/vo/IdfInstalled.java
Add JSON-mapped value objects for EIM state and installed IDF entries.
File watcher for EIM JSON
.../idf/core/tools/watcher/*
Add watcher thread, state checker, change listener interface to react to eim_idf.json changes; export new package in core manifest.
Removal of legacy tools system
.../idf/core/tools/{IToolsInstallationWizardConstants.java, IToolsJsonKeys.java, JsonKey.java, ToolSetConfigurationManager.java, ToolsJsonParser.java, ToolsPlatformMapping.java, ToolsSystemWrapper.java}, .../idf/core/tools/vo/{IDFToolSet.java, ToolsVO.java, VersionDetailsVO.java, VersionsVO.java}
Delete old tool-set, parsers, annotations, platform mapping, and VO classes.
Tools utility shift
.../idf/core/tools/util/ToolsUtility.java
Replace tool-detection/extraction APIs with activation-script-based version retrieval and active-check helpers.
Core build/UI messages
.../idf/core/build/Messages.java, .../idf/core/build/messages.properties
Add new user-facing strings for EIM presence, workspace setup, and old-config migration; adjust some labels.
UI startup restructuring
bundles/com.espressif.idf.ui/plugin.xml, .../idf/ui/EspressifGeneralStartup.java, .../idf/ui/tools/EspressifToolStartup.java, .../idf/ui/InitializeToolsStartup.java
Replace old startup classes with general and tool startup; remove update command; delete old initializer.
UI EIM integration (manager/editor)
.../idf/ui/tools/manager/ESPIDFManagerEditor.java, .../idf/ui/tools/manager/EimEditorInput.java, .../idf/ui/tools/manager/pages/ESPIDFMainTablePage.java
Editor now consumes EIM JSON; add first-startup setup; table uses IdfInstalled list; add EIM launch/download control.
UI handlers and listeners
.../idf/ui/tools/EimButtonLaunchListener.java, .../idf/ui/tools/SetupToolsJobListener.java, .../idf/ui/LaunchBarListener.java, .../idf/ui/GlobalModalLock.java, .../idf/ui/tools/watcher/EimJsonUiChangeHandler.java
Add EIM button flow and job listener; serialize modals; adapt launch-bar confirmation; handle EIM JSON changes.
UI removals (install/update wizard)
.../idf/ui/install/*, .../idf/ui/tools/{ToolsActivationJob.java, ToolsInstallationJob.java, ToolsJob.java}, .../idf/ui/handlers/UpdateEspIdfHandler.java
Remove Git clone/download wizard, progress monitors, jobs, and update handler.
UI messages and prefs changes
.../idf/ui/tools/Messages.java, .../idf/ui/tools/messages.properties, .../idf/ui/preferences/EspresssifPreferencesPage.java, .../idf/ui/OSGI-INF/l10n/bundle.properties
Prune/replace messages for new flows; remove tools installation section from preferences; drop update command label.
UI utilities updated env sourcing
.../idf/ui/update/AbstractToolsHandler.java, .../idf/ui/dialogs/SbomCommandDialog.java, .../idf/ui/help/ProductInformationHandler.java, .../idf/ui/tracing/AppLvlTracingDialog.java, .../idf/serial/monitor/core/IDFMonitor.java
Switch to System.getenv(); remove dependency checks method in monitor.
Docs and static assets
docs/en/installation.rst, docs/_static/docs_version.js
Rewrite installation to EIM-centric process and migration steps; add docs version config (latest, release-v4.0.0).
Tests updates
tests/com.espressif.idf.ui.test/.../*.java, tests/.../configs/default-test-linux.properties, tests/pom.xml
Adapt flows to editor-based manager and EIM setup; tweak timeouts; update IDF path; add -DtestRun property; adjust test cases.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant IDE as IDE (Eclipse)
  participant Startup as EspressifToolStartup
  participant EIM as EIM (Manager)
  participant FS as eim_idf.json
  participant Core as SetupToolsInIde

  User->>IDE: Launch IDE
  IDE->>Startup: earlyStartup()
  Startup->>Startup: Check EIM installed / JSON present
  alt EIM not installed
    Startup->>EIM: Download & Launch (EimLoader)
    EIM-->>Startup: Exits after install
  end
  Startup->>FS: Read EIM JSON (EimIdfConfiguratinParser)
  alt Single IDF detected
    Startup->>Core: setupTools(idfInstalled, eimJson)
    Core-->>Startup: OK / Error (rollback on error)
  else Multiple/none
    Startup->>IDE: Open ESP‑IDF Manager Editor
  end
  note over IDE,FS: EimJsonWatchService monitors eim_idf.json and prompts to refresh on changes
sequenceDiagram
  participant Watcher as EimJsonWatchService
  participant FS as eim_idf.json
  participant UI as EimJsonUiChangeHandler
  participant Editor as ESPIDFManagerEditor
  participant Core as SetupToolsInIde

  FS-->>Watcher: Modify (create/delete/change)
  Watcher->>UI: onJsonFileChanged(path, paused=false)
  UI->>UI: Ask user to refresh (modal)
  alt Confirm
    UI->>FS: Reload EIM JSON
    alt Single IDF
      UI->>Core: setupTools(...)
    else Multiple
      UI->>Editor: Open manager and refresh
    end
  else Decline
    UI-->>Watcher: No action
  end

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120+ minutes

Possibly related PRs

  • espressif/idf-eclipse-plugin#1116 — Adds EIM integration (loader/parser/VOs, watchers, startup), overlapping with new EIM-based tooling and UI changes here.
  • espressif/idf-eclipse-plugin#1280 — Modifies CI workflows including deletion of ci_beta.yml and beta handling in ci_release.yml, matching this PR’s CI edits.
  • espressif/idf-eclipse-plugin#1218 — Further EIM-related wiring (watchers/startup/exported packages), touching the same areas as this PR.

Suggested labels

needs translation:CN

Suggested reviewers

  • alirana01
  • kolipakakondal
  • sigmaaa

Poem

A rabbit taps the build with gentle paws,
Watches EIM hop in with shiny jaws;
Old wands retired, new carrots in a row,
JSON rustles, watchers softly glow.
Tags and trails to “beta” now align—
4.0 blooms—thump-thump, all systems fine! 🥕🐇

✨ Finishing Touches
🧪 Generate unit tests
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch feature/handle-test-run-property

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

coderabbitai[bot] avatar Aug 19 '25 13:08 coderabbitai[bot]

Hi @AndriiFilippov Looks like this PR has all the 4.0.0 changes together with 37 commits, this only leads to conflicting changes and merge issues, can we make the specific PR for the changes you're working on.

kolipakakondal avatar Nov 19 '25 06:11 kolipakakondal