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

Refactor hacbs folder and merge into src #281

Merged
merged 8 commits into from
Dec 16, 2022

Conversation

jeff-phillips-18
Copy link
Member

Fixes

Fixes HAC-2493

Description

Move HACBS code up into src directory. Remove hacbs specificity on local storage items. Remove hacbs css prefix.

A few components were left in the hacbs directory due to naming conflicts. These components need to get resolved to be the same component regardless of the feature flag (that is, the component should look the same), waiting on UX to determine the common look of these components.

Type of change

  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)

@jeff-phillips-18
Copy link
Member Author

/cc @christianvogt

@codecov
Copy link

codecov bot commented Dec 12, 2022

Codecov Report

Merging #281 (a793686) into main (46a0be0) will increase coverage by 0.13%.
The diff coverage is 91.17%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #281      +/-   ##
==========================================
+ Coverage   73.29%   73.42%   +0.13%     
==========================================
  Files         434      436       +2     
  Lines        9163     9159       -4     
  Branches     2447     2446       -1     
==========================================
+ Hits         6716     6725       +9     
+ Misses       2309     2296      -13     
  Partials      138      138              
Impacted Files Coverage Δ
src/__data__/pipelinerun-data.ts 100.00% <ø> (ø)
...ApplicationDetails/ApplicationQuickstartContent.ts 100.00% <ø> (ø)
...ApplicationDetails/tabs/ApplicationOverviewTab.tsx 100.00% <ø> (ø)
...onents/ApplicationDetails/tabs/PipelineRunsTab.tsx 80.00% <ø> (ø)
...ew/sections/__data__/WorkflowBuildPipelinesData.ts 100.00% <ø> (ø)
...erview/sections/__data__/WorkflowComponentsData.ts 100.00% <ø> (ø)
...view/sections/__data__/WorkflowEnvironmentsData.ts 100.00% <ø> (ø)
...w/sections/__data__/WorkflowIntegrationTestData.ts 100.00% <ø> (ø)
...view/sections/__data__/WorkflowReleasePlansData.ts 100.00% <ø> (ø)
...overview/sections/__data__/WorkflowReleasesData.ts 100.00% <ø> (ø)
... and 156 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46a0be0...a793686. Read the comment docs.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 14, 2022
@@ -11,10 +11,10 @@ import {
AlertActionLink,
Copy link
Contributor

Choose a reason for hiding this comment

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

We already have src/components/modal, should we move modals there instead of having two modal and Modals directories?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was trying to leave conflicts out of this PR. There are 2 GettingStartedModal components, one for app-studio, one for hacbs. When we do the work to resolve this we can combine the directories.

import { useGitOpsDeploymentCR } from '../../../../hooks/useGitOpsDeploymentCR';
import { ComponentGroupVersionKind } from '../../../../models';
import { PipelineRunGroupVersionKind } from '../../../../shared';
import { WatchK8sResource } from '../../../dynamic-plugin-sdk';
Copy link
Contributor

Choose a reason for hiding this comment

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

Not important, but I think we no longer need the dynamic-plugin-sdk.ts file. All sdk types are now available in @openshift/dynamic-plugin-sdk-utils.

Copy link
Member Author

Choose a reason for hiding this comment

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

Trying hard not to mix in other types of rework/refactoring

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 15, 2022
HACBS_ENTERPRISE_CONTRACT_INFO_LINK,
HACBS_ENTERPRISE_CONTRACT_POLICIES_DATA,
} from './const';
import { EnterpriseContractPolicyGroupVersionKind } from '../models';
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't these components also go inside src/components?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, I must have moved it incorrectly

@@ -13,12 +13,12 @@ import {
} from '@patternfly/react-core';
import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
import { SearchIcon } from '@patternfly/react-icons/dist/js/icons';
import { useModalLauncher } from '../../../components/modal/ModalProvider';
import { useNamespace } from '../../../utils/namespace-context-utils';
import { IntegrationTestScenarioGroupVersionKind } from '../../models';
Copy link
Contributor

Choose a reason for hiding this comment

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

I see IntegrationTest, IntegrationTestForm and IntegrationTestListView, maybe all the integration tests related components can go into one IntegrationTest folder?

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2022

@jeff-phillips-18: all tests passed!

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/test-infra repository. I understand the commands that are listed here.

@karthikjeeyar
Copy link
Contributor

/retest

@karthikjeeyar
Copy link
Contributor

LGTM! Seems like the e2e failures happens in all the open PRs

Copy link
Contributor

@rohitkrai03 rohitkrai03 left a comment

Choose a reason for hiding this comment

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

@jeff-phillips-18 The hacbs=false flag doesn't work anymore for switching to old app studio UI. Apart from that everything seems to be working fine.

Edit - False alarm. It does work after a few refreshes.

@sahil143
Copy link
Contributor

LGTM!

@@ -44,7 +44,7 @@ type Level = {
footerButton: { title: string; cta: any };
};

export const LOCAL_STORAGE_KEY = 'hacbs/getting-started-modal';
export const LOCAL_STORAGE_KEY = 'getting-started-modal';
Copy link
Contributor

Choose a reason for hiding this comment

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

The app studio modal is also using the same local storage key.

Copy link
Contributor

Choose a reason for hiding this comment

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

@rottencandy There is a ticket and a PR to remove GettingStartedModals completely. So i think we should fine with this now

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay sounds good

Copy link
Contributor

Choose a reason for hiding this comment

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

This might be the reason why e2e tests are getting stuck on getting started modal.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can put it back for now and let it be removed if/when they are completely removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

This might be the reason why e2e tests are getting stuck on getting started modal.

No, when i checked locally cypress is able to click on the Create Application button behind the modal and proceeded with the flow. I think the issue is, Applications is not loading in the ephemeral env, you can see this issue in Abhi's PR where he removed this modal completely but still e2e is failing with that error

image

@christianvogt
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 16, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, jeff-phillips-18

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 16, 2022
@karthikjeeyar
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 16, 2022
@rohitkrai03 rohitkrai03 merged commit aec3f1c into openshift:main Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants