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

Prefer MiqProductFeature cache invalidation explicitly via backend #7430

Merged
merged 1 commit into from
Nov 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -2366,7 +2366,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