Skip to content
Snippets Groups Projects

Adds UI elements for deprecated packages

All threads resolved!

What does this MR do and why?

We added support for npm deprecate, so it'd be good to reflect that on the UI.

Although support exists only for npm package format atm, the frontend implementation ignores that since the backend plans to return this value via the existing status field, see decision.

Based on ux input,

  • Adds badge on package list page
  • Adds warning alert on package detail page

Changelog: added

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

After deprecation:

List page Details page
Screenshot_2024-10-24_at_11.12.31_PM Screenshot_2024-10-31_at_11.46.46_AM

How to set up and validate locally

  1. Create an npm package, follow steps in https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-create-a-new-package-artificially
  2. Apply patch since backend is still being worked on in #474231 (closed):
diff --git a/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_list_row.vue b/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_list_row.vue
index c5af8d304d10..3ce9f82cd0ba 100644
--- a/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_list_row.vue
+++ b/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_list_row.vue
@@ -92,7 +92,7 @@ export default {
       return this.packageEntity.protectionRuleExists;
     },
     showDeprecatedBadge() {
-      return this.packageEntity.status === PACKAGE_DEPRECATED_STATUS;
+      return this.packageEntity.status !== PACKAGE_DEPRECATED_STATUS;
     },
     nonDefaultRow() {
       return this.packageEntity.status && this.packageEntity.status !== PACKAGE_DEFAULT_STATUS;
diff --git a/app/assets/javascripts/packages_and_registries/package_registry/pages/details.vue b/app/assets/javascripts/packages_and_registries/package_registry/pages/details.vue
index 1d775728f353..d406999535af 100644
--- a/app/assets/javascripts/packages_and_registries/package_registry/pages/details.vue
+++ b/app/assets/javascripts/packages_and_registries/package_registry/pages/details.vue
@@ -194,7 +194,7 @@ export default {
       return this.packageType === PACKAGE_TYPE_NUGET;
     },
     showDeprecationAlert() {
-      return this.packageEntity.status === PACKAGE_DEPRECATED_STATUS;
+      return this.packageEntity.status !== PACKAGE_DEPRECATED_STATUS;
     },
     showFiles() {
       return this.packageType !== PACKAGE_TYPE_COMPOSER;
  1. Visit Group > Deploy > Package registry & Project > Deploy > Package registry This should show the list page & it should show a deprecated badge.
  2. Click on the package with the deprecated badge & confirm that alert is visible on the package details page.

Related to #474231 (closed)

Edited by Rahul Chanila

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Anna Vovchenko approved this merge request

    approved this merge request

  • requested review from @deepika.guliani

  • Deepika Guliani resolved all threads

    resolved all threads

  • Deepika Guliani approved this merge request

    approved this merge request

  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for bc58721e

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Create      | 129    | 0      | 22      | 0     | 151   | ✅     |
    | Package     | 17     | 0      | 18      | 0     | 35    | ✅     |
    | Verify      | 45     | 0      | 2       | 0     | 47    | ✅     |
    | Govern      | 75     | 0      | 3       | 0     | 78    | ✅     |
    | Fulfillment | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Plan        | 76     | 0      | 0       | 0     | 76    | ✅     |
    | Data Stores | 33     | 0      | 1       | 0     | 34    | ✅     |
    | Ai-powered  | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Monitor     | 8      | 0      | 0       | 0     | 8     | ✅     |
    | Manage      | 1      | 0      | 1       | 0     | 2     | ✅     |
    | Secure      | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Release     | 5      | 0      | 0       | 0     | 5     | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 397    | 0      | 48      | 0     | 445   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+

    e2e-test-on-cng: :x: test report for bc58721e

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Create      | 138    | 1      | 21      | 0     | 160   | ❌     |
    | Verify      | 50     | 0      | 15      | 0     | 65    | ✅     |
    | Govern      | 83     | 1      | 9       | 2     | 93    | ❌     |
    | Monitor     | 8      | 0      | 12      | 0     | 20    | ✅     |
    | Package     | 24     | 0      | 14      | 0     | 38    | ✅     |
    | Plan        | 86     | 0      | 8       | 0     | 94    | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Data Stores | 33     | 0      | 10      | 0     | 43    | ✅     |
    | Ai-powered  | 0      | 0      | 2       | 0     | 2     | ➖     |
    | Release     | 5      | 0      | 1       | 0     | 6     | ✅     |
    | Secure      | 1      | 0      | 6       | 0     | 7     | ✅     |
    | Configure   | 0      | 0      | 3       | 0     | 3     | ➖     |
    | Fulfillment | 2      | 0      | 7       | 0     | 9     | ✅     |
    | Growth      | 0      | 0      | 2       | 0     | 2     | ➖     |
    | Manage      | 1      | 0      | 9       | 0     | 10    | ✅     |
    | ModelOps    | 0      | 0      | 1       | 0     | 1     | ➖     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 433    | 2      | 120     | 2     | 555   | ❌     |
    +-------------+--------+--------+---------+-------+-------+--------+
  • Deepika Guliani enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • mentioned in commit 0da0cec3

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading