openshift / console

OpenShift Cluster Console UI
https://www.openshift.org
Apache License 2.0
401 stars 613 forks source link

OCPBUGS-44576: Address circular references in `@console/internal` #14500

Closed logonoff closed 3 days ago

logonoff commented 6 days ago

Fixes:

Fixes: https://issues.redhat.com/browse/OCPBUGS-44576

Analysis / Root cause:

Barrel imports / large files caused circular references

Solution Description:

Replace index.ts/barrel imports with their direct counterparts, split up some large files

Screen shots / Gifs for design review:

n/a

Unit test coverage report:

n/a

Test setup:

Run yarn check-cycles and observe that there are no more cycles involving pubic folder, excluding cycles with module paths that match the regex /node_modules|public\/dist|@console\/active-plugins/ (those will be addressed in separate PRs), and excluding these cycles (because they are false positives)

openshift/console/frontend/public/tokener.html
  public/tokener.html
  public/tokener.html

openshift/console/frontend/public/index.html
  public/index.html
  public/index.html

openshift/console/frontend/public/actions/features.gql
  public/actions/features.gql
  public/actions/features.gql

openshift/console/frontend/public/graphql/client.gql
  public/graphql/client.gql
  public/graphql/client.gql

Browser conformance:

This PR also closes OCPBUGS-44017

openshift-ci-robot commented 6 days ago

@logonoff: This pull request references Jira Issue OCPBUGS-44576, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug * bug is open, matching expected state (open) * bug target version (4.18.0) matches configured target version for branch (4.18.0) * bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact: /cc @yapei

The bug has been updated to refer to the pull request using the external bug tracker.

In response to [this](https://github.com/openshift/console/pull/14500): >**Fixes**: > >Fixes: https://issues.redhat.com/browse/OCPBUGS-44576 > >**Analysis / Root cause**: > >Barrel imports / large files caused circular references > >**Solution Description**: > >Replace `index.ts`/barrel imports with their direct counterparts, split up some large files > >**Screen shots / Gifs for design review**: > >n/a > >**Unit test coverage report**: > >n/a > >**Test setup:** > >Run `yarn check-cycles` and observe that there are no more cycles involving `pubic` folder, excluding cycles with module paths that match the regex `/node_modules|public\/dist|@console\/active-plugins/` (those will be addressed in separate PRs), and excluding these cycles (because they are false positives) > >``` >openshift/console/frontend/public/tokener.html > public/tokener.html > public/tokener.html > >openshift/console/frontend/public/index.html > public/index.html > public/index.html > >openshift/console/frontend/public/actions/features.gql > public/actions/features.gql > public/actions/features.gql > >openshift/console/frontend/public/graphql/client.gql > public/graphql/client.gql > public/graphql/client.gql >``` > > > >**Browser conformance**: > >- [ ] Chrome >- [ ] Firefox >- [ ] Safari > >This is 1 of many PRs to inch towards closing [OCPBUGS-44017](https://issues.redhat.com/browse/OCPBUGS-44017) Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
logonoff commented 6 days ago

/hold

depends on this to be merged since masthead-branding.ts uses the ESM-style imported logos

logonoff commented 6 days ago

/unhold

logonoff commented 6 days ago

for code review:

/cc @spadgett

logonoff commented 6 days ago

/retest

openshift-ci-robot commented 4 days ago

@logonoff: This pull request references Jira Issue OCPBUGS-44576, which is valid.

3 validation(s) were run on this bug * bug is open, matching expected state (open) * bug target version (4.18.0) matches configured target version for branch (4.18.0) * bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact: /cc @yapei

The bug has been updated to refer to the pull request using the external bug tracker.

In response to [this](https://github.com/openshift/console/pull/14500): >**Fixes**: > >Fixes: https://issues.redhat.com/browse/OCPBUGS-44576 > >**Analysis / Root cause**: > >Barrel imports / large files caused circular references > >**Solution Description**: > >Replace `index.ts`/barrel imports with their direct counterparts, split up some large files > >**Screen shots / Gifs for design review**: > >n/a > >**Unit test coverage report**: > >n/a > >**Test setup:** > >Run `yarn check-cycles` and observe that there are no more cycles involving `pubic` folder, excluding cycles with module paths that match the regex `/node_modules|public\/dist|@console\/active-plugins/` (those will be addressed in separate PRs), and excluding these cycles (because they are false positives) > >``` >openshift/console/frontend/public/tokener.html > public/tokener.html > public/tokener.html > >openshift/console/frontend/public/index.html > public/index.html > public/index.html > >openshift/console/frontend/public/actions/features.gql > public/actions/features.gql > public/actions/features.gql > >openshift/console/frontend/public/graphql/client.gql > public/graphql/client.gql > public/graphql/client.gql >``` > > > >**Browser conformance**: > >- [ ] Chrome >- [ ] Firefox >- [ ] Safari > >This PR also closes [OCPBUGS-44017](https://issues.redhat.com/browse/OCPBUGS-44017) Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci-robot commented 3 days ago

/retest-required

Remaining retests: 0 against base HEAD cb576e516621bf0dcb6d5276848f03623676e4b7 and 2 for PR HEAD 8823265bb20cc179322011db7160ce224a6833b0 in total

openshift-ci[bot] commented 3 days ago

[APPROVALNOTIFIER] This PR is APPROVED

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

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: - ~~[frontend/OWNERS](https://github.com/openshift/console/blob/master/frontend/OWNERS)~~ [spadgett] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
logonoff commented 3 days ago

/retest

openshift-ci[bot] commented 3 days ago

@logonoff: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-ci-robot commented 3 days ago

@logonoff: Jira Issue OCPBUGS-44576: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-44576 has been moved to the MODIFIED state.

In response to [this](https://github.com/openshift/console/pull/14500): >**Fixes**: > >Fixes: https://issues.redhat.com/browse/OCPBUGS-44576 > >**Analysis / Root cause**: > >Barrel imports / large files caused circular references > >**Solution Description**: > >Replace `index.ts`/barrel imports with their direct counterparts, split up some large files > >**Screen shots / Gifs for design review**: > >n/a > >**Unit test coverage report**: > >n/a > >**Test setup:** > >Run `yarn check-cycles` and observe that there are no more cycles involving `pubic` folder, excluding cycles with module paths that match the regex `/node_modules|public\/dist|@console\/active-plugins/` (those will be addressed in separate PRs), and excluding these cycles (because they are false positives) > >``` >openshift/console/frontend/public/tokener.html > public/tokener.html > public/tokener.html > >openshift/console/frontend/public/index.html > public/index.html > public/index.html > >openshift/console/frontend/public/actions/features.gql > public/actions/features.gql > public/actions/features.gql > >openshift/console/frontend/public/graphql/client.gql > public/graphql/client.gql > public/graphql/client.gql >``` > > > >**Browser conformance**: > >- [ ] Chrome >- [ ] Firefox >- [ ] Safari > >This PR also closes [OCPBUGS-44017](https://issues.redhat.com/browse/OCPBUGS-44017) Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-bot commented 3 days ago

[ART PR BUILD NOTIFIER]

Distgit: openshift-enterprise-console This PR has been included in build openshift-enterprise-console-container-v4.18.0-202411191206.p0.g9d35cf2.assembly.stream.el9. All builds following this will include this PR.