Skip to content
Snippets Groups Projects
Commit 5213b04f authored by Miguel Rincon's avatar Miguel Rincon
Browse files

Remove runner registration compatibility alert

We implemented an alert in 15.10 with the goal of giving users time to
update their runners to the latest 15.x and 16.x versions.

This alert served its purpose and can be removed.

Changelog: removed
parent feedd88c
No related branches found
No related tags found
1 merge request!148152Remove runner registration compatibility alert
Showing with 0 additions and 142 deletions
......@@ -3,7 +3,6 @@ import { createAlert, VARIANT_SUCCESS } from '~/alert';
import { visitUrl, setUrlParams } from '~/lib/utils/url_utility';
import { s__ } from '~/locale';
import RegistrationCompatibilityAlert from '~/ci/runner/components/registration/registration_compatibility_alert.vue';
import RunnerPlatformsRadioGroup from '~/ci/runner/components/runner_platforms_radio_group.vue';
import RunnerCreateForm from '~/ci/runner/components/runner_create_form.vue';
import { DEFAULT_PLATFORM, PARAM_KEY_PLATFORM, INSTANCE_TYPE } from '../constants';
......@@ -12,7 +11,6 @@ import { saveAlertToLocalStorage } from '../local_storage_alert/save_alert_to_lo
export default {
name: 'AdminNewRunnerApp',
components: {
RegistrationCompatibilityAlert,
RunnerPlatformsRadioGroup,
RunnerCreateForm,
},
......@@ -44,8 +42,6 @@ export default {
<div class="gl-mt-5">
<h1 class="gl-heading-1">{{ s__('Runners|New instance runner') }}</h1>
<registration-compatibility-alert :alert-key="$options.INSTANCE_TYPE" />
<p>
{{
s__(
......
<script>
import { GlLink, GlSprintf } from '@gitlab/ui';
import DismissibleFeedbackAlert from '~/vue_shared/components/dismissible_feedback_alert.vue';
import { s__ } from '~/locale';
import { CHANGELOG_URL } from '../../constants';
export default {
name: 'RegistrationCompatibilityAlert',
components: {
GlLink,
GlSprintf,
DismissibleFeedbackAlert,
},
props: {
alertKey: {
type: String,
required: true,
},
},
computed: {
alertFeatureName() {
return `new_runner_compatibility_${this.alertKey}`;
},
},
CHANGELOG_URL,
i18n: {
title: s__(
'Runners|This registration process is only supported in GitLab Runner 15.10 or later',
),
message: s__(
'Runners|This registration process is not supported in GitLab Runner 15.9 or earlier and only available as an experimental feature in GitLab Runner 15.10 and 15.11. You should upgrade to %{linkStart}GitLab Runner 16.0%{linkEnd} or later to use a stable version of this registration process.',
),
},
};
</script>
<template>
<dismissible-feedback-alert
:feature-name="alertFeatureName"
class="gl-mb-4"
variant="warning"
:title="$options.i18n.title"
>
<gl-sprintf :message="$options.i18n.message">
<template #link="{ content }">
<gl-link :href="$options.CHANGELOG_URL" target="_blank">{{ content }}</gl-link>
</template>
</gl-sprintf>
</dismissible-feedback-alert>
</template>
......@@ -4,7 +4,6 @@ import { visitUrl, setUrlParams } from '~/lib/utils/url_utility';
import { s__ } from '~/locale';
import { InternalEvents } from '~/tracking';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import RegistrationCompatibilityAlert from '~/ci/runner/components/registration/registration_compatibility_alert.vue';
import RunnerGoogleCloudOption from '~/ci/runner/components/runner_google_cloud_option.vue';
import RunnerPlatformsRadioGroup from '~/ci/runner/components/runner_platforms_radio_group.vue';
import RunnerCreateForm from '~/ci/runner/components/runner_create_form.vue';
......@@ -19,7 +18,6 @@ import { saveAlertToLocalStorage } from '../local_storage_alert/save_alert_to_lo
export default {
name: 'GroupNewRunnerApp',
components: {
RegistrationCompatibilityAlert,
RunnerGoogleCloudOption,
RunnerPlatformsRadioGroup,
RunnerCreateForm,
......@@ -69,8 +67,6 @@ export default {
<div class="gl-mt-5">
<h1 class="gl-heading-1">{{ s__('Runners|New group runner') }}</h1>
<registration-compatibility-alert :alert-key="groupId" />
<p>
{{
s__(
......
......@@ -4,7 +4,6 @@ import { visitUrl, setUrlParams } from '~/lib/utils/url_utility';
import { s__ } from '~/locale';
import { InternalEvents } from '~/tracking';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import RegistrationCompatibilityAlert from '~/ci/runner/components/registration/registration_compatibility_alert.vue';
import RunnerGoogleCloudOption from '~/ci/runner/components/runner_google_cloud_option.vue';
import RunnerPlatformsRadioGroup from '~/ci/runner/components/runner_platforms_radio_group.vue';
import RunnerCreateForm from '~/ci/runner/components/runner_create_form.vue';
......@@ -20,7 +19,6 @@ import { saveAlertToLocalStorage } from '../local_storage_alert/save_alert_to_lo
export default {
name: 'ProjectNewRunnerApp',
components: {
RegistrationCompatibilityAlert,
RunnerGoogleCloudOption,
RunnerPlatformsRadioGroup,
RunnerCreateForm,
......@@ -74,8 +72,6 @@ export default {
<div class="gl-mt-5">
<h1 class="gl-heading-1">{{ s__('Runners|New project runner') }}</h1>
<registration-compatibility-alert :alert-key="projectId" />
<p>
{{
s__(
......
......@@ -44023,12 +44023,6 @@ msgstr ""
msgid "Runners|This may not be needed if you manage your runner as a %{linkStart}system or user service%{linkEnd}."
msgstr ""
 
msgid "Runners|This registration process is not supported in GitLab Runner 15.9 or earlier and only available as an experimental feature in GitLab Runner 15.10 and 15.11. You should upgrade to %{linkStart}GitLab Runner 16.0%{linkEnd} or later to use a stable version of this registration process."
msgstr ""
msgid "Runners|This registration process is only supported in GitLab Runner 15.10 or later"
msgstr ""
msgid "Runners|This runner has not run any jobs"
msgstr ""
 
......@@ -5,7 +5,6 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { createAlert, VARIANT_SUCCESS } from '~/alert';
import AdminNewRunnerApp from '~/ci/runner/admin_new_runner/admin_new_runner_app.vue';
import RegistrationCompatibilityAlert from '~/ci/runner/components/registration/registration_compatibility_alert.vue';
import { saveAlertToLocalStorage } from '~/ci/runner/local_storage_alert/save_alert_to_local_storage';
import RunnerPlatformsRadioGroup from '~/ci/runner/components/runner_platforms_radio_group.vue';
import {
......@@ -31,8 +30,6 @@ describe('AdminNewRunnerApp', () => {
let wrapper;
const findRunnerPlatformsRadioGroup = () => wrapper.findComponent(RunnerPlatformsRadioGroup);
const findRegistrationCompatibilityAlert = () =>
wrapper.findComponent(RegistrationCompatibilityAlert);
const findRunnerCreateForm = () => wrapper.findComponent(RunnerCreateForm);
const createComponent = () => {
......@@ -47,10 +44,6 @@ describe('AdminNewRunnerApp', () => {
createComponent();
});
it('shows a registration compatibility alert', () => {
expect(findRegistrationCompatibilityAlert().props('alertKey')).toBe(INSTANCE_TYPE);
});
describe('Platform', () => {
it('shows the platforms radio group', () => {
expect(findRunnerPlatformsRadioGroup().props('value')).toBe(DEFAULT_PLATFORM);
......
import { GlAlert, GlLink } from '@gitlab/ui';
import DismissibleFeedbackAlert from '~/vue_shared/components/dismissible_feedback_alert.vue';
import RegistrationCompatibilityAlert from '~/ci/runner/components/registration/registration_compatibility_alert.vue';
import { CHANGELOG_URL } from '~/ci/runner/constants';
import { shallowMountExtended, mountExtended } from 'helpers/vue_test_utils_helper';
const ALERT_KEY = 'ALERT_KEY';
describe('RegistrationCompatibilityAlert', () => {
let wrapper;
const findDismissibleFeedbackAlert = () => wrapper.findComponent(DismissibleFeedbackAlert);
const findAlert = () => wrapper.findComponent(GlAlert);
const findLink = () => wrapper.findComponent(GlLink);
const createComponent = ({ mountFn = shallowMountExtended, ...options } = {}) => {
wrapper = mountFn(RegistrationCompatibilityAlert, {
propsData: {
alertKey: ALERT_KEY,
},
...options,
});
};
it('configures a featureName', () => {
createComponent();
expect(findDismissibleFeedbackAlert().props('featureName')).toBe(
`new_runner_compatibility_${ALERT_KEY}`,
);
});
it('alert has warning appearance', () => {
createComponent({
stubs: {
DismissibleFeedbackAlert,
},
});
expect(findAlert().props()).toMatchObject({
dismissible: true,
variant: 'warning',
title: expect.any(String),
});
});
it('shows alert content and link', () => {
createComponent({ mountFn: mountExtended });
expect(findAlert().text()).not.toBe('');
expect(findLink().attributes('href')).toBe(CHANGELOG_URL);
});
});
......@@ -6,7 +6,6 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { createAlert, VARIANT_SUCCESS } from '~/alert';
import GroupRunnerRunnerApp from '~/ci/runner/group_new_runner/group_new_runner_app.vue';
import RegistrationCompatibilityAlert from '~/ci/runner/components/registration/registration_compatibility_alert.vue';
import { saveAlertToLocalStorage } from '~/ci/runner/local_storage_alert/save_alert_to_local_storage';
import RunnerPlatformsRadioGroup from '~/ci/runner/components/runner_platforms_radio_group.vue';
import {
......@@ -36,8 +35,6 @@ describe('GroupRunnerRunnerApp', () => {
let trackingSpy;
const findRunnerPlatformsRadioGroup = () => wrapper.findComponent(RunnerPlatformsRadioGroup);
const findRegistrationCompatibilityAlert = () =>
wrapper.findComponent(RegistrationCompatibilityAlert);
const findRunnerCreateForm = () => wrapper.findComponent(RunnerCreateForm);
const createComponent = () => {
......@@ -57,10 +54,6 @@ describe('GroupRunnerRunnerApp', () => {
createComponent();
});
it('shows a registration compatibility alert', () => {
expect(findRegistrationCompatibilityAlert().props('alertKey')).toBe(mockGroupId);
});
describe('Platform', () => {
it('shows the platforms radio group', () => {
expect(findRunnerPlatformsRadioGroup().props('value')).toBe(DEFAULT_PLATFORM);
......
......@@ -6,7 +6,6 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { createAlert, VARIANT_SUCCESS } from '~/alert';
import ProjectRunnerRunnerApp from '~/ci/runner/project_new_runner/project_new_runner_app.vue';
import RegistrationCompatibilityAlert from '~/ci/runner/components/registration/registration_compatibility_alert.vue';
import { saveAlertToLocalStorage } from '~/ci/runner/local_storage_alert/save_alert_to_local_storage';
import RunnerPlatformsRadioGroup from '~/ci/runner/components/runner_platforms_radio_group.vue';
import {
......@@ -36,8 +35,6 @@ describe('ProjectRunnerRunnerApp', () => {
let trackingSpy;
const findRunnerPlatformsRadioGroup = () => wrapper.findComponent(RunnerPlatformsRadioGroup);
const findRegistrationCompatibilityAlert = () =>
wrapper.findComponent(RegistrationCompatibilityAlert);
const findRunnerCreateForm = () => wrapper.findComponent(RunnerCreateForm);
const createComponent = () => {
......@@ -58,10 +55,6 @@ describe('ProjectRunnerRunnerApp', () => {
createComponent();
});
it('shows a registration compatibility alert', () => {
expect(findRegistrationCompatibilityAlert().props('alertKey')).toBe(mockProjectId);
});
describe('Platform', () => {
it('shows the platforms radio group', () => {
expect(findRunnerPlatformsRadioGroup().props('value')).toBe(DEFAULT_PLATFORM);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment