From 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Feb 2023 13:49:51 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-9-stable-ee --- .../javascripts/jobs/components/job/job_app.vue | 8 ++++++++ .../jobs/components/job/manual_variables_form.vue | 23 +++++++++++++++++----- .../jobs/components/job/sidebar/sidebar_header.vue | 4 ++-- 3 files changed, 28 insertions(+), 7 deletions(-) (limited to 'app/assets/javascripts/jobs/components/job') diff --git a/app/assets/javascripts/jobs/components/job/job_app.vue b/app/assets/javascripts/jobs/components/job/job_app.vue index c6d900ef13e..d93b8a8de29 100644 --- a/app/assets/javascripts/jobs/components/job/job_app.vue +++ b/app/assets/javascripts/jobs/components/job/job_app.vue @@ -9,6 +9,7 @@ import { __, sprintf } from '~/locale'; import CiHeader from '~/vue_shared/components/header_ci_component.vue'; import delayedJobMixin from '~/jobs/mixins/delayed_job_mixin'; import Log from '~/jobs/components/log/log.vue'; +import { MANUAL_STATUS } from '~/jobs/constants'; import EmptyState from './empty_state.vue'; import EnvironmentsBlock from './environments_block.vue'; import ErasedBlock from './erased_block.vue'; @@ -144,6 +145,12 @@ export default { this.fetchJobsForStage(defaultStage); } } + + // Only poll for job log if we are not in the manual variables form empty state. + // This will be handled more elegantly in the future with GraphQL in https://gitlab.com/gitlab-org/gitlab/-/issues/389597 + if (newVal?.status?.group !== MANUAL_STATUS && !this.showUpdateVariablesState) { + this.fetchJobLog(); + } }, }, created() { @@ -163,6 +170,7 @@ export default { }, methods: { ...mapActions([ + 'fetchJobLog', 'fetchJobsForStage', 'hideSidebar', 'showSidebar', diff --git a/app/assets/javascripts/jobs/components/job/manual_variables_form.vue b/app/assets/javascripts/jobs/components/job/manual_variables_form.vue index 734d3ca0d49..763eb6705aa 100644 --- a/app/assets/javascripts/jobs/components/job/manual_variables_form.vue +++ b/app/assets/javascripts/jobs/components/job/manual_variables_form.vue @@ -13,8 +13,9 @@ import { cloneDeep, uniqueId } from 'lodash'; import { mapActions } from 'vuex'; import { fetchPolicies } from '~/lib/graphql'; import { createAlert } from '~/flash'; +import { TYPENAME_CI_BUILD, TYPENAME_COMMIT_STATUS } from '~/graphql_shared/constants'; import { convertToGraphQLId } from '~/graphql_shared/utils'; -import { JOB_GRAPHQL_ERRORS, GRAPHQL_ID_TYPES } from '~/jobs/constants'; +import { JOB_GRAPHQL_ERRORS } from '~/jobs/constants'; import { helpPagePath } from '~/helpers/help_page_helper'; import { redirectTo } from '~/lib/utils/url_utility'; import { s__ } from '~/locale'; @@ -45,7 +46,7 @@ export default { variables() { return { fullPath: this.projectPath, - id: convertToGraphQLId(GRAPHQL_ID_TYPES.commitStatus, this.jobId), + id: convertToGraphQLId(TYPENAME_COMMIT_STATUS, this.jobId), }; }, fetchPolicy: fetchPolicies.CACHE_AND_NETWORK, @@ -76,13 +77,16 @@ export default { i18n: { clearInputs: s__('CiVariables|Clear inputs'), formHelpText: s__( - 'CiVariables|Specify variable values to be used in this run. The values specified in %{linkStart}CI/CD settings%{linkEnd} will be used as default', + 'CiVariables|Specify variable values to be used in this run. The variables specified in the configuration file and %{linkStart}CI/CD settings%{linkEnd} are used by default.', + ), + overrideNoteText: s__( + 'CiVariables|Variables specified here are %{boldStart}expanded%{boldEnd} and not %{boldStart}masked.%{boldEnd}', ), header: s__('CiVariables|Variables'), keyLabel: s__('CiVariables|Key'), keyPlaceholder: s__('CiVariables|Input variable key'), runAgainButtonText: s__('CiVariables|Run job again'), - triggerButtonText: s__('CiVariables|Trigger this manual action'), + triggerButtonText: s__('CiVariables|Run job'), valueLabel: s__('CiVariables|Value'), valuePlaceholder: s__('CiVariables|Input variable value'), }, @@ -157,7 +161,7 @@ export default { const { data } = await this.$apollo.mutate({ mutation: retryJobWithVariablesMutation, variables: { - id: convertToGraphQLId(GRAPHQL_ID_TYPES.ciBuild, this.jobId), + id: convertToGraphQLId(TYPENAME_CI_BUILD, this.jobId), // we need to ensure no empty variables are passed to the API variables: this.preparedVariables, }, @@ -258,6 +262,15 @@ export default { +
+ + + +