feat: Add Playwright option to bonfire IQE CJI deployment command#569
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
WalkthroughThis PR adds a new ChangesPlaywright Deployment Flag Integration
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/test_bonfire_lib/test_core_resources.py (1)
150-159:⚠️ Potential issue | 🟠 Major | ⚡ Quick winMove IBUTSU override assertions out of the combined deploy test.
Line 156 assertions require custom IBUTSU inputs, but this test uses defaults, so it will fail for the wrong reason.
Suggested fix
@@ def test_custom_values(self): @@ assert env_dict["IQE_PARALLEL_ENABLED"] == "false" assert env_dict["IQE_PARALLEL_WORKER_COUNT"] == "4" + value_from_dict = {e["name"]: e["valueFrom"] for e in iqe["env"] if "valueFrom" in e} + assert value_from_dict["IBUTSU_MODE"]["configMapKeyRef"]["name"] == "my-ibutsu-cm" + assert value_from_dict["IBUTSU_PROJECT"]["configMapKeyRef"]["name"] == "my-ibutsu-cm" + assert value_from_dict["IBUTSU_TOKEN"]["secretKeyRef"]["name"] == "my-ibutsu-secret" @@ def test_deploy_both_selenium_and_playwright(self): result = render_cji("test-cji", "my-app", deploy_selenium=True, deploy_playwright=True) iqe = result["spec"]["testing"]["iqe"] assert iqe["ui"]["selenium"]["deploy"] is True assert iqe["ui"]["playwright"]["deploy"] is True - - value_from_dict = {e["name"]: e["valueFrom"] for e in iqe["env"] if "valueFrom" in e} - assert value_from_dict["IBUTSU_MODE"]["configMapKeyRef"]["name"] == "my-ibutsu-cm" - assert value_from_dict["IBUTSU_PROJECT"]["configMapKeyRef"]["name"] == "my-ibutsu-cm" - assert value_from_dict["IBUTSU_TOKEN"]["secretKeyRef"]["name"] == "my-ibutsu-secret"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/test_bonfire_lib/test_core_resources.py` around lines 150 - 159, The assertions checking IBUTSU configMap/secret names in test_deploy_both_selenium_and_playwright are using custom IBUTSU inputs that this test does not provide; remove the three assertions that reference IBUTSU_MODE, IBUTSU_PROJECT, and IBUTSU_TOKEN from test_deploy_both_selenium_and_playwright (the test that calls render_cji with deploy_selenium=True and deploy_playwright=True) and either add a separate test that calls render_cji with the custom IBUTSU inputs to assert those valueFrom entries, or update/rename an existing IBUTSU-specific test to include those assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@tests/test_bonfire_lib/test_core_resources.py`:
- Around line 150-159: The assertions checking IBUTSU configMap/secret names in
test_deploy_both_selenium_and_playwright are using custom IBUTSU inputs that
this test does not provide; remove the three assertions that reference
IBUTSU_MODE, IBUTSU_PROJECT, and IBUTSU_TOKEN from
test_deploy_both_selenium_and_playwright (the test that calls render_cji with
deploy_selenium=True and deploy_playwright=True) and either add a separate test
that calls render_cji with the custom IBUTSU inputs to assert those valueFrom
entries, or update/rename an existing IBUTSU-specific test to include those
assertions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: 15fc02ba-bd60-44a7-a6ec-7c702bd3023a
📒 Files selected for processing (5)
bonfire/bonfire.pybonfire/processor.pybonfire_lib/core_resources.pybonfire_lib/templates/clowdjobinvocation.yaml.j2tests/test_bonfire_lib/test_core_resources.py
- Add --playwright CLI flag to deploy-iqe-cji and process-iqe-cji commands - Update processor to handle playwright parameter and pass to templates - Add deploy_playwright parameter to render_cji() library function - Update CJI template to include playwright.deploy configuration - Add comprehensive tests for Playwright deployment modes Supports three deployment modes: - Playwright only: bonfire deploy-iqe-cji app --playwright - Selenium only: bonfire deploy-iqe-cji app --selenium - Both: bonfire deploy-iqe-cji app --selenium --playwright Tests added: - test_deploy_playwright: validates Playwright-only deployment - test_deploy_both_selenium_and_playwright: validates concurrent deployment - Updated test_defaults to verify both are disabled by default Tested end-to-end against minikube with Clowder master (PR #1772). All deployment modes work correctly with proper container creation, volume sharing, and resource allocation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
e114532 to
e502905
Compare
Supports three deployment modes:
Tests added:
Tested end-to-end against minikube with Clowder master (PR #1772). All deployment modes work correctly with proper container creation, volume sharing, and resource allocation.