console icon indicating copy to clipboard operation
console copied to clipboard

CONSOLE-4912: update machine config tests

Open yapei opened this issue 1 month ago • 26 comments

  • Update machine-config.cy.ts to check exact content and more details

yapei avatar Nov 24 '25 08:11 yapei

@yapei: This pull request references CONSOLE-4912 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.21.0" version, but no target version was set.

In response to this:

  • Update machine-config.cy.ts to check exact content and more details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Nov 24 '25 08:11 openshift-ci-robot

Walkthrough

Added a Cypress helper to validate machine-config file details, extended a test to fetch machine-config contents via an oc JSONPath query and verify them in the UI, added an afterEach error check, closed the guided tour in test setup, replaced a hardcoded Info ARIA label with a translated string, and moved the "Info" key in the English locale JSON.

Changes

Cohort / File(s) Summary
Cypress test enhancements
frontend/packages/integration-tests-cypress/tests/app/machine-config.cy.ts
Added checkMachineConfigDetails(mode, overwrite, content) to open the info panel and assert mode, overwrite, and a decoded/truncated snippet of content; added test steps to run oc get mc <MC_WITH_CONFIG_FILES> -o jsonpath='{.spec.config.storage.files[0]}', parse source, mode, overwrite, and pass them to the helper; invoked guidedTour.close() in setup; added afterEach to call checkErrors().
UI i18n tweak
frontend/public/components/machine-config.tsx
Replaced a hardcoded Info ARIA label with t('public~Info') using the existing useTranslation hook.
Locale ordering change
frontend/public/locales/en/public.json
Moved the "Info": "Info" entry within the file (removed prior occurrence and added it after "Overwrite"), preserving the translation key but changing its position.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify the oc get ... -o jsonpath invocation and JSON parsing handle missing or differently-shaped spec.config.storage.files[0] payloads.
  • Confirm the decoding/truncation used by checkMachineConfigDetails() matches the UI rendering and encoding expectations.
  • Ensure the guided tour close and afterEach checkErrors() play correctly with other tests and cleanup behavior.
✨ Finishing touches
  • [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 24 '25 08:11 coderabbitai[bot]

@rhamilto could you help give a review? Thanks! e2e-gcp-console is failing at other tests, app/machine-config.cy.ts are passing though Screenshot 2025-11-25 at 2 24 20 PM

yapei avatar Nov 25 '25 06:11 yapei

@logonoff comments resolved ~ PTAL, thanks!

yapei avatar Nov 27 '25 12:11 yapei

flaky test

Enable dev perspective: P-01-TC04: Enable dev perspective Enable dev perspective: P-01-TC04 

/retest-required

yapei avatar Nov 28 '25 01:11 yapei

/retest-required

yapei avatar Dec 01 '25 01:12 yapei

/verified by CI

yapei avatar Dec 01 '25 01:12 yapei

@yapei: This PR has been marked as verified by CI.

In response to this:

/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Dec 01 '25 01:12 openshift-ci-robot

/retest-required

yapei avatar Dec 03 '25 01:12 yapei

/retest-required

yapei avatar Dec 05 '25 01:12 yapei

/label acknowledge-critical-fixes-only /label docs-apporved

yapei avatar Dec 08 '25 00:12 yapei

@yapei: The label(s) /label docs-apporved cannot be applied. These labels are supported: acknowledge-critical-fixes-only, platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, ux-approved, no-qe, downstream-change-needed, rebase/manual, cluster-config-api-changed, run-integration-tests, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, ok-to-test, plugin-api-approved, plugin-api-changed, stability-fix-approved, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to this:

/label acknowledge-critical-fixes-only /label docs-apporved

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

openshift-ci[bot] avatar Dec 08 '25 00:12 openshift-ci[bot]

/label px-approved /label docs-approved

logonoff avatar Dec 08 '25 01:12 logonoff

/retest-required

Remaining retests: 0 against base HEAD 370e6b0c82e414a473fb3fb30ede556d9b92aee4 and 2 for PR HEAD 1427c04d69975dd234b700614948f7d823ebe757 in total

openshift-ci-robot avatar Dec 08 '25 05:12 openshift-ci-robot

/retest-required

yapei avatar Dec 09 '25 02:12 yapei

/retest-required

Remaining retests: 0 against base HEAD 2db4d6278e766aee65982a8d49ecdd5286438511 and 1 for PR HEAD 1427c04d69975dd234b700614948f7d823ebe757 in total

openshift-ci-robot avatar Dec 09 '25 10:12 openshift-ci-robot

/retest-required

Remaining retests: 0 against base HEAD d93076f2c6250e13f0f9d05ad1e1d5dd22910e75 and 0 for PR HEAD 1427c04d69975dd234b700614948f7d823ebe757 in total

openshift-ci-robot avatar Dec 09 '25 18:12 openshift-ci-robot

/hold

Revision 1427c04d69975dd234b700614948f7d823ebe757 was retested 3 times: holding

openshift-ci-robot avatar Dec 09 '25 22:12 openshift-ci-robot

/retest-required

yapei avatar Dec 15 '25 01:12 yapei

/lgtm

logonoff avatar Dec 17 '25 01:12 logonoff

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, yapei

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Dec 17 '25 01:12 openshift-ci[bot]

/retest-required

yapei avatar Dec 17 '25 07:12 yapei

Screenshot 2025-12-17 at 3 04 16 PM

/verified by CI

yapei avatar Dec 17 '25 07:12 yapei

@yapei: This PR has been marked as verified by CI.

In response to this:

Screenshot 2025-12-17 at 3 04 16 PM

/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Dec 17 '25 07:12 openshift-ci-robot

/test okd-scos-images

yapei avatar Dec 18 '25 01:12 yapei

/test okd-scos-images

yapei avatar Dec 30 '25 03:12 yapei

@yapei: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-images 48380cd7a8ff34bc00871d6a830eef06b69e932c link true /test okd-scos-images

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Dec 30 '25 04:12 openshift-ci[bot]