diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index a56c7410d0f..642d5943854 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -454,7 +454,7 @@ class Projects::IssuesController < Projects::ApplicationController
def require_incident_for_incident_routes
return unless params[:incident_tab].present?
- return if issue.incident?
+ return if issue.work_item_type&.incident?
# Redirect instead of 404 to gracefully handle
# issue type changes
diff --git a/app/graphql/mutations/incident_management/timeline_event/promote_from_note.rb b/app/graphql/mutations/incident_management/timeline_event/promote_from_note.rb
index bb1da9278ff..c29dc98c872 100644
--- a/app/graphql/mutations/incident_management/timeline_event/promote_from_note.rb
+++ b/app/graphql/mutations/incident_management/timeline_event/promote_from_note.rb
@@ -35,7 +35,7 @@ module Mutations
end
def authorize!(object)
- raise_noteable_not_incident! if object && !object.try(:incident?)
+ raise_noteable_not_incident! if object && !object.try(:incident_type_issue?)
super
end
diff --git a/app/graphql/resolvers/achievements/user_achievements_resolver.rb b/app/graphql/resolvers/achievements/user_achievements_resolver.rb
index bf09d80afc1..77fb15c3d93 100644
--- a/app/graphql/resolvers/achievements/user_achievements_resolver.rb
+++ b/app/graphql/resolvers/achievements/user_achievements_resolver.rb
@@ -8,7 +8,7 @@ module Resolvers
type ::Types::Achievements::UserAchievementType.connection_type, null: true
def resolve_with_lookahead
- user_achievements = object.user_achievements.not_revoked
+ user_achievements = object.user_achievements.not_revoked.order_by_id_asc
apply_lookahead(user_achievements)
end
diff --git a/app/graphql/types/achievements/achievement_type.rb b/app/graphql/types/achievements/achievement_type.rb
index ff4c49dac5a..ec558981465 100644
--- a/app/graphql/types/achievements/achievement_type.rb
+++ b/app/graphql/types/achievements/achievement_type.rb
@@ -45,7 +45,9 @@ module Types
Types::Achievements::UserAchievementType.connection_type,
null: true,
alpha: { milestone: '15.10' },
- description: "Recipients for the achievement."
+ description: "Recipients for the achievement.",
+ extras: [:lookahead],
+ resolver: ::Resolvers::Achievements::UserAchievementsResolver
def avatar_url
object.avatar_url(only_path: false)
diff --git a/app/helpers/form_helper.rb b/app/helpers/form_helper.rb
index a4d90716129..ed8cca20241 100644
--- a/app/helpers/form_helper.rb
+++ b/app/helpers/form_helper.rb
@@ -72,7 +72,8 @@ module FormHelper
multi_select: true,
'input-meta': 'name',
'always-show-selectbox': true,
- current_user_info: UserSerializer.new.represent(current_user)
+ current_user_info: UserSerializer.new.represent(current_user),
+ testid: 'assignee-ids-dropdown-toggle'
}
}
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index d058d0f697c..3796d8f0210 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -274,7 +274,7 @@ module IssuablesHelper
end
def incident_only_initial_data(issue)
- return {} unless issue.incident?
+ return {} unless issue.incident_type_issue?
{
hasLinkedAlerts: issue.alert_management_alerts.any?,
@@ -396,6 +396,35 @@ module IssuablesHelper
}
end
+ def issuable_label_selector_data(project, issuable)
+ initial_labels = issuable.labels.map do |label|
+ {
+ __typename: "Label",
+ id: label.id,
+ title: label.title,
+ description: label.description,
+ color: label.color,
+ text_color: label.text_color
+ }
+ end
+
+ filter_base_path =
+ if issuable.issuable_type == "merge_request"
+ project_merge_requests_path(project)
+ else
+ project_issues_path(project)
+ end
+
+ {
+ field_name: "#{issuable.class.model_name.param_key}[label_ids][]",
+ full_path: project.full_path,
+ initial_labels: initial_labels.to_json,
+ issuable_type: issuable.issuable_type,
+ labels_filter_base_path: filter_base_path,
+ labels_manage_path: project_labels_path(project)
+ }
+ end
+
private
def sidebar_gutter_collapsed?
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 2f002be632d..fae8d86098e 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -155,7 +155,7 @@ module IssuesHelper
def issue_header_actions_data(project, issuable, current_user, issuable_sidebar)
new_issuable_params = { issue: {}, add_related_issue: issuable.iid }
- if issuable.incident?
+ if issuable.work_item_type&.incident?
new_issuable_params[:issuable_template] = 'incident'
new_issuable_params[:issue][:issue_type] = 'incident'
end
diff --git a/app/models/achievements/user_achievement.rb b/app/models/achievements/user_achievement.rb
index 844780c6164..08ebadaa6b0 100644
--- a/app/models/achievements/user_achievement.rb
+++ b/app/models/achievements/user_achievement.rb
@@ -15,6 +15,7 @@ module Achievements
optional: true
scope :not_revoked, -> { where(revoked_by_user_id: nil) }
+ scope :order_by_id_asc, -> { order(id: :asc) }
def revoked?
revoked_by_user_id.present?
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 6594884ca0a..b1ec6b8ba32 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -174,6 +174,10 @@ module Issuable
end
end
+ def issuable_type
+ self.class.name.underscore
+ end
+
# We want to use optimistic lock for cases when only title or description are involved
# http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html
def locking_enabled?
@@ -197,15 +201,15 @@ module Issuable
end
def supports_severity?
- incident?
+ incident_type_issue?
end
def supports_escalation?
- incident?
+ incident_type_issue?
end
- def incident?
- is_a?(Issue) && super
+ def incident_type_issue?
+ is_a?(Issue) && work_item_type&.incident?
end
def supports_issue_type?
diff --git a/app/models/concerns/protected_ref_access.rb b/app/models/concerns/protected_ref_access.rb
index b841211c811..c1c670db543 100644
--- a/app/models/concerns/protected_ref_access.rb
+++ b/app/models/concerns/protected_ref_access.rb
@@ -6,18 +6,24 @@ module ProtectedRefAccess
class_methods do
def human_access_levels
{
- Gitlab::Access::DEVELOPER => "Developers + Maintainers",
- Gitlab::Access::MAINTAINER => "Maintainers",
- Gitlab::Access::NO_ACCESS => "No one"
- }
+ Gitlab::Access::DEVELOPER => 'Developers + Maintainers',
+ Gitlab::Access::MAINTAINER => 'Maintainers',
+ Gitlab::Access::ADMIN => 'Instance admins',
+ Gitlab::Access::NO_ACCESS => 'No one'
+ }.slice(*allowed_access_levels)
end
def allowed_access_levels
- [
- Gitlab::Access::MAINTAINER,
+ levels = [
Gitlab::Access::DEVELOPER,
+ Gitlab::Access::MAINTAINER,
+ Gitlab::Access::ADMIN,
Gitlab::Access::NO_ACCESS
]
+
+ return levels unless Gitlab.com?
+
+ levels.excluding(Gitlab::Access::ADMIN)
end
def humanize(access_level)
@@ -47,6 +53,7 @@ module ProtectedRefAccess
def check_access(current_user)
return false if current_user.nil? || no_access?
+ return current_user.admin? if admin_access?
yield if block_given?
@@ -55,6 +62,10 @@ module ProtectedRefAccess
private
+ def admin_access?
+ role? && access_level == ::Gitlab::Access::ADMIN
+ end
+
def no_access?
role? && access_level == Gitlab::Access::NO_ACCESS
end
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 0d33c6a71aa..b7125617034 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -40,6 +40,7 @@ class Issue < ApplicationRecord
DueNextMonthAndPreviousTwoWeeks = DueDateStruct.new('Due Next Month And Previous Two Weeks', 'next_month_and_previous_two_weeks').freeze
IssueTypeOutOfSyncError = Class.new(StandardError)
+ ForbiddenColumnUsed = Class.new(StandardError)
SORTING_PREFERENCE_FIELD = :issues_sort
MAX_BRANCH_TEMPLATE = 255
@@ -139,6 +140,28 @@ class Issue < ApplicationRecord
enum issue_type: WorkItems::Type.base_types
+ # TODO: Remove with https://gitlab.com/gitlab-org/gitlab/-/issues/402699
+ WorkItems::Type.base_types.each do |base_type, _value|
+ define_method "#{base_type}?".to_sym do
+ error_message = <<~ERROR
+ `#{base_type}?` uses the `issue_type` column underneath. As we want to remove the column,
+ its usage is forbidden. You should use the `work_item_types` table instead.
+
+ # Before
+
+ issue.requirement? => true
+
+ # After
+
+ issue.work_item_type.requirement? => true
+
+ More details in https://gitlab.com/groups/gitlab-org/-/epics/10529
+ ERROR
+
+ raise ForbiddenColumnUsed, error_message
+ end
+ end
+
alias_method :issuing_parent, :project
alias_attribute :issuing_parent_id, :project_id
diff --git a/app/models/personal_access_token.rb b/app/models/personal_access_token.rb
index 3ebb2126f4d..75afff6a2fa 100644
--- a/app/models/personal_access_token.rb
+++ b/app/models/personal_access_token.rb
@@ -15,6 +15,7 @@ class PersonalAccessToken < ApplicationRecord
# PATs are 20 characters + optional configurable settings prefix (0..20)
TOKEN_LENGTH_RANGE = (20..40).freeze
+ MAX_PERSONAL_ACCESS_TOKEN_LIFETIME_IN_DAYS = 365
serialize :scopes, Array # rubocop:disable Cop/ActiveRecordSerialize
@@ -48,6 +49,7 @@ class PersonalAccessToken < ApplicationRecord
validates :scopes, presence: true
validate :validate_scopes
+ validate :expires_at_before_instance_max_expiry_date, on: :create
def revoke!
update!(revoked: true)
@@ -57,6 +59,19 @@ class PersonalAccessToken < ApplicationRecord
!revoked? && !expired?
end
+ # fall back to default value until background migration has updated all
+ # existing PATs and we can add a validation
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/369123
+ def expires_at=(value)
+ datetime = if Feature.enabled?(:default_pat_expiration)
+ value.presence || MAX_PERSONAL_ACCESS_TOKEN_LIFETIME_IN_DAYS.days.from_now
+ else
+ value
+ end
+
+ super(datetime)
+ end
+
override :simple_sorts
def self.simple_sorts
super.merge(
@@ -108,6 +123,15 @@ class PersonalAccessToken < ApplicationRecord
def prefix_from_application_current_settings
self.class.token_prefix
end
+
+ def expires_at_before_instance_max_expiry_date
+ return unless Feature.enabled?(:default_pat_expiration)
+ return unless expires_at
+
+ if expires_at > MAX_PERSONAL_ACCESS_TOKEN_LIFETIME_IN_DAYS.days.from_now
+ errors.add(:expires_at, _('must expire in 365 days'))
+ end
+ end
end
PersonalAccessToken.prepend_mod_with('PersonalAccessToken')
diff --git a/app/policies/issuable_policy.rb b/app/policies/issuable_policy.rb
index 400ac528018..60ab1785972 100644
--- a/app/policies/issuable_policy.rb
+++ b/app/policies/issuable_policy.rb
@@ -14,7 +14,7 @@ class IssuablePolicy < BasePolicy
condition(:is_author) { @subject&.author == @user }
- condition(:is_incident) { @subject.incident? }
+ condition(:is_incident) { @subject.incident_type_issue? }
desc "Issuable is hidden"
condition(:hidden, scope: :subject) { @subject.hidden? }
diff --git a/app/services/concerns/incident_management/usage_data.rb b/app/services/concerns/incident_management/usage_data.rb
index 775dea9b949..f7edbb80d09 100644
--- a/app/services/concerns/incident_management/usage_data.rb
+++ b/app/services/concerns/incident_management/usage_data.rb
@@ -5,7 +5,7 @@ module IncidentManagement
include Gitlab::Utils::UsageData
def track_incident_action(current_user, target, action)
- return unless target.incident?
+ return unless target.incident_type_issue?
event = "incident_management_#{action}"
track_usage_event(event, current_user.id)
diff --git a/app/services/issues/base_service.rb b/app/services/issues/base_service.rb
index 05090efe260..efe42fb29d5 100644
--- a/app/services/issues/base_service.rb
+++ b/app/services/issues/base_service.rb
@@ -110,7 +110,7 @@ module Issues
issue.namespace.execute_hooks(issue_data, hooks_scope)
issue.namespace.execute_integrations(issue_data, hooks_scope)
- execute_incident_hooks(issue, issue_data) if issue.incident?
+ execute_incident_hooks(issue, issue_data) if issue.work_item_type&.incident?
end
# We can remove this code after proposal in
diff --git a/app/services/issues/close_service.rb b/app/services/issues/close_service.rb
index 87e27ef2763..e45033f2b91 100644
--- a/app/services/issues/close_service.rb
+++ b/app/services/issues/close_service.rb
@@ -93,7 +93,7 @@ module Issues
end
def resolve_incident(issue)
- return unless issue.incident?
+ return unless issue.work_item_type&.incident?
status = issue.incident_management_issuable_escalation_status || issue.build_incident_management_issuable_escalation_status
diff --git a/app/services/issues/create_service.rb b/app/services/issues/create_service.rb
index ce19d77ca49..ba8f00d03d4 100644
--- a/app/services/issues/create_service.rb
+++ b/app/services/issues/create_service.rb
@@ -112,7 +112,7 @@ module Issues
attr_reader :spam_params, :extra_params
def create_timeline_event(issue)
- return unless issue.incident?
+ return unless issue.work_item_type&.incident?
IncidentManagement::TimelineEvents::CreateService.create_incident(issue, current_user)
end
diff --git a/app/services/issues/reopen_service.rb b/app/services/issues/reopen_service.rb
index 3330c462947..f4d229ecec7 100644
--- a/app/services/issues/reopen_service.rb
+++ b/app/services/issues/reopen_service.rb
@@ -27,7 +27,7 @@ module Issues
end
def perform_incident_management_actions(issue)
- return unless issue.incident?
+ return unless issue.work_item_type&.incident?
create_timeline_event(issue)
end
diff --git a/app/services/resource_access_tokens/create_service.rb b/app/services/resource_access_tokens/create_service.rb
index cfa43f5d9c8..553315f08f9 100644
--- a/app/services/resource_access_tokens/create_service.rb
+++ b/app/services/resource_access_tokens/create_service.rb
@@ -100,7 +100,15 @@ module ResourceAccessTokens
end
def create_membership(resource, user, access_level)
- resource.add_member(user, access_level, expires_at: params[:expires_at])
+ resource.add_member(user, access_level, expires_at: default_pat_expiration)
+ end
+
+ def default_pat_expiration
+ if Feature.enabled?(:default_pat_expiration)
+ params[:expires_at].presence || PersonalAccessToken::MAX_PERSONAL_ACCESS_TOKEN_LIFETIME_IN_DAYS.days.from_now
+ else
+ params[:expires_at]
+ end
end
def log_event(token)
diff --git a/app/services/resource_events/change_labels_service.rb b/app/services/resource_events/change_labels_service.rb
index 02182bc3a77..69e68922b91 100644
--- a/app/services/resource_events/change_labels_service.rb
+++ b/app/services/resource_events/change_labels_service.rb
@@ -55,7 +55,7 @@ module ResourceEvents
end
def create_timeline_events_from(added_labels: [], removed_labels: [])
- return unless resource.incident?
+ return unless resource.incident_type_issue?
IncidentManagement::TimelineEvents::CreateService.change_labels(
resource,
diff --git a/app/views/projects/issues/_design_management.html.haml b/app/views/projects/issues/_design_management.html.haml
index df5ab1d4a7c..de8725df871 100644
--- a/app/views/projects/issues/_design_management.html.haml
+++ b/app/views/projects/issues/_design_management.html.haml
@@ -1,4 +1,4 @@
-- return if @issue.incident?
+- return if @issue.work_item_type&.incident?
- requirements_link_url = help_page_path('user/project/issues/design_management', anchor: 'requirements')
- requirements_link_start = '
'.html_safe % { url: requirements_link_url }
diff --git a/app/views/shared/issuable/form/_metadata.html.haml b/app/views/shared/issuable/form/_metadata.html.haml
index 9603178f7de..b27fd8ab7d2 100644
--- a/app/views/shared/issuable/form/_metadata.html.haml
+++ b/app/views/shared/issuable/form/_metadata.html.haml
@@ -37,12 +37,15 @@
.issuable-form-select-holder
= render "shared/issuable/milestone_dropdown", selected: issuable.milestone, name: "#{issuable.class.model_name.param_key}[milestone_id]"
- .form-group.row
- = form.label :label_ids, _('Labels'), class: "col-12"
- = form.hidden_field :label_ids, multiple: true, value: ''
- .col-12
- .issuable-form-select-holder
- = render "shared/issuable/label_dropdown", classes: ["js-issuable-form-dropdown"], selected: issuable.labels, data_options: { field_name: "#{issuable.class.model_name.param_key}[label_ids][]", show_any: false }, dropdown_title: "Select label"
+ - if Feature.enabled?(:visible_label_selection_on_metadata, project)
+ .js-issuable-form-label-selector{ data: issuable_label_selector_data(project, issuable) }
+ - else
+ .form-group.row
+ = form.label :label_ids, _('Labels'), class: "col-12"
+ = form.hidden_field :label_ids, multiple: true, value: ''
+ .col-12
+ .issuable-form-select-holder
+ = render "shared/issuable/label_dropdown", classes: ["js-issuable-form-dropdown"], selected: issuable.labels, data_options: { field_name: "#{issuable.class.model_name.param_key}[label_ids][]", show_any: false }, dropdown_title: "Select label"
= render_if_exists "shared/issuable/form/merge_request_blocks", issuable: issuable, form: form
diff --git a/app/views/shared/issuable/form/_type_selector.html.haml b/app/views/shared/issuable/form/_type_selector.html.haml
index 2350864f0a6..0bcdcb9e963 100644
--- a/app/views/shared/issuable/form/_type_selector.html.haml
+++ b/app/views/shared/issuable/form/_type_selector.html.haml
@@ -8,7 +8,7 @@
.issuable-form-select-holder.form-group.gl-mb-0.gl-display-block
#js-type-select{ data: issuable_type_selector_data(issuable) }
- - if issuable.incident?
+ - if issuable.incident_type_issue?
%p.form-text.text-muted
- incident_docs_url = help_page_path('operations/incident_management/incidents.md')
- incident_docs_start = format('', url: incident_docs_url)
diff --git a/config/feature_flags/development/default_pat_expiration.yml b/config/feature_flags/development/default_pat_expiration.yml
new file mode 100644
index 00000000000..b48d6a02723
--- /dev/null
+++ b/config/feature_flags/development/default_pat_expiration.yml
@@ -0,0 +1,7 @@
+name: default_pat_expiration
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/120213
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/410440
+milestone: '16.0'
+type: development
+group: group::authentication and authorization
+default_enabled: true
diff --git a/config/feature_flags/development/visible_label_selection_on_metadata.yml b/config/feature_flags/development/visible_label_selection_on_metadata.yml
new file mode 100644
index 00000000000..bf173b26d44
--- /dev/null
+++ b/config/feature_flags/development/visible_label_selection_on_metadata.yml
@@ -0,0 +1,8 @@
+---
+name: visible_label_selection_on_metadata
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/88908
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/364534
+milestone: '16.0'
+type: development
+group: "group::ux paper cuts"
+default_enabled: false
diff --git a/data/removals/16_0/16-0-Security-report-schemas-version-14.yml b/data/removals/16_0/16-0-Security-report-schemas-version-14.yml
new file mode 100644
index 00000000000..14d5dd7acd2
--- /dev/null
+++ b/data/removals/16_0/16-0-Security-report-schemas-version-14.yml
@@ -0,0 +1,11 @@
+- title: "Security report schemas version 14.x.x"
+ announcement_milestone: "15.3"
+ removal_milestone: "16.0"
+ breaking_change: true
+ reporter: abellucci
+ stage: Govern
+ issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/366477
+ body: |
+ Version 14.x.x [security report schemas](https://gitlab.com/gitlab-org/security-products/security-report-schemas) have been removed.
+ Security reports that use schema version 14.x.x will cause an error in the pipeline's **Security** tab. For more information, refer to [security report validation](https://docs.gitlab.com/ee/user/application_security/#security-report-validation).
+ tiers: [Ultimate]
diff --git a/data/removals/16_0/16-0-dast-api-variable-removal.yml b/data/removals/16_0/16-0-dast-api-variable-removal.yml
index 15dd4c6d781..1b67eeb0fa7 100644
--- a/data/removals/16_0/16-0-dast-api-variable-removal.yml
+++ b/data/removals/16_0/16-0-dast-api-variable-removal.yml
@@ -4,7 +4,7 @@
breaking_change: true # (required) Change to false if this is not a breaking change.
reporter: derekferguson # (required) GitLab username of the person reporting the removal
stage: Secure # (required) String value of the stage that the feature was created in. e.g., Growth
- issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/383467 # (required) Link to the deprecation issue in GitLab
+ issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/383467 # (required) Link to the deprecation issue in GitLab
body: | # (required) Do not modify this line, instead modify the lines below.
The variables `DAST_API_HOST_OVERRIDE` and `DAST_API_SPECIFICATION` have been removed from use for DAST API scans.
diff --git a/data/removals/16_0/16-0-grafana-chart.yml b/data/removals/16_0/16-0-grafana-chart.yml
index 012d5043a98..3251f477bb0 100644
--- a/data/removals/16_0/16-0-grafana-chart.yml
+++ b/data/removals/16_0/16-0-grafana-chart.yml
@@ -15,5 +15,5 @@
In your new Grafana instance, you can [configure the GitLab provided Prometheus as a data source](https://docs.gitlab.com/ee/administration/monitoring/performance/grafana_configuration.html#integration-with-gitlab-ui)
and [connect Grafana to the GitLab UI](https://docs.gitlab.com/ee/administration/monitoring/performance/grafana_configuration.html#integration-with-gitlab-ui).
- 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]
+ 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/administration/monitoring/performance/grafana_configuration.html
diff --git a/data/removals/16_0/16-0-limit-ci-job-token.yml b/data/removals/16_0/16-0-limit-ci-job-token.yml
index 9f262f9c772..1409677233c 100644
--- a/data/removals/16_0/16-0-limit-ci-job-token.yml
+++ b/data/removals/16_0/16-0-limit-ci-job-token.yml
@@ -2,7 +2,7 @@
announcement_milestone: "15.9" # (required) The milestone when this feature was first announced as deprecated.
removal_milestone: "16.0" # (required) The milestone when this feature is planned to be removed
breaking_change: true # (required) If this deprecation is a breaking change, set this value to true
- reporter: jreporter # (required) GitLab username of the person reporting the deprecation
+ reporter: jreporter # (required) GitLab username of the person reporting the deprecation
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/395708 # (required) Link to the deprecation issue in GitLab
body: | # (required) Do not modify this line, instead modify the lines below.
diff --git a/data/removals/16_0/16-0-non-expiring-access-tokens.yml b/data/removals/16_0/16-0-non-expiring-access-tokens.yml
new file mode 100644
index 00000000000..5ef7df3a131
--- /dev/null
+++ b/data/removals/16_0/16-0-non-expiring-access-tokens.yml
@@ -0,0 +1,19 @@
+- title: "Non-expiring access tokens no longer supported"
+ announcement_milestone: "15.4" # (required) The milestone when this feature was deprecated.
+ removal_milestone: "16.0" # (required) The milestone when this feature is being removed.
+ breaking_change: true # (required) Change to false if this is not a breaking change.
+ reporter: jessieay # (required) GitLab username of the person reporting the removal
+ stage: Manage # (required) String value of the stage that the feature was created in. e.g., Growth
+ issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/369123
+ body: | # (required) Do not modify this line, instead modify the lines below.
+ Currently, you can create access tokens that have no expiration date. These access tokens are valid indefinitely, which presents a security risk if the access token is
+ divulged. Because expiring access tokens are better, from GitLab 15.4 we [populate a default expiration date](https://gitlab.com/gitlab-org/gitlab/-/issues/348660).
+
+ In GitLab 16.0, any personal, project, or group access token that does not have an expiration date will automatically have an expiration date set at 365 days later than the current date.
+#
+# 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: # (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/data/removals/16_0/16-0-postgresql-12.yml b/data/removals/16_0/16-0-postgresql-12.yml
index 9aa8102154b..9c860af7dbc 100644
--- a/data/removals/16_0/16-0-postgresql-12.yml
+++ b/data/removals/16_0/16-0-postgresql-12.yml
@@ -13,5 +13,5 @@
to PostgreSQL 13.
- Using an externally-provided PostgreSQL 12, you must upgrade to PostgreSQL 13 or later to meet the
[minimum version requirements](https://docs.gitlab.com/ee/install/requirements.html#postgresql-requirements).
- 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]
+ 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/administration/package_information/postgresql_versions.html
diff --git a/data/removals/16_0/16.0-config-fields-runner-helm-chart.yml b/data/removals/16_0/16.0-config-fields-runner-helm-chart.yml
index 47067eda63d..63c50842a0d 100644
--- a/data/removals/16_0/16.0-config-fields-runner-helm-chart.yml
+++ b/data/removals/16_0/16.0-config-fields-runner-helm-chart.yml
@@ -4,7 +4,7 @@
breaking_change: false # (required) Change to false if this is not a breaking change.
reporter: DarrenEastman # (required) GitLab username of the person reporting the removal
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/379064 # (required) Link to the deprecation issue in GitLab
+ issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/379064 # (required) Link to the deprecation issue in GitLab
body: | # (required) Do not modify this line, instead modify the lines below.
In GitLab 13.6 and later, users can [specify any runner configuration in the GitLab Runner Helm chart](https://docs.gitlab.com/runner/install/kubernetes.html). When this features was released, we deprecated the fields in the GitLab Helm Chart configuration specific to the runner. As of v1.0 of the GitLab Runner Helm chart (GitLab 16.0), the following fields have been removed and are no longer supported:
diff --git a/data/removals/16_0/16.0-eol-windows-server-2004-and-20H2.yml b/data/removals/16_0/16.0-eol-windows-server-2004-and-20H2.yml
index 9b47beed41b..267304f6a13 100644
--- a/data/removals/16_0/16.0-eol-windows-server-2004-and-20H2.yml
+++ b/data/removals/16_0/16.0-eol-windows-server-2004-and-20H2.yml
@@ -4,6 +4,6 @@
breaking_change: false # (required) Change to false if this is not a breaking change.
reporter: DarrenEastman # (required) GitLab username of the person reporting the removal
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-runner/-/issues/31001 # (required) Link to the deprecation issue in GitLab
+ issue_url: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/31001 # (required) Link to the deprecation issue in GitLab
body: | # (required) Do not modify this line, instead modify the lines below.
As of GitLab 16.0, GitLab Runner images based on Windows Server 2004 and 20H2 will not be provided as these operating systems are end-of-life.
diff --git a/data/removals/16_0/16.0-runner-api-does-not-return-paused-active.yml b/data/removals/16_0/16.0-runner-api-does-not-return-paused-active.yml
index 17ab36d36d2..7da64404eb3 100644
--- a/data/removals/16_0/16.0-runner-api-does-not-return-paused-active.yml
+++ b/data/removals/16_0/16.0-runner-api-does-not-return-paused-active.yml
@@ -4,7 +4,7 @@
breaking_change: true # (required) Change to false if this is not a breaking change.
reporter: DarrenEastman # (required) GitLab username of the person reporting the removal
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/344648 # (required) Link to the deprecation issue in GitLab
+ issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/344648 # (required) Link to the deprecation issue in GitLab
body: | # (required) Do not modify this line, instead modify the lines below.
In GitLab 16.0 and later, the GraphQL query for runners will no longer return the statuses `PAUSED` and `ACTIVE`.
diff --git a/db/post_migrate/20230428085332_remove_shimo_zentao_integration_records.rb b/db/post_migrate/20230428085332_remove_shimo_zentao_integration_records.rb
new file mode 100644
index 00000000000..079f1527e01
--- /dev/null
+++ b/db/post_migrate/20230428085332_remove_shimo_zentao_integration_records.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RemoveShimoZentaoIntegrationRecords < Gitlab::Database::Migration[2.1]
+ TYPES = %w[Integrations::Shimo Integrations::Zentao]
+ BATCH_SIZE = 100
+
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ return if Gitlab.jh?
+
+ define_batchable_model(:integrations)
+ .where(type_new: TYPES)
+ .each_batch(of: BATCH_SIZE) { |relation, _index| relation.delete_all }
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/post_migrate/20230508175057_backfill_corrected_secure_files_expirations.rb b/db/post_migrate/20230508175057_backfill_corrected_secure_files_expirations.rb
new file mode 100644
index 00000000000..9644a555756
--- /dev/null
+++ b/db/post_migrate/20230508175057_backfill_corrected_secure_files_expirations.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class BackfillCorrectedSecureFilesExpirations < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_ci
+
+ BATCH_SIZE = 1000
+
+ def up
+ each_batch_range('ci_secure_files', of: BATCH_SIZE) do |min, max|
+ sql = <<-SQL
+ SELECT id
+ FROM ci_secure_files
+ WHERE name ILIKE any (array['%.cer', '%.p12'])
+ AND ci_secure_files.id BETWEEN #{min} AND #{max}
+ SQL
+
+ rows = execute(sql)
+
+ rows.each do |row|
+ ::Ci::ParseSecureFileMetadataWorker.perform_async(row["id"])
+ end
+ end
+ end
+
+ def down; end
+end
diff --git a/db/schema_migrations/20230428085332 b/db/schema_migrations/20230428085332
new file mode 100644
index 00000000000..8ad6c10ada2
--- /dev/null
+++ b/db/schema_migrations/20230428085332
@@ -0,0 +1 @@
+9e822fbc2c7ce8044d0b38c5f1a9056431792e83fc9ed83056444c094e16c484
\ No newline at end of file
diff --git a/db/schema_migrations/20230508175057 b/db/schema_migrations/20230508175057
new file mode 100644
index 00000000000..959c02b49c8
--- /dev/null
+++ b/db/schema_migrations/20230508175057
@@ -0,0 +1 @@
+eaec908173fb60b88867e14c73c6ba7d6079742bae7ead59fa021d6d57e622da
\ No newline at end of file
diff --git a/doc/api/discussions.md b/doc/api/discussions.md
index 3eeef5d4afc..15bbc802817 100644
--- a/doc/api/discussions.md
+++ b/doc/api/discussions.md
@@ -855,7 +855,7 @@ Parameters:
| Attribute | Type | Required | Description |
| ------------------- | -------------- | -------- | ----------- |
-| `discussion_id` | integer | yes | The ID of a discussion item. |
+| `discussion_id` | string | yes | The ID of a discussion item. |
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
| `merge_request_iid` | integer | yes | The IID of a merge request. |
@@ -1023,7 +1023,7 @@ Parameters:
| Attribute | Type | Required | Description |
| ------------------- | -------------- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
-| `discussion_id` | integer | yes | The ID of a thread. |
+| `discussion_id` | string | yes | The ID of a thread. |
| `merge_request_iid` | integer | yes | The IID of a merge request. |
| `resolved` | boolean | yes | Resolve or unresolve the discussion. |
@@ -1047,7 +1047,7 @@ Parameters:
| ------------------- | -------------- | -------- | ----------- |
| `body` | string | yes | The content of the note or reply. |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
-| `discussion_id` | integer | yes | The ID of a thread. |
+| `discussion_id` | string | yes | The ID of a thread. |
| `merge_request_iid` | integer | yes | The IID of a merge request. |
| `note_id` | integer | yes | The ID of a thread note. |
| `created_at` | string | no | Date time string, ISO 8601 formatted, such as `2016-03-11T03:45:40Z`. Requires administrator or project/group owner rights. |
@@ -1069,7 +1069,7 @@ Parameters:
| Attribute | Type | Required | Description |
| ------------------- | -------------- | -------- | ----------- |
-| `discussion_id` | integer | yes | The ID of a thread. |
+| `discussion_id` | string | yes | The ID of a thread. |
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
| `merge_request_iid` | integer | yes | The IID of a merge request. |
| `note_id` | integer | yes | The ID of a thread note. |
@@ -1100,7 +1100,7 @@ Parameters:
| Attribute | Type | Required | Description |
| ------------------- | -------------- | -------- | ----------- |
-| `discussion_id` | integer | yes | The ID of a thread. |
+| `discussion_id` | string | yes | The ID of a thread. |
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
| `merge_request_iid` | integer | yes | The IID of a merge request. |
| `note_id` | integer | yes | The ID of a thread note. |
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index 263689894ca..938c2b812e6 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -1463,6 +1463,7 @@ Input type: `CiAiGenerateConfigInput`
| ---- | ---- | ----------- |
| `clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
+|
`userMessage` | [`AiMessageType`](#aimessagetype) | User chat message. |
### `Mutation.ciCdSettingsUpdate`
diff --git a/doc/development/database/database_migration_pipeline.md b/doc/development/database/database_migration_pipeline.md
index 70f9c1523c0..a9d525e2a41 100644
--- a/doc/development/database/database_migration_pipeline.md
+++ b/doc/development/database/database_migration_pipeline.md
@@ -73,3 +73,41 @@ Some additional information is included at the bottom of the comment:
migration (ending in `.log`) are available there, and only accessible by
database maintainers or with an access request. Details of the specific
batched background migration batches sampled are also available.
+
+## Test changes to the database testing pipeline
+
+To test a change to the database testing pipeline itself, you need:
+
+1. A merge request against GitLab Org.
+1. The change to be tested must be present on a branch on GitLab Ops.
+
+Use this self-documented script to test a merge request on GitLab Org against an arbitrary branch on GitLab Ops:
+
+```shell
+#! /usr/bin/env bash
+
+# The following must be set on a per-invocation basis:
+TESTING_TRIGGER_TOKEN='[REDACTED]' # Testing trigger token created in the CI section of the project
+CI_COMMIT_REF_NAME='55-post-notice-on-failure' # The branch on ops that you want to run against
+CI_MERGE_REQUEST_IID='117901' # Merge request ID of the MR on gitlab.com that you want to test
+SHA="fed6dd8a58d75a0e053a4972765b4fc08c5814a3" # The commit SHA of the HEAD of the branch you want to test on gitlab-org/gitlab
+
+# The following should not be changed between invocations:
+CI_JOB_URL='https://gitlab.com/gitlab-org/database-team/gitlab-com-database-testing/-/jobs/1590162939'
+# It doesn't appear that CI_JOB_URL has to be set to anything in particular for the pipeline to run
+# successfully, but this would normally be the URL to the upstream job that invokes the DB testing pipeline.
+CI_MERGE_REQUEST_PROJECT_ID='278964' # gitlab-org/gitlab numeric ID. Shouldn't change.
+CI_PROJECT_ID="gitlab-org/gitlab" # The slug identifying gitlab-org/gitlab.
+
+curl --verbose --request POST \
+ --form "token=$TESTING_TRIGGER_TOKEN" \
+ --form "ref=$CI_COMMIT_REF_NAME" \
+ --form "variables[TOP_UPSTREAM_MERGE_REQUEST_IID]=$CI_MERGE_REQUEST_IID" \
+ --form "variables[TOP_UPSTREAM_MERGE_REQUEST_PROJECT_ID]=$CI_MERGE_REQUEST_PROJECT_ID" \
+ --form "variables[TOP_UPSTREAM_SOURCE_JOB]=$CI_JOB_URL" \
+ --form "variables[TOP_UPSTREAM_SOURCE_PROJECT]=$CI_PROJECT_ID" \
+ --form "variables[VALIDATION_PIPELINE]=true" \
+ --form "variables[GITLAB_COMMIT_SHA]=$SHA" \
+ --form "variables[TRIGGER_SOURCE]=$CI_JOB_URL" \
+ "https://ops.gitlab.net/api/v4/projects/429/trigger/pipeline"
+```
diff --git a/doc/update/index.md b/doc/update/index.md
index 74aec1bdf1e..b5442263106 100644
--- a/doc/update/index.md
+++ b/doc/update/index.md
@@ -278,9 +278,9 @@ and [Helm Chart deployments](https://docs.gitlab.com/charts/). They come with ap
### 15.11.0
-- Upgrades to GitLab 15.11 directly from GitLab versions 15.5.0 and earlier on self-managed installs will fail due to a missing migration until the fix for [issue 408304](https://gitlab.com/gitlab-org/gitlab/-/issues/408304) is released in an upcoming patch release. Affected users wanting to upgrade to 15.11.x can either:
+- Upgrades to GitLab 15.11 directly from GitLab versions 15.5.0 and earlier on self-managed installs will fail due to a missing migration until the fix for [issue 408304](https://gitlab.com/gitlab-org/gitlab/-/issues/408304) is released in version 15.11.3. Affected users wanting to upgrade to 15.11 can either:
- Perform an intermediate upgrade to any version between 15.5 and 15.10 before upgrading to 15.11, or
- - Target the forthcoming patch release.
+ - Target version 15.11.3 or later.
### 15.10.5
diff --git a/doc/update/removals.md b/doc/update/removals.md
index d0a6952745a..ee7c0159d5a 100644
--- a/doc/update/removals.md
+++ b/doc/update/removals.md
@@ -190,6 +190,17 @@ The [**Maximum number of active pipelines per project** limit](https://docs.gitl
- [**Pipelines rate limits**](https://docs.gitlab.com/ee/user/admin_area/settings/rate_limit_on_pipelines_creation.html).
- [**Total number of jobs in currently active pipelines**](https://docs.gitlab.com/ee/user/admin_area/settings/continuous_integration.html#set-cicd-limits).
+### Non-expiring access tokens no longer supported
+
+WARNING:
+This is a [breaking change](https://docs.gitlab.com/ee/development/deprecation_guidelines/).
+Review the details carefully before upgrading.
+
+Currently, you can create access tokens that have no expiration date. These access tokens are valid indefinitely, which presents a security risk if the access token is
+divulged. Because expiring access tokens are better, from GitLab 15.4 we [populate a default expiration date](https://gitlab.com/gitlab-org/gitlab/-/issues/348660).
+
+In GitLab 16.0, any personal, project, or group access token that does not have an expiration date will automatically have an expiration date set at 365 days later than the current date.
+
### Non-standard default Redis ports are no longer supported
WARNING:
@@ -323,6 +334,15 @@ Review the details carefully before upgrading.
From GitLab 15.9, all Release links are external. The `external` field in the Releases and Release link APIs was deprecated in 15.9, and removed in GitLab 16.0.
+### Security report schemas version 14.x.x
+
+WARNING:
+This is a [breaking change](https://docs.gitlab.com/ee/development/deprecation_guidelines/).
+Review the details carefully before upgrading.
+
+Version 14.x.x [security report schemas](https://gitlab.com/gitlab-org/security-products/security-report-schemas) have been removed.
+Security reports that use schema version 14.x.x will cause an error in the pipeline's **Security** tab. For more information, refer to [security report validation](https://docs.gitlab.com/ee/user/application_security/#security-report-validation).
+
### Stop publishing GitLab Runner images based on Windows Server 2004 and 20H2
As of GitLab 16.0, GitLab Runner images based on Windows Server 2004 and 20H2 will not be provided as these operating systems are end-of-life.
diff --git a/doc/user/group/settings/group_access_tokens.md b/doc/user/group/settings/group_access_tokens.md
index bb421e4e470..be9821e1b68 100644
--- a/doc/user/group/settings/group_access_tokens.md
+++ b/doc/user/group/settings/group_access_tokens.md
@@ -28,11 +28,7 @@ associated with a group rather than a project or user.
In self-managed instances, group access tokens are subject to the same [maximum lifetime limits](../../admin_area/settings/account_and_limit_settings.md#limit-the-lifetime-of-access-tokens) as personal access tokens if the limit is set.
WARNING:
-The ability to create group access tokens without expiry was
-[deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/369122) in GitLab 15.4 and is planned for removal in GitLab
-16.0. When this ability is removed, existing group access tokens without an expiry are planned to have an expiry added.
-The automatic adding of an expiry occurs on GitLab.com during the 16.0 milestone. The automatic adding of an expiry
-occurs on self-managed instances when they are upgraded to GitLab 16.0. This change is a breaking change.
+The ability to create group access tokens without an expiry date was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/369122) in GitLab 15.4 and [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/392855) in GitLab 16.0. In GitLab 16.0 and later, existing group access tokens without an expiry date are automatically given an expiry date 365 days later than the current date. The automatic adding of an expiry date occurs on GitLab.com during the 16.0 milestone. The automatic adding of an expiry date occurs on self-managed instances when they are upgraded to GitLab 16.0. This change is a breaking change.
You can use group access tokens:
@@ -52,13 +48,18 @@ configured for personal access tokens.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214045) in GitLab 14.7.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/348660) in GitLab 15.3, default expiration of 30 days and default role of Guest is populated in the UI.
+> - Ability to create non-expiring group access tokens [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/392855) in GitLab 16.0.
To create a group access token:
1. On the top bar, select **Main menu > Groups** and find your group.
1. On the left sidebar, select **Settings > Access Tokens**.
1. Enter a name. The token name is visible to any user with permissions to view the group.
-1. Optional. Enter an expiry date for the token. The token will expire on that date at midnight UTC. An instance-wide [maximum lifetime](../../admin_area/settings/account_and_limit_settings.md#limit-the-lifetime-of-access-tokens) setting can limit the maximum allowable lifetime in self-managed instances.
+1. Enter an expiry date for the token:
+ - The token expires on that date at midnight UTC.
+ - If you do not enter an expiry date, the expiry date is automatically set to 365 days later than the current date.
+ - By default, this date can be a maximum of 365 days later than the current date.
+ - An instance-wide [maximum lifetime](../../admin_area/settings/account_and_limit_settings.md#limit-the-lifetime-of-access-tokens) setting can limit the maximum allowable lifetime in self-managed instances.
1. Select a role for the token.
1. Select the [desired scopes](#scopes-for-a-group-access-token).
1. Select **Create group access token**.
diff --git a/doc/user/profile/personal_access_tokens.md b/doc/user/profile/personal_access_tokens.md
index 0d886519766..e59d7313281 100644
--- a/doc/user/profile/personal_access_tokens.md
+++ b/doc/user/profile/personal_access_tokens.md
@@ -20,11 +20,7 @@ Personal access tokens can be an alternative to [OAuth2](../../api/oauth2.md) an
In both cases, you authenticate with a personal access token in place of your password.
WARNING:
-The ability to create personal access tokens without expiry was
-[deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/369122) in GitLab 15.4 and is planned for removal in GitLab
-16.0. When this ability is removed, existing personal access tokens without an expiry are planned to have an expiry added.
-The automatic adding of an expiry occurs on GitLab.com during the 16.0 milestone. The automatic adding of an expiry
-occurs on self-managed instances when they are upgraded to GitLab 16.0. This change is a breaking change.
+The ability to create personal access tokens without expiry was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/369122) in GitLab 15.4 and [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/392855) in GitLab 16.0. In GitLab 16.0 and later, existing personal access tokens without an expiry date are automatically given an expiry date of 365 days later than the current date. The automatic adding of an expiry date occurs on GitLab.com during the 16.0 milestone. The automatic adding of an expiry date occurs on self-managed instances when they are upgraded to GitLab 16.0. This change is a breaking change.
Personal access tokens are:
@@ -47,14 +43,18 @@ Use impersonation tokens to automate authentication as a specific user.
## Create a personal access token
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/348660) in GitLab 15.3, default expiration of 30 days is populated in the UI.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/348660) in GitLab 15.3, default expiration of 30 days is populated in the UI.
+> - Ability to create non-expiring personal access tokens [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/392855) in GitLab 16.0.
You can create as many personal access tokens as you like.
1. In the upper-right corner, select your avatar.
1. Select **Edit profile**.
1. On the left sidebar, select **Access Tokens**.
-1. Enter a name and optional expiry date for the token.
+1. Enter a name and expiry date for the token.
+ - The token expires on that date at midnight UTC.
+ - If you do not enter an expiry date, the expiry date is automatically set to 365 days later than the current date.
+ - By default, this date can be a maximum of 365 days later than the current date.
1. Select the [desired scopes](#personal-access-token-scopes).
1. Select **Create personal access token**.
diff --git a/doc/user/project/settings/project_access_tokens.md b/doc/user/project/settings/project_access_tokens.md
index ff69d7e4763..a9201f57155 100644
--- a/doc/user/project/settings/project_access_tokens.md
+++ b/doc/user/project/settings/project_access_tokens.md
@@ -28,11 +28,7 @@ and [personal access tokens](../../profile/personal_access_tokens.md).
In self-managed instances, project access tokens are subject to the same [maximum lifetime limits](../../admin_area/settings/account_and_limit_settings.md#limit-the-lifetime-of-access-tokens) as personal access tokens if the limit is set.
WARNING:
-The ability to create project access tokens without expiry was
-[deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/369122) in GitLab 15.4 and is planned for removal in GitLab
-16.0. When this ability is removed, existing project access tokens without an expiry are planned to have an expiry added.
-The automatic adding of an expiry occurs on GitLab.com during the 16.0 milestone. The automatic adding of an expiry
-occurs on self-managed instances when they are upgraded to GitLab 16.0. This change is a breaking change.
+The ability to create project access tokens without expiry was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/369122) in GitLab 15.4 and [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/392855) in GitLab 16.0. In GitLab 16.0 and later, existing project access tokens without an expiry date are automatically given an expiry date of 365 days later than the current date. The automatic adding of an expiry date occurs on GitLab.com during the 16.0 milestone. The automatic adding of an expiry date occurs on self-managed instances when they are upgraded to GitLab 16.0. This change is a breaking change.
You can use project access tokens:
@@ -52,14 +48,18 @@ configured for personal access tokens.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/89114) in GitLab 15.1, Owners can select Owner role for project access tokens.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/348660) in GitLab 15.3, default expiration of 30 days and default role of Guest is populated in the UI.
+> - Ability to create non-expiring project access tokens [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/392855) in GitLab 16.0.
To create a project access token:
1. On the top bar, select **Main menu > Projects** and find your project.
1. On the left sidebar, select **Settings > Access Tokens**.
1. Enter a name. The token name is visible to any user with permissions to view the project.
-1. Optional. Enter an expiry date for the token. The token expires on that date at midnight UTC. An instance-wide [maximum lifetime](../../admin_area/settings/account_and_limit_settings.md#limit-the-lifetime-of-access-tokens) setting can limit the maximum allowable lifetime in self-managed instances.
-
+1. Enter an expiry date for the token.
+ - The token expires on that date at midnight UTC.
+ - If you do not enter an expiry date, the expiry date is automatically set to 365 days later than the current date.
+ - By default, this date can be a maximum of 365 days later than the current date.
+ - An instance-wide [maximum lifetime](../../admin_area/settings/account_and_limit_settings.md#limit-the-lifetime-of-access-tokens) setting can limit the maximum allowable lifetime in self-managed instances.
1. Select a role for the token.
1. Select the [desired scopes](#scopes-for-a-project-access-token).
1. Select **Create project access token**.
diff --git a/doc/user/workspace/index.md b/doc/user/workspace/index.md
index 60688ac9356..0d540023c2c 100644
--- a/doc/user/workspace/index.md
+++ b/doc/user/workspace/index.md
@@ -6,7 +6,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Workspaces (Beta) **(PREMIUM)**
-> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10122) in GitLab 16.0 [with a flag](../../administration/feature_flags.md) named `remote_development_feature_flag`. Disabled by default.
+> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10122) in GitLab 16.0 [with a flag](../../administration/feature_flags.md) named `remote_development_feature_flag`. Enabled by default.
FLAG:
On self-managed GitLab, by default this feature is not available. To make it available, ask an administrator to [enable the feature flag](../../administration/feature_flags.md) named `remote_development_feature_flag`. On GitLab.com, this feature is not available. The feature is not ready for production use.
diff --git a/lib/gitlab/access.rb b/lib/gitlab/access.rb
index fa025a2658f..bafda11170a 100644
--- a/lib/gitlab/access.rb
+++ b/lib/gitlab/access.rb
@@ -16,6 +16,7 @@ module Gitlab
DEVELOPER = 30
MAINTAINER = 40
OWNER = 50
+ ADMIN = 60
# Branch protection settings
PROTECTION_NONE = 0
diff --git a/lib/gitlab/database/gitlab_schema.rb b/lib/gitlab/database/gitlab_schema.rb
index b04a2058be0..4394c089b22 100644
--- a/lib/gitlab/database/gitlab_schema.rb
+++ b/lib/gitlab/database/gitlab_schema.rb
@@ -150,7 +150,7 @@ module Gitlab
if data['gitlab_schema'].nil?
raise(
UnknownSchemaError,
- "#{file_path} must specify a valid gitlab_schema for #{key_name}." \
+ "#{file_path} must specify a valid gitlab_schema for #{key_name}. " \
"See https://docs.gitlab.com/ee/development/database/database_dictionary.html"
)
end
diff --git a/lib/gitlab/quick_actions/issue_actions.rb b/lib/gitlab/quick_actions/issue_actions.rb
index 10e8c702826..d7e9e1a980b 100644
--- a/lib/gitlab/quick_actions/issue_actions.rb
+++ b/lib/gitlab/quick_actions/issue_actions.rb
@@ -255,7 +255,7 @@ module Gitlab
execution_message { _('Issue has been promoted to incident') }
types Issue
condition do
- !quick_action_target.incident? &&
+ !quick_action_target.work_item_type&.incident? &&
current_user.can?(:"set_#{quick_action_target.issue_type}_metadata", quick_action_target)
end
command :promote_to_incident do
@@ -298,7 +298,7 @@ module Gitlab
params '
|