diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-02 12:10:05 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-02 12:10:05 +0000 |
commit | 2e4e6e9bb63212c628e67c6865fa39f62217a83d (patch) | |
tree | 207b9f8d3a7bd6bce448935fea21601744035e40 /lib | |
parent | b2180a27bcf74e622df4d7fb173306d80b973a6c (diff) | |
download | gitlab-ce-2e4e6e9bb63212c628e67c6865fa39f62217a83d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers/services_helpers.rb | 4 | ||||
-rw-r--r-- | lib/csv_builder.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml | 13 | ||||
-rw-r--r-- | lib/gitlab/integrations/sti_type.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb | 8 |
5 files changed, 11 insertions, 18 deletions
diff --git a/lib/api/helpers/services_helpers.rb b/lib/api/helpers/services_helpers.rb index 784c12a89fc..2efe6663f3f 100644 --- a/lib/api/helpers/services_helpers.rb +++ b/lib/api/helpers/services_helpers.rb @@ -798,14 +798,14 @@ module API ::Integrations::Packagist, ::Integrations::PipelinesEmail, ::Integrations::Pivotaltracker, + ::Integrations::Pushover, ::Integrations::Redmine, ::Integrations::Slack, ::Integrations::Teamcity, ::Integrations::Youtrack, ::MattermostSlashCommandsService, ::SlackSlashCommandsService, - ::PrometheusService, - ::PushoverService + ::PrometheusService ] end diff --git a/lib/csv_builder.rb b/lib/csv_builder.rb index 43ceed9519b..f270f7984da 100644 --- a/lib/csv_builder.rb +++ b/lib/csv_builder.rb @@ -16,7 +16,7 @@ class CsvBuilder DEFAULT_ORDER_BY = 'id' DEFAULT_BATCH_SIZE = 1000 - PREFIX_REGEX = /^[=\+\-@;]/.freeze + PREFIX_REGEX = /\A[=\+\-@;]/.freeze attr_reader :rows_written diff --git a/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml b/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml deleted file mode 100644 index 87f78d0c887..00000000000 --- a/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Deprecated: https://gitlab.com/gitlab-org/gitlab/issues/14624 -# Please, use License-Scanning.gitlab-ci.yml template instead - -include: - - template: License-Scanning.gitlab-ci.yml - -license_scanning: - before_script: - - | - echo "As of GitLab 12.8, we deprecated the License-Management.gitlab.ci.yml template. - Please replace it with the License-Scanning.gitlab-ci.yml template instead. - For more details visit - https://docs.gitlab.com/ee/user/compliance/license_compliance/#migration-from-license_management-to-license_scanning" diff --git a/lib/gitlab/integrations/sti_type.rb b/lib/gitlab/integrations/sti_type.rb index c5f38372777..c0913f30f7e 100644 --- a/lib/gitlab/integrations/sti_type.rb +++ b/lib/gitlab/integrations/sti_type.rb @@ -7,7 +7,7 @@ module Gitlab Asana Assembla Bamboo Bugzilla Buildkite Campfire Confluence CustomIssueTracker Datadog Discord DroneCi EmailsOnPush Ewm ExternalWiki Flowdock HangoutsChat IssueTracker Irker Jenkins Jira Mattermost MicrosoftTeams MockCi Packagist PipelinesEmail Pivotaltracker - Redmine Slack Teamcity UnifyCircuit Youtrack WebexTeams + Pushover Redmine Slack Teamcity UnifyCircuit Youtrack WebexTeams )).freeze def cast(value) diff --git a/lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb b/lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb index 79ac853ea0c..b456dcdb666 100644 --- a/lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb +++ b/lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb @@ -51,6 +51,8 @@ module Gitlab end end + job['idempotency_key'] = idempotency_key + self.existing_jid = read_jid.value end @@ -117,7 +119,7 @@ module Gitlab end def idempotency_key - @idempotency_key ||= "#{namespace}:#{idempotency_hash}" + @idempotency_key ||= job['idempotency_key'] || "#{namespace}:#{idempotency_hash}" end def idempotency_hash @@ -129,6 +131,10 @@ module Gitlab end def idempotency_string + # TODO: dump the argument's JSON using `Sidekiq.dump_json` instead + # this should be done in the next release so all jobs are written + # with their idempotency key. + # see https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/1090 "#{worker_class_name}:#{arguments.join('-')}" end end |