diff options
-rw-r--r-- | .rubocop.yml | 3 | ||||
-rw-r--r-- | .rubocop_todo/style/mutable_constant.yml | 57 | ||||
-rw-r--r-- | .rubocop_todo/style/redundant_freeze.yml | 243 | ||||
-rw-r--r-- | app/assets/javascripts/jobs/components/job/job_app.vue | 8 | ||||
-rw-r--r-- | app/assets/javascripts/jobs/constants.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/jobs/store/actions.js | 2 | ||||
-rw-r--r-- | config/feature_flags/development/project_members_index_by_project_namespace.yml | 2 | ||||
-rw-r--r-- | data/deprecations/15-9-accessibility-testing-deprecation.yml | 26 | ||||
-rw-r--r-- | doc/update/deprecations.md | 14 | ||||
-rw-r--r-- | rubocop/rubocop-ruby27.yml | 9 | ||||
-rw-r--r-- | rubocop/rubocop-ruby30.yml | 22 | ||||
-rw-r--r-- | spec/frontend/jobs/components/job/job_app_spec.js | 27 | ||||
-rw-r--r-- | spec/frontend/jobs/components/job/manual_variables_form_spec.js | 15 | ||||
-rw-r--r-- | spec/frontend/jobs/components/job/mock_data.js | 22 |
14 files changed, 436 insertions, 15 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index acae3d7f895..65a896f6f16 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,6 +13,9 @@ inherit_from: <% end %> - '.rubocop_todo.yml' <% end %> + <% if RUBY_VERSION[/^\d+\.\d+/, 0] == '2.7' %> + - ./rubocop/rubocop-ruby27.yml + <% end %> <% if RUBY_VERSION[/^\d+\.\d+/, 0] == '3.0' %> - ./rubocop/rubocop-ruby30.yml <% end %> diff --git a/.rubocop_todo/style/mutable_constant.yml b/.rubocop_todo/style/mutable_constant.yml new file mode 100644 index 00000000000..960a8ee6082 --- /dev/null +++ b/.rubocop_todo/style/mutable_constant.yml @@ -0,0 +1,57 @@ +--- +# Cop supports --autocorrect. +Style/MutableConstant: + Details: grace period + Exclude: + - 'app/finders/group_members_finder.rb' + - 'app/graphql/mutations/container_repositories/destroy_tags.rb' + - 'app/graphql/mutations/members/groups/bulk_update.rb' + - 'app/graphql/mutations/packages/bulk_destroy.rb' + - 'app/helpers/blame_helper.rb' + - 'app/models/ci/build_trace_chunks/redis_base.rb' + - 'app/models/design_management/repository.rb' + - 'app/models/integrations/datadog.rb' + - 'app/presenters/packages/helm/index_presenter.rb' + - 'app/services/import/validate_remote_git_endpoint_service.rb' + - 'app/services/packages/maven/metadata/append_package_file_service.rb' + - 'app/workers/concerns/worker_context.rb' + - 'danger/architecture/Dangerfile' + - 'danger/database/Dangerfile' + - 'danger/feature_flag/Dangerfile' + - 'ee/app/services/elastic/indexing_control_service.rb' + - 'ee/app/services/security/ingestion/tasks/ingest_vulnerability_statistics.rb' + - 'ee/app/services/vulnerabilities/statistics/adjustment_service.rb' + - 'ee/app/services/vulnerabilities/statistics/update_service.rb' + - 'lib/banzai/filter/autolink_filter.rb' + - 'lib/banzai/filter/math_filter.rb' + - 'lib/banzai/filter/references/abstract_reference_filter.rb' + - 'lib/banzai/filter/spaced_link_filter.rb' + - 'lib/gitlab/cleanup/project_upload_file_finder.rb' + - 'lib/gitlab/counters/buffered_counter.rb' + - 'lib/gitlab/database/background_migration/batched_migration.rb' + - 'lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb' + - 'lib/gitlab/database/postgres_hll/batch_distinct_counter.rb' + - 'lib/gitlab/database/similarity_score.rb' + - 'lib/gitlab/etag_caching/router/rails.rb' + - 'lib/gitlab/git/lfs_pointer_file.rb' + - 'lib/gitlab/issues/rebalancing/state.rb' + - 'lib/gitlab/lfs/client.rb' + - 'lib/gitlab/search_results.rb' + - 'lib/gitlab/seeder.rb' + - 'lib/gitlab/sidekiq_signals.rb' + - 'lib/gitlab/web_hooks/recursion_detection/uuid.rb' + - 'lib/tasks/gitlab/backup.rake' + - 'rubocop/cop/background_migration/feature_category.rb' + - 'rubocop/cop/filename_length.rb' + - 'rubocop/cop/gitlab/event_store_subscriber.rb' + - 'rubocop/cop/graphql/descriptions.rb' + - 'rubocop/cop/graphql/enum_names.rb' + - 'rubocop/cop/migration/prevent_index_creation.rb' + - 'rubocop/cop/migration/versioned_migration_class.rb' + - 'rubocop/cop/migration/with_lock_retries_disallowed_method.rb' + - 'rubocop/cop/scalability/idempotent_worker.rb' + - 'rubocop/cop/sidekiq_load_balancing/worker_data_consistency.rb' + - 'scripts/lib/glfm/constants.rb' + - 'scripts/perf/gc/collect_gc_stats.rb' + - 'spec/support/helpers/jira_integration_helpers.rb' + - 'tooling/danger/stable_branch.rb' diff --git a/.rubocop_todo/style/redundant_freeze.yml b/.rubocop_todo/style/redundant_freeze.yml new file mode 100644 index 00000000000..ef3ce1cda95 --- /dev/null +++ b/.rubocop_todo/style/redundant_freeze.yml @@ -0,0 +1,243 @@ +--- +# Cop supports --autocorrect. +Style/RedundantFreeze: + Details: grace period + Exclude: + - 'app/controllers/help_controller.rb' + - 'app/controllers/import/bitbucket_server_controller.rb' + - 'app/finders/issuable_finder.rb' + - 'app/finders/repositories/changelog_commits_finder.rb' + - 'app/helpers/auth_helper.rb' + - 'app/helpers/colors_helper.rb' + - 'app/helpers/sidekiq_helper.rb' + - 'app/models/application_setting_implementation.rb' + - 'app/models/badge.rb' + - 'app/models/blob_viewer/go_mod.rb' + - 'app/models/ci/runner.rb' + - 'app/models/commit.rb' + - 'app/models/commit_range.rb' + - 'app/models/concerns/ci/maskable.rb' + - 'app/models/concerns/pg_full_text_searchable.rb' + - 'app/models/concerns/redactable.rb' + - 'app/models/concerns/taskable.rb' + - 'app/models/custom_emoji.rb' + - 'app/models/environment_status.rb' + - 'app/models/error_tracking/project_error_tracking_setting.rb' + - 'app/models/hooks/web_hook.rb' + - 'app/models/integrations/apple_app_store.rb' + - 'app/models/integrations/campfire.rb' + - 'app/models/integrations/chat_message/base_message.rb' + - 'app/models/integrations/confluence.rb' + - 'app/models/integrations/datadog.rb' + - 'app/models/integrations/discord.rb' + - 'app/models/integrations/field.rb' + - 'app/models/integrations/teamcity.rb' + - 'app/models/license_template.rb' + - 'app/models/members/group_member.rb' + - 'app/models/members/project_member.rb' + - 'app/models/merge_request.rb' + - 'app/models/namespaces/randomized_suffix_path.rb' + - 'app/models/note.rb' + - 'app/models/packages/debian.rb' + - 'app/models/packages/debian/file_entry.rb' + - 'app/models/personal_access_token.rb' + - 'app/models/releases/link.rb' + - 'app/models/serverless/domain.rb' + - 'app/models/serverless/domain_cluster.rb' + - 'app/models/snippet_repository.rb' + - 'app/models/terraform/state.rb' + - 'app/services/clusters/agent_tokens/track_usage_service.rb' + - 'app/services/error_tracking/list_projects_service.rb' + - 'app/services/grafana/proxy_service.rb' + - 'app/services/import/validate_remote_git_endpoint_service.rb' + - 'app/services/issues/base_service.rb' + - 'app/services/packages/debian/process_package_file_service.rb' + - 'app/services/projects/import_error_filter.rb' + - 'app/services/projects/lfs_pointers/lfs_object_download_list_service.rb' + - 'app/services/prometheus/proxy_variable_substitution_service.rb' + - 'app/uploaders/file_uploader.rb' + - 'app/validators/certificate_fingerprint_validator.rb' + - 'app/validators/json_schema_validator.rb' + - 'app/validators/line_code_validator.rb' + - 'ee/app/finders/concerns/epics/findable.rb' + - 'ee/app/finders/ee/analytics/cycle_analytics/stage_finder.rb' + - 'ee/app/finders/epics_finder.rb' + - 'ee/app/graphql/mutations/incident_management/oncall_rotation/base.rb' + - 'ee/app/graphql/types/incident_management/oncall_rotation_date_input_type.rb' + - 'ee/app/models/allowed_email_domain.rb' + - 'ee/app/models/ee/issue.rb' + - 'ee/app/models/ee/iteration.rb' + - 'ee/app/models/ee/label.rb' + - 'ee/app/models/ee/project_import_state.rb' + - 'ee/app/models/ee/vulnerability.rb' + - 'ee/app/models/status_page/project_setting.rb' + - 'ee/app/serializers/analytics/cycle_analytics/value_stream_errors_serializer.rb' + - 'ee/app/services/elastic/data_migration_service.rb' + - 'ee/app/services/incident_management/issuable_resource_links/create_service.rb' + - 'ee/app/services/projects/restore_service.rb' + - 'ee/lib/ee/gitlab/path_regex.rb' + - 'ee/lib/ee/gitlab/web_hooks/rate_limiter.rb' + - 'ee/lib/elastic/latest/git_class_proxy.rb' + - 'ee/lib/gitlab/code_owners/file.rb' + - 'ee/lib/gitlab/code_owners/reference_extractor.rb' + - 'ee/lib/gitlab/status_page/filter/image_filter.rb' + - 'ee/lib/system_check/geo/authorized_keys_check.rb' + - 'haml_lint/linter/documentation_links.rb' + - 'lib/api/api.rb' + - 'lib/api/concerns/packages/nuget_endpoints.rb' + - 'lib/api/debian_group_packages.rb' + - 'lib/api/go_proxy.rb' + - 'lib/api/helpers.rb' + - 'lib/api/v3/github.rb' + - 'lib/api/validations/validators/git_ref.rb' + - 'lib/atlassian/jira_connect/jwt/asymmetric.rb' + - 'lib/banzai/color_parser.rb' + - 'lib/banzai/filter/ascii_doc_sanitization_filter.rb' + - 'lib/banzai/filter/attributes_filter.rb' + - 'lib/banzai/filter/autolink_filter.rb' + - 'lib/banzai/filter/blockquote_fence_filter.rb' + - 'lib/banzai/filter/dollar_math_post_filter.rb' + - 'lib/banzai/filter/dollar_math_pre_filter.rb' + - 'lib/banzai/filter/footnote_filter.rb' + - 'lib/banzai/filter/gollum_tags_filter.rb' + - 'lib/banzai/filter/markdown_post_escape_filter.rb' + - 'lib/banzai/filter/markdown_pre_escape_filter.rb' + - 'lib/banzai/filter/references/abstract_reference_filter.rb' + - 'lib/banzai/filter/sanitization_filter.rb' + - 'lib/banzai/filter/task_list_filter.rb' + - 'lib/bulk_imports/common/pipelines/uploads_pipeline.rb' + - 'lib/bulk_imports/file_downloads/filename_fetch.rb' + - 'lib/csv_builder.rb' + - 'lib/error_tracking/sentry_client/pagination_parser.rb' + - 'lib/expand_variables.rb' + - 'lib/feature/definition.rb' + - 'lib/gitaly/server.rb' + - 'lib/gitlab.rb' + - 'lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification.rb' + - 'lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb' + - 'lib/gitlab/background_migration/update_jira_tracker_data_deployment_type_based_on_url.rb' + - 'lib/gitlab/changelog/generator.rb' + - 'lib/gitlab/ci/build/artifacts/metadata.rb' + - 'lib/gitlab/ci/config/entry/artifacts.rb' + - 'lib/gitlab/ci/config/external/file/base.rb' + - 'lib/gitlab/ci/interpolation/block.rb' + - 'lib/gitlab/ci/parsers/test/junit.rb' + - 'lib/gitlab/ci/pipeline/chain/skip.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/and.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/equals.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/matches.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/not_equals.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/not_matches.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/null.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/or.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/parenthesis_close.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/parenthesis_open.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/pattern.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/string.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/variable.rb' + - 'lib/gitlab/ci/trace/section_parser.rb' + - 'lib/gitlab/ci/variables/collection/item.rb' + - 'lib/gitlab/cleanup/project_uploads.rb' + - 'lib/gitlab/color.rb' + - 'lib/gitlab/config/loader/multi_doc_yaml.rb' + - 'lib/gitlab/database/background_migration/batch_optimizer.rb' + - 'lib/gitlab/database/load_balancing/service_discovery.rb' + - 'lib/gitlab/database/migrations/runner.rb' + - 'lib/gitlab/database/postgres_constraint.rb' + - 'lib/gitlab/database/query_analyzers/query_recorder.rb' + - 'lib/gitlab/dependency_linker/base_linker.rb' + - 'lib/gitlab/dependency_linker/gemfile_linker.rb' + - 'lib/gitlab/dependency_linker/godeps_json_linker.rb' + - 'lib/gitlab/dependency_linker/podspec_linker.rb' + - 'lib/gitlab/diff/highlight.rb' + - 'lib/gitlab/diff/pair_selector.rb' + - 'lib/gitlab/diff/suggestions_parser.rb' + - 'lib/gitlab/email/handler/base_handler.rb' + - 'lib/gitlab/email/handler/create_issue_handler.rb' + - 'lib/gitlab/email/handler/create_merge_request_handler.rb' + - 'lib/gitlab/email/handler/create_note_on_issuable_handler.rb' + - 'lib/gitlab/email/handler/service_desk_handler.rb' + - 'lib/gitlab/email/hook/validate_addresses_interceptor.rb' + - 'lib/gitlab/email/receiver.rb' + - 'lib/gitlab/error_tracking/error_repository/open_api_strategy.rb' + - 'lib/gitlab/front_matter.rb' + - 'lib/gitlab/git.rb' + - 'lib/gitlab/git/base_error.rb' + - 'lib/gitlab/git/diff.rb' + - 'lib/gitlab/git/pre_receive_error.rb' + - 'lib/gitlab/github_import/representation/diff_note.rb' + - 'lib/gitlab/github_import/representation/diff_notes/discussion_id.rb' + - 'lib/gitlab/github_import/representation/diff_notes/suggestion_formatter.rb' + - 'lib/gitlab/github_import/representation/note.rb' + - 'lib/gitlab/golang.rb' + - 'lib/gitlab/graphql/queries.rb' + - 'lib/gitlab/harbor/query.rb' + - 'lib/gitlab/hook_data/base_builder.rb' + - 'lib/gitlab/i18n/po_linter.rb' + - 'lib/gitlab/i18n/translation_entry.rb' + - 'lib/gitlab/jira/dvcs.rb' + - 'lib/gitlab/merge_requests/message_generator.rb' + - 'lib/gitlab/metrics/exporter/base_exporter.rb' + - 'lib/gitlab/metrics/requests_rack_middleware.rb' + - 'lib/gitlab/metrics/subscribers/active_record.rb' + - 'lib/gitlab/metrics/system.rb' + - 'lib/gitlab/middleware/compressed_json.rb' + - 'lib/gitlab/middleware/go.rb' + - 'lib/gitlab/middleware/read_only.rb' + - 'lib/gitlab/middleware/sidekiq_web_static.rb' + - 'lib/gitlab/middleware/static.rb' + - 'lib/gitlab/path_regex.rb' + - 'lib/gitlab/push_options.rb' + - 'lib/gitlab/query_limiting/transaction.rb' + - 'lib/gitlab/quick_actions/extractor.rb' + - 'lib/gitlab/quick_actions/spend_time_and_date_separator.rb' + - 'lib/gitlab/quick_actions/timeline_text_and_date_time_separator.rb' + - 'lib/gitlab/rack_attack/request.rb' + - 'lib/gitlab/redis/hll.rb' + - 'lib/gitlab/regex.rb' + - 'lib/gitlab/robots_txt/parser.rb' + - 'lib/gitlab/saas.rb' + - 'lib/gitlab/sanitizers/exception_message.rb' + - 'lib/gitlab/sanitizers/svg.rb' + - 'lib/gitlab/search/abuse_detection.rb' + - 'lib/gitlab/search/found_blob.rb' + - 'lib/gitlab/search/query.rb' + - 'lib/gitlab/sidekiq_config/worker_matcher.rb' + - 'lib/gitlab/slash_commands/deploy.rb' + - 'lib/gitlab/slug/path.rb' + - 'lib/gitlab/spamcheck/client.rb' + - 'lib/gitlab/sql/pattern.rb' + - 'lib/gitlab/unicode.rb' + - 'lib/gitlab/untrusted_regexp/ruby_syntax.rb' + - 'lib/gitlab/usage_data_counters/gitlab_cli_activity_unique_counter.rb' + - 'lib/gitlab/usage_data_counters/jetbrains_plugin_activity_unique_counter.rb' + - 'lib/gitlab/usage_data_counters/vscode_extension_activity_unique_counter.rb' + - 'lib/gitlab/utils/link_header_parser.rb' + - 'lib/gitlab/utils/markdown.rb' + - 'lib/gitlab/uuid.rb' + - 'lib/gitlab/version_info.rb' + - 'lib/gitlab/x509/certificate.rb' + - 'lib/gitlab/zoom_link_extractor.rb' + - 'lib/sbom/package_url/argument_validator.rb' + - 'lib/tasks/gitlab/db/decomposition/rollback/bump_ci_sequences.rake' + - 'qa/qa/support/parallel_pipeline_jobs.rb' + - 'qa/qa/tools/ci/qa_changes.rb' + - 'rubocop/cop/gitlab/doc_url.rb' + - 'rubocop/cop/gitlab/finder_with_find_by.rb' + - 'rubocop/cop/inject_enterprise_edition_module.rb' + - 'rubocop/cop/project_path_helper.rb' + - 'rubocop/cop/qa/selector_usage.rb' + - 'scripts/qa/testcases-check' + - 'scripts/review_apps/automated_cleanup.rb' + - 'scripts/validate_migration_timestamps' + - 'spec/contracts/provider/helpers/contract_source_helper.rb' + - 'spec/initializers/secret_token_spec.rb' + - 'spec/support/helpers/next_found_instance_of.rb' + - 'spec/support/helpers/require_migration.rb' + - 'spec/support/matchers/exceed_query_limit.rb' + - 'tooling/danger/config_files.rb' + - 'tooling/danger/customer_success.rb' + - 'tooling/danger/datateam.rb' + - 'tooling/danger/specs.rb' + - 'tooling/danger/stable_branch.rb' + - 'tooling/lib/tooling/mappings/view_to_js_mappings.rb' 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/constants.js b/app/assets/javascripts/jobs/constants.js index 405aea11181..57f0caa06ac 100644 --- a/app/assets/javascripts/jobs/constants.js +++ b/app/assets/javascripts/jobs/constants.js @@ -42,3 +42,4 @@ export const JOB_RETRY_FORWARD_DEPLOYMENT_MODAL = { export const SUCCESS_STATUS = 'SUCCESS'; export const PASSED_STATUS = 'passed'; +export const MANUAL_STATUS = 'manual'; diff --git a/app/assets/javascripts/jobs/store/actions.js b/app/assets/javascripts/jobs/store/actions.js index a81edb240ad..fb4cb64c9cb 100644 --- a/app/assets/javascripts/jobs/store/actions.js +++ b/app/assets/javascripts/jobs/store/actions.js @@ -23,7 +23,7 @@ export const init = ({ dispatch }, { endpoint, logState, pagePath }) => { pagePath, }); - return Promise.all([dispatch('fetchJob'), dispatch('fetchJobLog')]); + return Promise.all([dispatch('fetchJob')]); }; export const setJobEndpoint = ({ commit }, endpoint) => commit(types.SET_JOB_ENDPOINT, endpoint); diff --git a/config/feature_flags/development/project_members_index_by_project_namespace.yml b/config/feature_flags/development/project_members_index_by_project_namespace.yml index 17a532a5a59..0727c32143a 100644 --- a/config/feature_flags/development/project_members_index_by_project_namespace.yml +++ b/config/feature_flags/development/project_members_index_by_project_namespace.yml @@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/384521 milestone: '15.7' type: development group: group::workspace -default_enabled: false +default_enabled: true diff --git a/data/deprecations/15-9-accessibility-testing-deprecation.yml b/data/deprecations/15-9-accessibility-testing-deprecation.yml new file mode 100644 index 00000000000..17863cf78af --- /dev/null +++ b/data/deprecations/15-9-accessibility-testing-deprecation.yml @@ -0,0 +1,26 @@ +# +# REQUIRED FIELDS +# +- title: "Accessibility Testing is deprecated" # (required) Clearly explain the change, or planned change. For example, "The `confidential` field for a `Note` is deprecated" or "CI/CD job names will be limited to 250 characters." + announcement_milestone: "15.9" # (required) The milestone when this feature was first announced as deprecated. + removal_milestone: "17.0" # (required) The milestone when this feature is planned to be removed + breaking_change: true # (required) Change to false if this is not a breaking change. + reporter: jocelynjane # (required) GitLab username of the person reporting the change + stage: Verify # (required) String value of the stage that the feature was created in. e.g., Growth + issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/390424 # (required) Link to the deprecation issue in GitLab + body: | # (required) Do not modify this line, instead modify the lines below. + Due to low customer usage, Accessibility Testing is deprecated and will be removed. There is no planned replacement and users should stop using Accessibility Testing before GitLab 17.0. +# +# OPTIONAL END OF SUPPORT FIELDS +# +# If an End of Support period applies, the announcement should be shared with GitLab Support +# in the `#spt_managers` channel in Slack, and mention `@gitlab-com/support` in this MR. +# + end_of_support_milestone: # (optional) Use "XX.YY" format. The milestone when support for this feature will end. + # + # OTHER OPTIONAL FIELDS + # + tiers: # (optional - may be required in the future) An array of tiers that the feature is available in currently. e.g., [Free, Silver, Gold, Core, Premium, Ultimate] + documentation_url: https://docs.gitlab.com/ee/ci/testing/accessibility_testing.html # (optional) This is a link to the current documentation page + image_url: # (optional) This is a link to a thumbnail image depicting the feature + video_url: # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg diff --git a/doc/update/deprecations.md b/doc/update/deprecations.md index c3d92bd30aa..1a272e4a609 100644 --- a/doc/update/deprecations.md +++ b/doc/update/deprecations.md @@ -52,6 +52,20 @@ sole discretion of GitLab Inc. <div class="deprecation removal-170 breaking-change"> +### Accessibility Testing is deprecated + +Planned removal: GitLab <span class="removal-milestone">17.0</span> <span class="removal-date"></span> + +WARNING: +This is a [breaking change](https://docs.gitlab.com/ee/development/deprecation_guidelines/). +Review the details carefully before upgrading. + +Due to low customer usage, Accessibility Testing is deprecated and will be removed. There is no planned replacement and users should stop using Accessibility Testing before GitLab 17.0. + +</div> + +<div class="deprecation removal-170 breaking-change"> + ### Browser Performance Testing is deprecated Planned removal: GitLab <span class="removal-milestone">17.0</span> <span class="removal-date"></span> diff --git a/rubocop/rubocop-ruby27.yml b/rubocop/rubocop-ruby27.yml new file mode 100644 index 00000000000..5c1b71f81e2 --- /dev/null +++ b/rubocop/rubocop-ruby27.yml @@ -0,0 +1,9 @@ +# RuboCop configuration adjustments during the transition time from Ruby 2.7 to +# Ruby 3.0. This configuration should be removed after the transition has been +# completed. + +# These cops are disabled in Ruby 3.0 (rubocop-30.yml). +Style/MutableConstant: + Enabled: false +Style/RedundantFreeze: + Enabled: false diff --git a/rubocop/rubocop-ruby30.yml b/rubocop/rubocop-ruby30.yml index b7634210e3d..d46bb9388a3 100644 --- a/rubocop/rubocop-ruby30.yml +++ b/rubocop/rubocop-ruby30.yml @@ -1,19 +1,15 @@ -# RuboCop configuration adjustments during the transition time from Ruby 2.7 to Ruby 3.0. -# This configuration should be removed after the transition has been completed. - -# Disable cops for now since their behavior changed in Ruby 3.0. -# See https://gitlab.com/gitlab-org/gitlab/-/jobs/3068345492 -# -# Migration plan: -# * Generate TODOs for these cops (with Ruby 3.0) right before the switch to Ruby 3.0 -# * Put these cops back in "grace period" to ensure `master` stability -# * Remove "grace period" after the switch -# * Incrementally fix TODOs +# RuboCop configuration adjustments during the transition time from Ruby 2.7 to +# Ruby 3.0. # +# After the transition has been completed: +# * Move all configuration which enable cops to .rubocop.yml. +# * Remove all reminaing configuration. + +# These cops are disabled in Ruby 2.7 (rubocop-27.yml). Style/MutableConstant: - Enabled: false + Enabled: true Style/RedundantFreeze: - Enabled: false + Enabled: true # No longer needed because Ruby 3.0 will fail due to kwargs issues. Lint/LastKeywordArgument: diff --git a/spec/frontend/jobs/components/job/job_app_spec.js b/spec/frontend/jobs/components/job/job_app_spec.js index a38616dad8d..cefedcd82fb 100644 --- a/spec/frontend/jobs/components/job/job_app_spec.js +++ b/spec/frontend/jobs/components/job/job_app_spec.js @@ -16,7 +16,9 @@ import UnmetPrerequisitesBlock from '~/jobs/components/job/unmet_prerequisites_b import createStore from '~/jobs/store'; import axios from '~/lib/utils/axios_utils'; import { HTTP_STATUS_OK } from '~/lib/utils/http_status'; +import { MANUAL_STATUS } from '~/jobs/constants'; import job from '../../mock_data'; +import { mockPendingJobData } from './mock_data'; describe('Job App', () => { Vue.use(Vuex); @@ -311,4 +313,29 @@ describe('Job App', () => { expect(findJobLog().exists()).toBe(true); }); }); + + describe('job log polling', () => { + beforeEach(() => { + jest.spyOn(store, 'dispatch'); + }); + + it('should poll job log by default', async () => { + await setupAndMount({ + jobData: mockPendingJobData, + }); + + expect(store.dispatch).toHaveBeenCalledWith('fetchJobLog'); + }); + + it('should NOT poll job log for manual variables form empty state', async () => { + const manualPendingJobData = mockPendingJobData; + manualPendingJobData.status.group = MANUAL_STATUS; + + await setupAndMount({ + jobData: manualPendingJobData, + }); + + expect(store.dispatch).not.toHaveBeenCalledWith('fetchJobLog'); + }); + }); }); diff --git a/spec/frontend/jobs/components/job/manual_variables_form_spec.js b/spec/frontend/jobs/components/job/manual_variables_form_spec.js index 3040570df19..674812931c2 100644 --- a/spec/frontend/jobs/components/job/manual_variables_form_spec.js +++ b/spec/frontend/jobs/components/job/manual_variables_form_spec.js @@ -7,6 +7,7 @@ import createMockApollo from 'helpers/mock_apollo_helper'; import { convertToGraphQLId } from '~/graphql_shared/utils'; import { GRAPHQL_ID_TYPES } from '~/jobs/constants'; import waitForPromises from 'helpers/wait_for_promises'; +import { redirectTo } from '~/lib/utils/url_utility'; import ManualVariablesForm from '~/jobs/components/job/manual_variables_form.vue'; import getJobQuery from '~/jobs/components/job/graphql/queries/get_job.query.graphql'; import retryJobMutation from '~/jobs/components/job/graphql/mutations/job_retry_with_variables.mutation.graphql'; @@ -21,6 +22,11 @@ import { const localVue = createLocalVue(); localVue.use(VueApollo); +jest.mock('~/lib/utils/url_utility', () => ({ + ...jest.requireActual('~/lib/utils/url_utility'), + redirectTo: jest.fn(), +})); + const defaultProvide = { projectPath: mockFullPath, }; @@ -156,6 +162,15 @@ describe('Manual Variables Form', () => { }, }); }); + + // redirect to job after initial trigger assertion will be added in https://gitlab.com/gitlab-org/gitlab/-/issues/377268 + it('redirects to job properly after rerun', async () => { + findRerunBtn().vm.$emit('click'); + await waitForPromises(); + + expect(wrapper.vm.$apollo.mutate).toHaveBeenCalledTimes(1); + expect(redirectTo).toHaveBeenCalledWith(mockJobMutationData.data.jobRetry.job.webPath); + }); }); describe('updating variables in UI', () => { diff --git a/spec/frontend/jobs/components/job/mock_data.js b/spec/frontend/jobs/components/job/mock_data.js index 9596e859475..8a838acca7a 100644 --- a/spec/frontend/jobs/components/job/mock_data.js +++ b/spec/frontend/jobs/components/job/mock_data.js @@ -74,3 +74,25 @@ export const mockJobMutationData = { }, }, }; + +export const mockPendingJobData = { + has_trace: false, + status: { + group: 'pending', + icon: 'status_pending', + label: 'pending', + text: 'pending', + details_path: 'path', + illustration: { + image: 'path', + size: '340', + title: '', + content: '', + }, + action: { + button_title: 'Retry job', + method: 'post', + path: '/path', + }, + }, +}; |