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

Bug 1997131: Add Installed badge and update the alert content for upgrading task #9867

Merged

Conversation

karthikjeeyar
Copy link
Contributor

@karthikjeeyar karthikjeeyar commented Aug 24, 2021

Fixes:

https://issues.redhat.com/browse/ODC-6269

Analysis / Root cause:

Update the content of quicksearch modal as per final design.

Solution Description:

  1. Add Installed badge in the dropdown and besides version dropdown
  2. Update the upgrade task alert content.
  3. Disable if there is only one entry in the version dropdown.

Screen shots / Gifs for design review:

Installed_badge_and_alert_content

image

Unit test coverage report:

 pipelineQuickSearchDetails
    Installed badge tests
      ✓ should show the installed badge for the cluster task (85ms)
      ✓ should show the installed badge for the installed tekton hub task (46ms)
      ✓ should not show the installed badge for the uninstalled tekton hub task (48ms)
    CTA button tests
      ✓ should show the Add button for already installed task (222ms)
      ✓ should show the Install and add button for uninstalled tekton hub task (167ms)
      ✓ should show the Update and add button for already installed task (561ms)
    Version dropdown tests
      ✓ should show the version dropdown if the versions are available (29ms)
      ✓ should not show the version dropdown if the versions are not available (28ms)
    Category labels
      ✓ should show the category labels if the categories are available (28ms)
      ✓ should not show the category labels if the categories are not available (37ms)
    Tag labels
      ✓ should show the tag labels if the tag are available (24ms)
      ✓ should not show the tag labels if the tags are not available (21ms)

Test setup:

  1. Install OSP and go to pipeline builder
  2. click on Add task button

Browser conformance:

@openshift-ci openshift-ci bot added component/core Related to console core functionality component/pipelines Related to pipelines-plugin kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Aug 24, 2021
@karthikjeeyar
Copy link
Contributor Author

cc: @vikram-raj @andrewballantyne

@karthikjeeyar karthikjeeyar changed the title Add Installed badge and update the alert content for upgrading task Bug 1997131: Add Installed badge and update the alert content for upgrading task Aug 24, 2021
@karthikjeeyar
Copy link
Contributor Author

/bugzilla refresh
/kind bug

1 similar comment
@karthikjeeyar
Copy link
Contributor Author

/bugzilla refresh
/kind bug

@openshift-ci openshift-ci bot added kind/bug Categorizes issue or PR as related to a bug. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. labels Aug 24, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 24, 2021

@karthikjeeyar: This pull request references Bugzilla bug 1997131, which is valid.

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

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (gamore@redhat.com), skipping review request.

In response to this:

/bugzilla refresh
/kind bug

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 24, 2021

@karthikjeeyar: This pull request references Bugzilla bug 1997131, which is valid.

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

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (gamore@redhat.com), skipping review request.

In response to this:

/bugzilla refresh
/kind bug

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.

@openshift-ci openshift-ci bot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 24, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 24, 2021

@karthikjeeyar: An error was encountered querying GitHub for users with public email (gamore@redhat.com) for bug 1997131 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. non-200 OK status code: 403 Forbidden body: "{\n \"documentation_url\": \"https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#secondary-rate-limits\",\n \"message\": \"You have exceeded a secondary rate limit. Please wait a few minutes before you try again.\"\n}\n"

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1997131: Add Installed badge and update the alert content for upgrading task

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.

Copy link

@bgliwa01 bgliwa01 left a comment

Choose a reason for hiding this comment

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

lgtm

isOpen={isOpen}
toggle={
<DropdownToggle data-test={'task-version-toggle'} onToggle={toggleIsOpen}>
{versionItems[selectedVersion]}
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be undefined, no? Line 21 says:

  const versions = item?.attributes?.versions ?? [];

So when it's converted to an object, it could be missing the selectedVersion "id" -- this would make the toggle empty, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have a check in the caller, so it only renders this VersionDropdown component if its has some value.Now updated to return early if there are no versions available.

frontend/public/locales/en/public.json Outdated Show resolved Hide resolved
Copy link
Contributor

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

Some additional comments on the tests

});
});

test('should show the installed badge for the installed tekton hub task', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Odd haha, you switched between it and test are they not aliases of the same function? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, its same, will switch back to it for consistency.

};
const { getByRole, queryByTestId } = render(
<PipelineQuickSearchDetails
{...{ ...tektonHubProps, selectedItem: installedTektonHubTask }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment here about props

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 26, 2021

@karthikjeeyar: This pull request references Bugzilla bug 1997131, which is valid.

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

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (gamore@redhat.com), skipping review request.

In response to this:

Bug 1997131: Add Installed badge and update the alert content for upgrading task

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.

Copy link
Member

@vikram-raj vikram-raj left a comment

Choose a reason for hiding this comment

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

Thanks @karthikjeeyar, Verified the changes. And it works as expected.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2021
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2021
Copy link
Contributor

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 26, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, bgliwa01, karthikjeeyar, vikram-raj

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 Aug 26, 2021
@openshift-merge-robot openshift-merge-robot merged commit c97455c into openshift:master Aug 26, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 26, 2021

@karthikjeeyar: All pull requests linked via external trackers have merged:

Bugzilla bug 1997131 has been moved to the MODIFIED state.

In response to this:

Bug 1997131: Add Installed badge and update the alert content for upgrading task

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.

@spadgett spadgett added this to the v4.9 milestone Aug 30, 2021
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. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/core Related to console core functionality component/pipelines Related to pipelines-plugin kind/bug Categorizes issue or PR as related to a bug. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated 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

6 participants