Skip to content

Fix QIT workflow SASS build failure#367

Open
devin-ai-integration[bot] wants to merge 5 commits intodevelopfrom
devin/1756150674-fix-qit-workflow-composer
Open

Fix QIT workflow SASS build failure#367
devin-ai-integration[bot] wants to merge 5 commits intodevelopfrom
devin/1756150674-fix-qit-workflow-composer

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Aug 26, 2025

Fix QIT workflow SASS build failure, authentication, and test discovery issues

Summary

This PR fixes three critical issues preventing the QIT (Quality Insights Toolkit) workflow from running successfully:

  1. SASS Build Failure: The QIT workflow was failing during the "Build plugin" step because composer install --no-dev excluded the WooCommerce dev dependency containing required SASS partial files (_colors, _variables, _breakpoints, _mixins) that webpack automatically imports.

  2. Authentication Failure: The QIT workflow was using the deprecated --application_password parameter instead of the current --qit_token parameter, causing authentication to fail with empty credentials.

  3. Test Discovery Failure: The workflow was using managed test commands (qit run:activation, qit run:security) which require WooCommerce Marketplace registration. Since the plugin is not in the Marketplace, QIT reported "No tests found for the given plugins."

Key Changes:

  • Removed --no-dev flag from composer install in QIT workflow to include WooCommerce SASS files
  • Updated QIT authentication from --application_password to --qit_token
  • Switched from managed tests to custom E2E tests using qit run:e2e with --zip parameter
  • Updated documentation to reflect QIT Token requirements and custom E2E test approach
  • GitHub secrets updated from QIT_APP_PASS to QIT_TOKEN

Review & Testing Checklist for Human

  • Manual QIT workflow end-to-end test: Trigger the QIT workflow manually via GitHub Actions to verify authentication, build, and testing work completely (this is the most critical test since external QIT service integration couldn't be fully verified)
  • Authentication verification: Confirm the QIT authentication step completes successfully with the new --qit_token parameter and updated QIT_TOKEN + QIT_USER secrets
  • Custom E2E test execution: Verify that qit run:e2e simple-sales-tax --zip=simple-sales-tax.zip --wait actually runs tests and doesn't return "No tests found" error
  • SASS build verification: Confirm the "Build plugin" step completes without SASS import errors for files like _colors, _variables, etc.
  • QIT test results review: Check the uploaded QIT test artifacts to ensure meaningful test results were generated and no silent failures occurred

Recommended Test Plan:

  1. Go to Actions → "QIT Testing" → Run workflow on this branch
  2. Monitor each step carefully, especially authentication and test execution
  3. Check workflow artifacts for actual QIT test results and logs
  4. Verify no errors related to SASS compilation, authentication, or test discovery

Diagram

%%{ init : { "theme" : "default" }}%%
graph TD
    qit_yml[".github/workflows/qit.yml"]:::major-edit
    qit_setup["QIT_SETUP.md"]:::minor-edit
    composer_json["composer.json"]:::context
    webpack_config["webpack.config.js"]:::context
    
    qit_yml --> |"composer install<br/>(removed --no-dev)"| composer_json
    composer_json --> |"includes WooCommerce<br/>dev dependency"| webpack_config
    webpack_config --> |"auto-imports<br/>SASS partials"| sass_files["WooCommerce SASS files<br/>(_colors, _variables, etc.)"]:::context
    
    qit_yml --> |"qit partner:add<br/>--qit_token"| auth["QIT Authentication"]:::context
    auth --> |"uses QIT_TOKEN<br/>secret"| github_secrets["GitHub Secrets<br/>(QIT_USER, QIT_TOKEN)"]:::context
    
    qit_yml --> |"qit run:e2e<br/>--zip parameter"| custom_tests["Custom E2E Tests"]:::context
    custom_tests --> |"tests uploaded<br/>plugin zip"| plugin_zip["simple-sales-tax.zip"]:::context
    
    subgraph Legend
        L1[Major Edit]:::major-edit
        L2[Minor Edit]:::minor-edit  
        L3[Context/No Edit]:::context
    end

classDef major-edit fill:#90EE90
classDef minor-edit fill:#87CEEB
classDef context fill:#FFFFFF
Loading

Notes

  • Root cause analysis:

    • SASS failure was caused by webpack auto-importing SASS partials that only exist in the WooCommerce dev dependency
    • Authentication failure was due to QIT CLI deprecating --application_password in favor of --qit_token (discovered by examining QIT CLI source code)
    • Test discovery failure was because managed tests require WooCommerce Marketplace registration, but custom E2E tests work with any plugin zip
  • Testing limitation: Unable to test QIT workflow end-to-end locally due to authentication requirements and external service dependencies. The fixes are based on thorough documentation research and QIT CLI source code analysis, but require manual verification.

  • Documentation inconsistency: Official QIT documentation showed mixed examples (some still using deprecated parameters), so implementation was based on CLI source code analysis and multiple documentation sources.

  • Session info: Requested by lmaier@taxcloud.com - Link to Devin run

Risk Assessment: Medium-High - Authentication and test approach changes for external services that couldn't be fully tested end-to-end. Manual QIT workflow testing is essential to verify the fixes work correctly.

- Remove --no-dev flag to include WooCommerce dev dependency
- WooCommerce dependency contains required SASS partials (_colors, _variables, _breakpoints, _mixins)
- Matches working deploy workflow configuration
- Keeps --optimize-autoloader flag for performance

Co-Authored-By: lmaier@taxcloud.com <lmaier@taxcloud.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration bot and others added 4 commits August 27, 2025 18:57
…lication_password

- Update QIT workflow to use --qit_token parameter (current method)
- Update documentation to reflect QIT Token requirements
- Application passwords are deprecated and no longer work
- Fixes authentication failure in QIT workflow

Co-Authored-By: lmaier@taxcloud.com <lmaier@taxcloud.com>
- Replace managed test commands (qit run:activation, qit run:security) with custom E2E test
- Use qit run:e2e with --zip parameter for non-Marketplace plugins
- Add --wait flag to ensure tests complete before workflow continues
- Update documentation to reflect custom E2E test approach
- Fixes 'No tests found for the given plugins' error

Co-Authored-By: lmaier@taxcloud.com <lmaier@taxcloud.com>
- Replace --zip=simple-sales-tax.zip with --source=simple-sales-tax.zip
- Based on QIT CLI source code analysis in RunE2ECommand.php
- Fixes 'The --zip option does not exist' error
- Completes QIT workflow implementation for custom E2E tests

Co-Authored-By: lmaier@taxcloud.com <lmaier@taxcloud.com>
- QIT CLI RunE2ECommand does not support --wait option
- Based on source code analysis of RunE2ECommand.php
- Fixes 'The --wait option does not exist' error
- Command now uses: qit run:e2e simple-sales-tax --source=simple-sales-tax.zip

Co-Authored-By: lmaier@taxcloud.com <lmaier@taxcloud.com>
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.

0 participants