Read about our upcoming Code of Conduct on this issue

Commit 3fc5e59a authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent c55a3f35ba2b
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-golang-1.12-git-2.22-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-9.6-graphicsmagick-1.3.33"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-9.6-graphicsmagick-1.3.33"
stages:
- sync
......
......@@ -13,7 +13,7 @@
- .default-before_script
- .assets-compile-cache
- .only:changes-code-backstage-qa
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-git-2.22-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-19.03.1
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-19.03.1
stage: test
dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
......
......@@ -202,7 +202,7 @@
- name: redis:alpine
.use-pg10:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-golang-1.12-git-2.22-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
services:
- name: postgres:10.9
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
......@@ -216,7 +216,7 @@
- name: docker.elastic.co/elasticsearch/elasticsearch:5.6.12
.use-pg10-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-golang-1.12-git-2.22-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
services:
- name: postgres:10.9
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
......
......@@ -232,9 +232,3 @@ dast:
- gl-dast-report.json
reports:
dast: gl-dast-report.json
only:
variables:
- $GITLAB_FEATURES =~ /\bdast\b/
except:
variables:
- $DAST_DISABLED
......@@ -828,6 +828,13 @@ Please view this file on the master branch, on stable branches it's out of date.
- Don't send CI usage email notifications for self-hosted instances. !14809
## 12.0.10
### Fixed (1 change)
- Backport the new reliable fetcher to 12.0.9. !20532
## 12.0.7
### Security (3 changes)
......
......@@ -8,6 +8,7 @@ entry.
 
- Update maven_file_name_regex for full string match.
 
## 12.5.3
 
### Fixed (4 changes)
......@@ -768,6 +769,7 @@ entry.
 
- Update maven_file_name_regex for full string match.
 
## 12.3.7
 
### Security (12 changes)
......@@ -1091,10 +1093,6 @@ entry.
- Updates tooltip of 'detached' label/state.
 
 
## 12.2.10
- No changes.
## 12.2.8
 
### Security (1 change)
......
......@@ -242,7 +242,7 @@ gem 'slack-notifier', '~> 1.5.1'
gem 'hangouts-chat', '~> 0.0.5'
# Asana integration
gem 'asana', '~> 0.8.1'
gem 'asana', '~> 0.9'
# FogBugz integration
gem 'ruby-fogbugz', '~> 0.2.1'
......
......@@ -63,11 +63,11 @@ GEM
graphql (>= 1.8)
rails (>= 4.2)
arel (9.0.0)
asana (0.8.1)
asana (0.9.3)
faraday (~> 0.9)
faraday_middleware (~> 0.9)
faraday_middleware-multi_json (~> 0.0)
oauth2 (~> 1.0)
oauth2 (~> 1.4)
asciidoctor (2.0.10)
asciidoctor-include-ext (0.3.1)
asciidoctor (>= 1.5.6, < 3.0.0)
......@@ -1119,7 +1119,7 @@ DEPENDENCIES
addressable (~> 2.5.2)
akismet (~> 2.0)
apollo_upload_server (~> 2.0.0.beta3)
asana (~> 0.8.1)
asana (~> 0.9)
asciidoctor (~> 2.0.10)
asciidoctor-include-ext (~> 0.3.1)
asciidoctor-plantuml (= 0.0.9)
......
......@@ -43,7 +43,7 @@ const Api = {
releasesPath: '/api/:version/projects/:id/releases',
releasePath: '/api/:version/projects/:id/releases/:tag_name',
mergeRequestsPipeline: '/api/:version/projects/:id/merge_requests/:merge_request_iid/pipelines',
adminStatisticsPath: 'api/:version/application/statistics',
adminStatisticsPath: '/api/:version/application/statistics',
group(groupId, callback) {
const url = Api.buildUrl(Api.groupPath).replace(':id', groupId);
......
......@@ -44,12 +44,14 @@ export default {
'Serverless|Your repository does not have a corresponding %{startTag}serverless.yml%{endTag} file.',
),
{ startTag: '<code>', endTag: '</code>' },
false,
);
},
noGitlabYamlConfigured() {
return sprintf(
s__('Serverless|Your %{startTag}.gitlab-ci.yml%{endTag} file is not properly configured.'),
{ startTag: '<code>', endTag: '</code>' },
false,
);
},
mismatchedServerlessFunctions() {
......@@ -58,6 +60,7 @@ export default {
"Serverless|The functions listed in the %{startTag}serverless.yml%{endTag} file don't match the namespace of your cluster.",
),
{ startTag: '<code>', endTag: '</code>' },
false,
);
},
},
......@@ -111,15 +114,9 @@ export default {
}}
</p>
<ul>
<li>
{{ noServerlessConfigFile }}
</li>
<li>
{{ noGitlabYamlConfigured }}
</li>
<li>
{{ mismatchedServerlessFunctions }}
</li>
<li v-html="noServerlessConfigFile"></li>
<li v-html="noGitlabYamlConfigured"></li>
<li v-html="mismatchedServerlessFunctions"></li>
<li>{{ s__('Serverless|The deploy job has not finished.') }}</li>
</ul>
......
......@@ -32,14 +32,13 @@ export default {
};
</script>
<template>
<div class="title hide-collapsed" data-qa-selector="assignee_title">
<div class="title hide-collapsed">
{{ assigneeTitle }}
<i v-if="loading" aria-hidden="true" class="fa fa-spinner fa-spin block-loading"></i>
<a
v-if="editable"
class="js-sidebar-dropdown-toggle edit-link float-right"
href="#"
data-qa-selector="assignee_edit_link"
data-track-event="click_edit_button"
data-track-label="right_sidebar"
data-track-property="assignee"
......
......@@ -81,12 +81,12 @@ def execute(data)
def check_commit(message, push_msg)
# matches either:
# - #1234
# - https://app.asana.com/0/0/1234
# - https://app.asana.com/0/{project_gid}/{task_gid}
# optionally preceded with:
# - fix/ed/es/ing
# - close/s/d
# - closing
issue_finder = %r{(fix\w*|clos[ei]\w*+)?\W*(?:https://app\.asana\.com/\d+/\d+/(\d+)|#(\d+))}i
issue_finder = %r{(fix\w*|clos[ei]\w*+)?\W*(?:https://app\.asana\.com/\d+/\w+/(\w+)|#(\w+))}i
message.scan(issue_finder).each do |tuple|
# tuple will be
......@@ -94,7 +94,7 @@ def check_commit(message, push_msg)
taskid = tuple[2] || tuple[1]
begin
task = Asana::Task.find_by_id(client, taskid)
task = Asana::Resources::Task.find_by_id(client, taskid)
task.add_comment(text: "#{push_msg} #{message}")
if tuple[0]
......
......@@ -13,30 +13,29 @@ def add_link(link)
if can_add_link? && (link = parse_link(link))
begin
add_zoom_meeting(link)
success(_('Zoom meeting added'))
rescue ActiveRecord::RecordNotUnique
error(_('Failed to add a Zoom meeting'))
error(message: _('Failed to add a Zoom meeting'))
end
else
error(_('Failed to add a Zoom meeting'))
error(message: _('Failed to add a Zoom meeting'))
end
end
def remove_link
if can_remove_link?
remove_zoom_meeting
success(_('Zoom meeting removed'))
success(message: _('Zoom meeting removed'))
else
error(_('Failed to remove a Zoom meeting'))
error(message: _('Failed to remove a Zoom meeting'))
end
end
def can_add_link?
can_update_issue? && !@added_meeting
can_change_link? && !@added_meeting
end
def can_remove_link?
can_update_issue? && !!@added_meeting
can_change_link? && @issue.persisted? && !!@added_meeting
end
def parse_link(link)
......@@ -56,14 +55,29 @@ def track_meeting_removed_event
end
def add_zoom_meeting(link)
ZoomMeeting.create(
zoom_meeting = new_zoom_meeting(link)
response =
if @issue.persisted?
# Save the meeting directly since we only want to update one meeting, not all
zoom_meeting.save
success(message: _('Zoom meeting added'))
else
success(message: _('Zoom meeting added'), payload: { zoom_meetings: [zoom_meeting] })
end
track_meeting_added_event
SystemNoteService.zoom_link_added(@issue, @project, current_user)
response
end
def new_zoom_meeting(link)
ZoomMeeting.new(
issue: @issue,
project: @issue.project,
project: @project,
issue_status: :added,
url: link
)
track_meeting_added_event
SystemNoteService.zoom_link_added(@issue, @project, current_user)
end
def remove_zoom_meeting
......@@ -72,16 +86,20 @@ def remove_zoom_meeting
SystemNoteService.zoom_link_removed(@issue, @project, current_user)
end
def success(message)
ServiceResponse.success(message: message)
def success(message:, payload: nil)
ServiceResponse.success(message: message, payload: payload)
end
def error(message)
def error(message:)
ServiceResponse.error(message: message)
end
def can_update_issue?
can?(current_user, :update_issue, project)
def can_change_link?
if @issue.persisted?
can?(current_user, :update_issue, @project)
else
can?(current_user, :create_issue, @project)
end
end
end
end
---
title: Collect the date a SaaS trial starts on
merge_request: 20384
author:
type: added
---
title: Fix Zoom Quick Action server error when creating a GitLab Issue
merge_request: 21262
author:
type: fixed
---
title: Change Puma log format to JSON
merge_request: 21101
author:
type: other
---
title: Fix Asana integration
merge_request: 21501
author:
type: fixed
# frozen_string_literal: true
# Gitlab.com uses Snowplow for identifying users and events.
# https://gitlab.com/gitlab-org/gitlab/issues/6329
#
# SnowplowTracker write log into STDERR
# https://github.com/snowplow/snowplow-ruby-tracker/blob/39fcfa2be793f2e25e73087a9700abc93f43b5e8/lib/snowplow-tracker/emitters.rb#L23
# `LOGGER = Logger.new(STDERR)`
#
# In puma.rb, if `stdout_redirect` specify stderr, Puma will overwrite STDERR in:
# https://github.com/puma/puma/blob/b41205f5cacbc2ad0060472bdce68ba636f42175/lib/puma/runner.rb#L134
# `STDERR.reopen stderr, (append ? "a" : "w")`
# As a result, SnowplowTracker will log into Puma stderr, when Puma enabled.
#
# By default, SnowplowTracker uses default log formatter.
# When enable Puma, SnowplowTracker log is expected to be JSON format, as part of puma_stderr.log.
# Hence overwrite ::SnowplowTracker::LOGGER.formatter to JSON formatter
if defined?(::Puma) && defined?(::SnowplowTracker::LOGGER)
::SnowplowTracker::LOGGER.formatter = proc do |severity, datetime, progname, msg|
{ severity: severity, timestamp: datetime.utc.iso8601(3), pid: $$, progname: progname, message: msg }.to_json << "\n"
end
end
......@@ -78,3 +78,11 @@
# value is 60 seconds.
#
worker_timeout 60
# Use json formatter
require_relative "/home/git/gitlab/lib/gitlab/puma_logging/json_formatter"
json_formatter = Gitlab::PumaLogging::JSONFormatter.new
log_formatter do |str|
json_formatter.call(str)
end
......@@ -68,3 +68,11 @@ tag 'gitlab-puma-worker'
# value is 60 seconds.
#
worker_timeout 60
# Use json formatter
require_relative "/home/git/gitlab/lib/gitlab/puma_logging/json_formatter"
json_formatter = Gitlab::PumaLogging::JSONFormatter.new
log_formatter do |str|
json_formatter.call(str)
end
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment