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

Tenv update #17195

Merged
merged 2 commits into from
Feb 25, 2025
Merged

Tenv update #17195

merged 2 commits into from
Feb 25, 2025

Conversation

grdddj
Copy link
Contributor

@grdddj grdddj commented Feb 24, 2025

Using new tenv image built from trezor/trezor-user-env#290

Enabling the Shamir T2T1 backup test again - it should be fixed

@grdddj grdddj marked this pull request as ready for review February 24, 2025 15:57
@grdddj grdddj requested a review from HajekOndrej February 24, 2025 15:57
Copy link

coderabbitai bot commented Feb 24, 2025

Walkthrough

This pull request updates the Docker image tag for the trezor-user-env service across multiple configuration files. The previous image tag has been replaced with a new one in files used for end-to-end testing, CI pipelines, and various Docker Compose deployments. These changes ensure that all related services pull the updated image version during execution. In addition to the image tag updates, an onboarding test for wallet creation within the desktop core test suite has been re-enabled by removing the skip directive.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e70a5c4 and 7fe9f2d.

📒 Files selected for processing (12)
  • .github/workflows/test-trezor-user-env-link-e2e.yml (1 hunks)
  • docker/docker-compose.connect-popup-ci.yml (1 hunks)
  • docker/docker-compose.connect-popup-test.yml (1 hunks)
  • docker/docker-compose.connect-test.yml (1 hunks)
  • docker/docker-compose.connect-webextension-test.yml (1 hunks)
  • docker/docker-compose.suite-ci-pw.yml (1 hunks)
  • docker/docker-compose.suite-ci.yml (1 hunks)
  • docker/docker-compose.suite-desktop-ci.yml (1 hunks)
  • docker/docker-compose.suite-dev.yml (1 hunks)
  • docker/docker-compose.suite-native-ci.yml (1 hunks)
  • docker/docker-compose.suite-test.yml (1 hunks)
  • docker/docker-compose.transport-test-ci.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (12)
  • .github/workflows/test-trezor-user-env-link-e2e.yml
  • docker/docker-compose.suite-native-ci.yml
  • docker/docker-compose.transport-test-ci.yml
  • docker/docker-compose.suite-desktop-ci.yml
  • docker/docker-compose.suite-ci.yml
  • docker/docker-compose.suite-ci-pw.yml
  • docker/docker-compose.suite-test.yml
  • docker/docker-compose.connect-popup-ci.yml
  • docker/docker-compose.connect-popup-test.yml
  • docker/docker-compose.connect-webextension-test.yml
  • docker/docker-compose.suite-dev.yml
  • docker/docker-compose.connect-test.yml
⏰ Context from checks skipped due to timeout of 90000ms (13)
  • GitHub Check: PR-check / node-authorizeCoinjoin cancelCoinjoinAuthorization passphrase unlockPath setBusy checkFirmwareAuthenticity keepSession cancel.test info.test resetDevice-api
  • GitHub Check: PR-check / node-override init-api-flaky
  • GitHub Check: PR-check / web-override init-api-flaky
  • GitHub Check: PR-check / web-authorizeCoinjoin cancelCoinjoinAuthorization passphrase unlockPath setBusy checkFirmwareAuthenticity keepSession cancel.test info.test resetDevice-api
  • GitHub Check: build-deploy
  • GitHub Check: e2e-test-trezor-user-env-link
  • GitHub Check: transport-e2e-test
  • GitHub Check: Setup and Cache Dependencies
  • GitHub Check: Socket Security: Project Report
  • GitHub Check: Analyze with CodeQL (javascript)
  • GitHub Check: build-web
  • GitHub Check: build-web
  • GitHub Check: Socket Security: Pull Request Alerts

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

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: 0

🔭 Outside diff range comments (1)
packages/suite-desktop-core/e2e/tests/onboarding/t2t1/t2t1-create-wallet.test.ts (1)

45-45: 🛠️ Refactor suggestion

Add more assertions for comprehensive validation.

The test currently only verifies PIN button visibility. Consider adding assertions to validate:

  • Successful creation of 3 shares
  • Correct threshold configuration (2-of-3)
  • Complete backup process verification

Example assertions to add:

await expect(page.getByTestId('@backup/shares-count')).toHaveText('3');
await expect(page.getByTestId('@backup/threshold-count')).toHaveText('2');
await expect(page.getByTestId('@backup/success-screen')).toBeVisible();
🧹 Nitpick comments (1)
packages/suite-desktop-core/e2e/tests/onboarding/t2t1/t2t1-create-wallet.test.ts (1)

16-46: Consider enhancing test coverage.

While the test covers the happy path for Shamir backup creation with a 3-of-2 scheme, consider adding tests for:

  • Edge cases (minimum/maximum shares/threshold)
  • Error scenarios (user cancellation, device disconnection)
  • Recovery verification

Would you like me to help create additional test cases to improve coverage?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8e728c and e70a5c4.

📒 Files selected for processing (14)
  • .github/workflows/test-trezor-user-env-link-e2e.yml (1 hunks)
  • docker/docker-compose.connect-popup-ci.yml (1 hunks)
  • docker/docker-compose.connect-popup-test.yml (1 hunks)
  • docker/docker-compose.connect-test.yml (1 hunks)
  • docker/docker-compose.connect-webextension-test.yml (1 hunks)
  • docker/docker-compose.suite-ci-pw.yml (1 hunks)
  • docker/docker-compose.suite-ci.yml (1 hunks)
  • docker/docker-compose.suite-desktop-ci.yml (1 hunks)
  • docker/docker-compose.suite-dev.yml (1 hunks)
  • docker/docker-compose.suite-native-ci.yml (1 hunks)
  • docker/docker-compose.suite-test.yml (1 hunks)
  • docker/docker-compose.transport-test-ci.yml (1 hunks)
  • packages/suite-desktop-core/e2e/tests/onboarding/t2t1/t2t1-create-wallet.test.ts (1 hunks)
  • submodules/trezor-common (1 hunks)
✅ Files skipped from review due to trivial changes (11)
  • docker/docker-compose.connect-test.yml
  • docker/docker-compose.suite-desktop-ci.yml
  • submodules/trezor-common
  • docker/docker-compose.suite-native-ci.yml
  • docker/docker-compose.suite-test.yml
  • docker/docker-compose.suite-ci.yml
  • docker/docker-compose.suite-ci-pw.yml
  • docker/docker-compose.connect-webextension-test.yml
  • docker/docker-compose.connect-popup-ci.yml
  • docker/docker-compose.connect-popup-test.yml
  • docker/docker-compose.transport-test-ci.yml
⏰ Context from checks skipped due to timeout of 90000ms (13)
  • GitHub Check: Other Checks
  • GitHub Check: Releases revision Checks
  • GitHub Check: Type Checking
  • GitHub Check: Build libs for publishing
  • GitHub Check: Linting and formatting
  • GitHub Check: Unit Tests
  • GitHub Check: PR-check / node-authorizeCoinjoin cancelCoinjoinAuthorization passphrase unlockPath setBusy checkFirmwareAuthenticity keepSession cancel.test info.test resetDevice-api
  • GitHub Check: PR-check / web-override init-api-flaky
  • GitHub Check: PR-check / node-override init-api-flaky
  • GitHub Check: PR-check / web-authorizeCoinjoin cancelCoinjoinAuthorization passphrase unlockPath setBusy checkFirmwareAuthenticity keepSession cancel.test info.test resetDevice-api
  • GitHub Check: build-web
  • GitHub Check: e2e-test-trezor-user-env-link
  • GitHub Check: Analyze with CodeQL (javascript)
🔇 Additional comments (3)
packages/suite-desktop-core/e2e/tests/onboarding/t2t1/t2t1-create-wallet.test.ts (1)

4-14:

❓ Verification inconclusive

LGTM! Test suite re-enabled with proper setup.

The test suite is now active and correctly configured with:

  • Latest T2T1 emulator
  • Clean device state (wiped before tests)
  • Appropriate test environment setup

Please verify the compatibility with the new tenv image by running:


🏁 Script executed:

#!/bin/bash
# Description: Check if the new tenv image supports T2T1 emulator and Shamir backup

# Get the tenv image version from docker-compose files
tenv_image=$(fd -t f docker-compose.yml -x grep -l trezor-user-env-unix {} \; | xargs cat | grep "trezor-user-env-unix:" -A 1 | grep image | head -1)

# Check if the image exists and can be pulled
docker pull $tenv_image

# Verify T2T1 emulator and Shamir backup support
docker run --rm $tenv_image trezorctl version

Length of output: 402


Attention: Manual Verification Required
The test suite re-enabling looks properly set up (with the latest T2T1 emulator configuration, clean device state, and correct environment settings). However, the automated verification of compatibility with the new tenv image failed because the required docker command wasn’t available (as shown in the error output).

  • Action Required: Please manually verify the tenv image compatibility to ensure it supports the T2T1 emulator and Shamir backup test, using the appropriate environment where docker is installed.
.github/workflows/test-trezor-user-env-link-e2e.yml (1)

39-39: Confirm Docker Image Tag Update.
The Docker run command now uses the updated image tag dadc035aa0c121140dba0991ec6abdb786e18406 as expected from the tenv update. Ensure this tag is consistent with other configuration files and reflects the correct build from the related trezor-user-env PR.

docker/docker-compose.suite-dev.yml (1)

7-7: Verify Updated Docker Image in Service Definition.
The trezor-user-env-unix service now references the new image tag dadc035aa0c121140dba0991ec6abdb786e18406. This update aligns with the tenv image update detailed in the PR objectives. Confirm across all environments that this change will not cause compatibility issues with other services.

@mroz22
Copy link
Contributor

mroz22 commented Feb 24, 2025

changes in submodules, expected?

@grdddj
Copy link
Contributor Author

grdddj commented Feb 25, 2025

changes in submodules, expected?

No, my bad, force-pushed. Thanks for noticing

@mroz22 mroz22 merged commit a1198ab into develop Feb 25, 2025
41 of 43 checks passed
@mroz22 mroz22 deleted the tenv-update branch February 25, 2025 08:16
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.

2 participants