Skip to content

Commit

Permalink
Merge pull request #7430 from skateman/invalidate-caches-cleanup
Browse files Browse the repository at this point in the history
Prefer MiqProductFeature cache invalidation explicitly via backend
  • Loading branch information
Fryguy authored Nov 16, 2020
2 parents e31123c + 9ec2173 commit 0716d42
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 16 deletions.
5 changes: 0 additions & 5 deletions app/controllers/ops_controller/ops_rbac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ def role_allows?(**options)
super(options)
end

def invalidate_miq_product_feature_caches
MiqProductFeature.invalidate_caches
render :json => {}
end

# Edit user or group tags
def rbac_tags_edit
case params[:button]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const OpsTenantForm = ({
const save = (values, method, url, message) => {
miqSparkleOn();
return API[method](url, values, { skipErrors: [400] })
.then(() => http.post('/ops/invalidate_miq_product_feature_caches', {}))
.then(() => miqRedirectBack(message, 'success', redirectUrl))
.catch((...args) => {
miqSparkleOff();
Expand Down
2 changes: 0 additions & 2 deletions app/javascript/spec/ops-tenant-form/ops-tenant-form.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ describe('OpstTenantForm', () => {
resources: [],
});
fetchMock.postOnce('/api/tenants', {});
fetchMock.postOnce('/ops/invalidate_miq_product_feature_caches', {});
const wrapper = mount(<OpsTenantForm {...initialProps} />);
wrapper.find('input').at(0).simulate('change', { target: { value: 'foo' } });
wrapper.find('input').at(1).simulate('change', { target: { value: 'bar' } });
Expand Down Expand Up @@ -210,7 +209,6 @@ describe('OpstTenantForm', () => {
resources: [],
});
fetchMock.putOnce('/api/tenants/123', {});
fetchMock.postOnce('/ops/invalidate_miq_product_feature_caches', {});
let wrapper;
await act(async() => {
wrapper = mount(<OpsTenantForm {...initialProps} recordId={123} />);
Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2449,7 +2449,6 @@
forest_form_field_changed
forest_select
help_menu_form_field_changed
invalidate_miq_product_feature_caches
label_tag_mapping_delete
label_tag_mapping_edit
label_tag_mapping_update
Expand Down
7 changes: 0 additions & 7 deletions spec/controllers/ops_controller/ops_rbac_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
allow(controller).to receive(:data_for_breadcrumbs).and_return([{:title => "title", :action => "action", :key => "key"}])
end

it 'confirms existence of route and action with name invalidate_miq_product_feature_caches ' do
EvmSpecHelper.local_miq_server

post :invalidate_miq_product_feature_caches
expect(response.status).to eq(200)
end

describe "#rbac_edit_tags_reset" do
let(:admin_user) { FactoryBot.create(:user, :role => "super_administrator") }
let(:another_tenant) { FactoryBot.create(:tenant) }
Expand Down

0 comments on commit 0716d42

Please sign in to comment.