Skip to content

Remove deprecated state properties from license management's store

The license_management store seems to contain a few state properties that we don't use anywhere in the app. Let's make sure that those properties are in fact obsolete and can be safely removed.

isDeleting

A quick search seems to show that we're only changing this property's value via mutations, without ever using it:

$ find ./ee/app/assets/javascripts | grep -E 'license.*\.(vue|js)$' | ack -x isDeleting
./ee/app/assets/javascripts/vue_shared/license_management/store/mutations.js
67:      isDeleting: false,
73:      isDeleting: false,
79:      isDeleting: true,

./ee/app/assets/javascripts/vue_shared/license_management/store/state.js
7:  isDeleting: false,

isSaving

We can perform the same kind of search to check where this is used:

$ find ./ee/app/assets/javascripts | grep -E 'license.*\.(vue|js)$' | ack -x isSaving
./ee/app/assets/javascripts/vue_shared/license_management/store/mutations.js
84:      isSaving: true,
89:      isSaving: false,
95:      isSaving: false,

./ee/app/assets/javascripts/vue_shared/license_management/store/state.js
11:  isSaving: false,

loadManagedLicensesError

This one isn't used either, but it may be a sign that we need to improve our error handling.

$ find ./ee/app/assets/javascripts | grep -E 'license.*\.(vue|js)$' | ack -x loadManagedLicensesError
./ee/app/assets/javascripts/vue_shared/license_management/store/mutations.js
29:      loadManagedLicensesError: false,
36:      loadManagedLicensesError: error,

./ee/app/assets/javascripts/vue_shared/license_management/store/state.js
12:  loadManagedLicensesError: false,

/cc @gitlab-org/secure/frontend

Edited by Nicole Schwartz