Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development: Add deployment info and best practices to playwright docs #9807

Merged
merged 10 commits into from
Dec 20, 2024

Conversation

muradium
Copy link
Contributor

@muradium muradium commented Nov 17, 2024

Checklist

General

Motivation and Context

We have removed Cypress docs, but Playwright docs do not contain some of the information we used to have. This includes Playwright Bamboo build plan's deployment information, general best practices of E2E testing and some other helpful information.

Description

This PR adds Bamboo deployment information of Playwright e2e testing build plan and removes unused assets related to Cypress docs.

Steps for Testing

Check out the updated documentation.

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Summary by CodeRabbit

Summary by CodeRabbit

  • Documentation
    • Expanded the playwright.rst document with detailed background information on the Playwright test suite and its integration with the Artemis system.
    • Renamed and enriched the section on best practices when writing new E2E tests.
    • Introduced a new section on deploying Artemis on a Bamboo build agent, including Docker container configurations.
    • Added notes on security, test execution timing, and maintenance for the Playwright Docker image.

@muradium muradium marked this pull request as ready for review November 17, 2024 17:56
@muradium muradium requested a review from a team as a code owner November 17, 2024 17:56
Copy link

coderabbitai bot commented Nov 17, 2024

Walkthrough

The pull request expands the playwright.rst documentation by adding a "Background" section that outlines the Playwright test suite's purpose and deployment requirements. It renames and enhances the section on best practices for writing E2E tests, providing comprehensive guidelines. Additionally, a new section on "Artemis Deployment on Bamboo Build Agent" is introduced, detailing the deployment process using Docker containers. The updates also include notes on security, test execution timing, and maintenance of the Playwright Docker image.

Changes

File Change Summary
docs/dev/playwright.rst Expanded documentation with a new "Background" section, renamed and enriched best practices section, and added "Artemis Deployment on Bamboo Build Agent" section detailing Docker usage and deployment processes.

Possibly related PRs

Suggested labels

ready to merge

Suggested reviewers

  • az108
  • SimonEntholzer
  • coolchock
  • BBesrour

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. This feature will be included in our Pro Plan when released.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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 or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • 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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (5)
docs/dev/playwright.rst (5)

13-14: Consider adding information about future plans

While the current setup's limitations are well explained, it would be helpful to include information about any planned improvements or timeline for implementing the ideal Kubernetes setup.


143-144: Fix typo and clarify the recommendation

There's a typo in the word "system's" and the sentence structure could be improved.

-This understanding guides determining what needs testing and what defines a successful test.
-The best way to understand is to consolidate the original system`s developer or a person actively working on this
-component.
+This understanding guides determining what needs testing and what defines a successful test.
+The best way to gain this understanding is to consult with the original system's developer or a person actively working on this
+component.

186-187: Clarify the "Similar Test Setups" section

The example provided about HTTP response checking is too specific and doesn't fully illustrate the concept of similar test setups.

Consider expanding this section with:

  1. A broader explanation of what constitutes a test setup
  2. Multiple examples of standardized approaches
  3. Guidelines for maintaining consistency across different test suites

191-192: Fix typo in the failing tests section

There's a typo in the word "fix".

-and fx the issue, or update the test if the requirements have changed.
+and fix the issue, or update the test if the requirements have changed.

329-334: Enhance security documentation

While the security-related configuration is mentioned, consider adding:

  1. Best practices for managing sensitive environment variables
  2. Regular security audit procedures
  3. Access control policies for the Bamboo plan variables
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 1786886 and 9f7be06.

⛔ Files ignored due to path filters (8)
  • docs/dev/cypress/cypress-open-screenshot.png is excluded by !**/*.png, !**/*.png
  • docs/dev/cypress/cypress_bamboo_deployment_diagram.svg is excluded by !**/*.svg, !**/*.svg
  • docs/dev/cypress/cypress_test_environment_deployment_diagram.svg is excluded by !**/*.svg, !**/*.svg
  • docs/dev/cypress/sorry-cypress-dashboard.png is excluded by !**/*.png, !**/*.png
  • docs/dev/cypress/sorry-cypress-run.png is excluded by !**/*.png, !**/*.png
  • docs/dev/cypress/sorry-cypress-runs.png is excluded by !**/*.png, !**/*.png
  • docs/dev/cypress/sorry-cypress-test.png is excluded by !**/*.png, !**/*.png
  • docs/dev/playwright/playwright_bamboo_deployment_diagram.svg is excluded by !**/*.svg, !**/*.svg
📒 Files selected for processing (1)
  • docs/dev/playwright.rst (3 hunks)
🔇 Additional comments (1)
docs/dev/playwright.rst (1)

378-379: Verify the Bamboo build plan links

Let's verify that the referenced Bamboo build plan links are accessible and correct.

docs/dev/playwright.rst Show resolved Hide resolved
HawKhiem
HawKhiem previously approved these changes Nov 17, 2024
Copy link

@HawKhiem HawKhiem left a comment

Choose a reason for hiding this comment

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

Some of us as students don't have an admin account. Is it still possible to run the playwright test locally? Other than that the doc is LGTM

image

@muradium
Copy link
Contributor Author

@HawKhiem yes you can run them locally :) Admin credentials are the ones corresponding to the local instance of Artemis running on your machine (which is required for running the tests). In default Artemis local config, credentials match the ones in the Playwright env file.

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 17, 2024
@HawKhiem
Copy link

@HawKhiem yes you can run them locally :) Admin credentials are the ones corresponding to the local instance of Artemis running on your machine (which is required for running the tests). In default Artemis local config, credentials match the ones in the Playwright env file.

Thank you!

Feras797
Feras797 previously approved these changes Nov 25, 2024
Copy link

@Feras797 Feras797 left a comment

Choose a reason for hiding this comment

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

the documentation LGTM, it is detailed enough such that I did not get lost at any step.

@krusche krusche changed the title Feature: Add deployment info and best practices to Playwright docs Development: Add deployment info and best practices to playwright docs Nov 26, 2024
Copy link
Member

@krusche krusche left a comment

Choose a reason for hiding this comment

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

please update the outdated figure

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 28, 2024
Copy link

github-actions bot commented Dec 6, 2024

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 6, 2024
@muradium muradium requested a review from a team as a code owner December 14, 2024 12:24
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (4)
docs/dev/playwright.rst (4)

4-20: Consider enhancing the background section with additional context

While the section effectively explains the basic setup, consider adding:

  1. A brief explanation of how Artemis interacts with external services (Gitlab, Jenkins)
  2. The implications and limitations of using the prelive system
  3. Future plans or roadmap for moving to a Kubernetes setup

This would help readers better understand the current architecture and its evolution.


157-219: Enhance best practices with concrete examples

The best practices section is well-structured but could be more actionable. Consider:

  1. Adding code examples for each best practice
  2. Including links to example test files in the codebase
  3. Cross-referencing related sections in the Playwright documentation

This would help developers better understand and implement these practices.


348-355: Review security practices for handling sensitive information

While using environment variables for security-sensitive information is common, consider:

  1. Documenting the specific environment variables required
  2. Adding information about secure variable management in Bamboo
  3. Including validation checks for required environment variables

This would help ensure secure deployment and easier troubleshooting.


389-394: Document firewall configuration details

The firewall rule for Bamboo webhook access should be documented in more detail:

  1. Specific IP ranges or security groups used
  2. Required ports and protocols
  3. Monitoring and audit procedures

This information is crucial for security maintenance and troubleshooting.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f7be06 and b0ed251.

⛔ Files ignored due to path filters (1)
  • docs/dev/playwright/playwright_bamboo_deployment_diagram.svg is excluded by !**/*.svg, !**/*.svg
📒 Files selected for processing (1)
  • docs/dev/playwright.rst (3 hunks)
🔇 Additional comments (1)
docs/dev/playwright.rst (1)

412-422: 🛠️ Refactor suggestion

Maintenance section needs more detailed procedures

The previous review comment about adding specific maintenance procedures is still valid and hasn't been addressed.

Additionally, consider adding:

  1. Links to the Docker image versioning policy
  2. Instructions for testing new Playwright image versions
  3. Rollback procedures for failed updates

This would ensure consistent maintenance practices.

Copy link
Member

@BBesrour BBesrour left a comment

Choose a reason for hiding this comment

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

I think the hardware software mapping diagram is a bit misleading since it contains an Artemis client container which isn't really the case. And I think we think should omit the internal components of Artemis since they aren't really relevant here.

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 14, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
docs/dev/playwright.rst (5)

4-20: Consider adding a note about environment differences

The background section effectively explains the deployment strategy. Consider adding a brief note distinguishing between local development setup and CI environment requirements to help developers understand the differences in configuration needs.


157-219: Enhance best practices with code examples

The best practices section provides excellent guidance. Consider enhancing it by adding:

  1. Code snippets demonstrating each practice
  2. Examples of common pitfalls to avoid
  3. Links to example test files in the codebase that follow these practices

This would make the guidelines more actionable for developers.


Line range hint 221-314: Add section on debugging failed tests

The technical best practices section is comprehensive but could benefit from a subsection on debugging strategies, including:

  • How to use Playwright's debug mode
  • Common failure patterns and their solutions
  • Using Playwright's trace viewer
  • Tips for investigating flaky tests

315-401: Add troubleshooting guide for deployment

The deployment section thoroughly explains the setup but would benefit from a troubleshooting guide covering:

  • Common deployment issues and their solutions
  • How to verify each container's health
  • Logs to check when problems occur
  • Steps to restart failed components

Line range hint 1-412: Minor formatting improvements needed

Consider these formatting enhancements:

  1. Use consistent quotation marks (currently mixing ` and ")
  2. Add line breaks before warning boxes for better readability
  3. Format URLs as proper RST links instead of inline URLs
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b0ed251 and 4c1e9e9.

⛔ Files ignored due to path filters (1)
  • docs/dev/playwright/playwright_bamboo_deployment_diagram.svg is excluded by !**/*.svg, !**/*.svg
📒 Files selected for processing (1)
  • docs/dev/playwright.rst (3 hunks)
🔇 Additional comments (1)
docs/dev/playwright.rst (1)

402-412: Add specific maintenance procedures

The maintenance section should include step-by-step instructions for updating the Playwright Docker image, version compatibility matrix, and rollback procedures.

Copy link
Member

@BBesrour BBesrour left a comment

Choose a reason for hiding this comment

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

lgtm. thnx for the changes

Copy link
Contributor

@coolchock coolchock left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link

@HawKhiem HawKhiem left a comment

Choose a reason for hiding this comment

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

LGTM, reapprove

@krusche krusche added this to the 7.8.0 milestone Dec 20, 2024
@krusche krusche merged commit 2fa027e into develop Dec 20, 2024
16 checks passed
@krusche krusche deleted the feature/playwright/merge-cypress-playwright-docs branch December 20, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

6 participants