Skip to content
Snippets Groups Projects
Commit c82f9ecc authored by 🤖 GitLab Bot 🤖's avatar 🤖 GitLab Bot 🤖
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 223ffc2e
No related branches found
No related tags found
Loading
Pipeline #1687522758 passed with warnings
Showing
with 857 additions and 750 deletions
......@@ -217,7 +217,7 @@
{"name":"gettext","version":"3.5.1","platform":"ruby","checksum":"03ec7f71ea7e2cf1fdcd5e08682e98b81601922fdbee890b7bc6f63b0e1a512a"},
{"name":"gettext_i18n_rails","version":"1.13.0","platform":"ruby","checksum":"d4a4739d928b6ce52a2d694d33a831dcb06c7c8e197b3172fc73dfaa20ac8ee6"},
{"name":"git","version":"1.19.1","platform":"ruby","checksum":"b0a422d9f6517353c48a330d6114de4db9e0c82dbe7202964a1d9f1fbc827d70"},
{"name":"gitaly","version":"17.8.2","platform":"ruby","checksum":"a6e554288f106d046843ee0eadd9785837dea9bd796ec9a6cdd56f9fef840787"},
{"name":"gitaly","version":"17.8.3","platform":"ruby","checksum":"e82687604d4c171a55aa278058062470f04091c0ed57e1c37893d0c6f32e98d4"},
{"name":"gitlab","version":"4.19.0","platform":"ruby","checksum":"3f645e3e195dbc24f0834fbf83e8ccfb2056d8e9712b01a640aad418a6949679"},
{"name":"gitlab-chronic","version":"0.10.6","platform":"ruby","checksum":"a244d11a1396d2aac6ae9b2f326adf1605ec1ad20c29f06e8b672047d415a9ac"},
{"name":"gitlab-cloud-connector","version":"1.0.0","platform":"ruby","checksum":"edf2d13c698e1eb8a6828acefa7c12230f1e47d48212710f1617d5f986d051af"},
......
......@@ -724,7 +724,7 @@ GEM
git (1.19.1)
addressable (~> 2.8)
rchardet (~> 1.8)
gitaly (17.8.2)
gitaly (17.8.3)
grpc (~> 1.0)
gitlab (4.19.0)
httparty (~> 0.20)
......
......@@ -217,7 +217,7 @@
{"name":"gettext","version":"3.5.1","platform":"ruby","checksum":"03ec7f71ea7e2cf1fdcd5e08682e98b81601922fdbee890b7bc6f63b0e1a512a"},
{"name":"gettext_i18n_rails","version":"1.13.0","platform":"ruby","checksum":"d4a4739d928b6ce52a2d694d33a831dcb06c7c8e197b3172fc73dfaa20ac8ee6"},
{"name":"git","version":"1.19.1","platform":"ruby","checksum":"b0a422d9f6517353c48a330d6114de4db9e0c82dbe7202964a1d9f1fbc827d70"},
{"name":"gitaly","version":"17.8.2","platform":"ruby","checksum":"a6e554288f106d046843ee0eadd9785837dea9bd796ec9a6cdd56f9fef840787"},
{"name":"gitaly","version":"17.8.3","platform":"ruby","checksum":"e82687604d4c171a55aa278058062470f04091c0ed57e1c37893d0c6f32e98d4"},
{"name":"gitlab","version":"4.19.0","platform":"ruby","checksum":"3f645e3e195dbc24f0834fbf83e8ccfb2056d8e9712b01a640aad418a6949679"},
{"name":"gitlab-chronic","version":"0.10.6","platform":"ruby","checksum":"a244d11a1396d2aac6ae9b2f326adf1605ec1ad20c29f06e8b672047d415a9ac"},
{"name":"gitlab-cloud-connector","version":"1.0.0","platform":"ruby","checksum":"edf2d13c698e1eb8a6828acefa7c12230f1e47d48212710f1617d5f986d051af"},
......
......@@ -736,7 +736,7 @@ GEM
git (1.19.1)
addressable (~> 2.8)
rchardet (~> 1.8)
gitaly (17.8.2)
gitaly (17.8.3)
grpc (~> 1.0)
gitlab (4.19.0)
httparty (~> 0.20)
......
......@@ -112,14 +112,22 @@ export default {
filteredPods() {
return this.k8sPods.filter((pod) => {
const matchesStatus = !this.statusFilter || pod.status === this.statusFilter;
const matchesSearch = !this.podsSearch || pod.name.includes(this.podsSearch);
const matchesSearch = !this.podsSearch || this.search(this.podsSearch, pod.name);
return matchesStatus && matchesSearch;
});
},
},
methods: {
search(searchTerm, podName) {
return podName.includes(searchTerm);
},
countPodsByPhase(phase) {
const filteredPods = this.k8sPods?.filter((item) => item.status === phase) || [];
const pods = this.k8sPods || [];
const filteredPods = pods.filter((item) => {
const matchesPhase = item.status === phase;
if (!this.podsSearch) return matchesPhase;
return matchesPhase && this.search(this.podsSearch, item.name);
});
const hasFailedState = Boolean(phase === STATUS_FAILED && filteredPods.length);
this.$emit('update-failed-state', { pods: hasFailedState });
......@@ -155,8 +163,6 @@ export default {
<gl-loading-icon v-if="loading" />
<template v-else-if="!error">
<workload-stats v-if="podStats" :stats="podStats" class="gl-mt-3" @select="filterPods" />
<gl-search-box-by-type
v-model.trim="podsSearch"
:placeholder="$options.i18n.searchPlaceholder"
......@@ -173,6 +179,8 @@ export default {
</gl-sprintf>
</div>
<workload-stats v-if="podStats" :stats="podStats" class="gl-mt-3" @select="filterPods" />
<workload-table
v-if="k8sPods"
:items="filteredPods"
......
......@@ -139,6 +139,11 @@ export default {
required: false,
default: () => [],
},
eeSearchTokens: {
type: Array,
required: false,
default: () => [],
},
},
data() {
return {
......@@ -405,6 +410,10 @@ export default {
});
}
if (this.eeSearchTokens.length) {
tokens.push(...this.eeSearchTokens);
}
tokens.sort((a, b) => a.title.localeCompare(b.title));
return tokens;
......
......@@ -7,10 +7,6 @@ class ApplicationSetting < ApplicationRecord
include ChronicDurationAttribute
include Sanitizable
ignore_columns %i[
cloud_connector_keys
], remove_with: '17.10', remove_after: '2025-02-15'
ignore_column :pre_receive_secret_detection_enabled, remove_with: '17.9', remove_after: '2025-02-15'
ignore_columns %i[
......
......@@ -25,8 +25,9 @@ def execute
error(@model_version.errors.full_messages) unless @model_version.persisted?
package = find_or_create_candidate
package ||= find_or_create_package(@model.name, @version)
candidate = find_or_create_candidate
package = candidate.package || find_or_create_package(@model.name, @version)
error(_("Can't create model version package")) unless package
@model_version.update! package: package
......@@ -61,17 +62,13 @@ def find_or_create_candidate
package = candidate.package
package.update!(name: @model_version.name, version: @model_version.version) if package
candidate
else
candidate = ::Ml::CreateCandidateService.new(
::Ml::CreateCandidateService.new(
@model.default_experiment,
{ model_version: @model_version }
).execute
error(_("Version must be semantic version")) unless candidate
package = @package
end
package
end
def find_or_create_package(model_name, model_version)
......
......@@ -91,14 +91,14 @@ class Discussions < ::API::Base
optional :start, type: Hash do
optional :line_code, type: String, desc: 'Start line code for multi-line note'
optional :type, type: String, desc: 'Start line type for multi-line note'
optional :old_line, type: String, desc: 'Start old_line line number'
optional :new_line, type: String, desc: 'Start new_line line number'
optional :old_line, type: Integer, desc: 'Start old_line line number'
optional :new_line, type: Integer, desc: 'Start new_line line number'
end
optional :end, type: Hash do
optional :line_code, type: String, desc: 'End line code for multi-line note'
optional :type, type: String, desc: 'End line type for multi-line note'
optional :old_line, type: String, desc: 'End old_line line number'
optional :new_line, type: String, desc: 'End new_line line number'
optional :old_line, type: Integer, desc: 'End old_line line number'
optional :new_line, type: Integer, desc: 'End new_line line number'
end
end
end
......
......@@ -2918,12 +2918,21 @@ msgstr ""
msgid "AccessTokens|An error occurred while fetching the tokens."
msgstr ""
 
msgid "AccessTokens|An error occurred while rotating the token."
msgstr ""
msgid "AccessTokens|Are you sure you want to revoke the %{accessTokenType} \"%{tokenName}\"? This action cannot be undone. Any tools that rely on this access token will stop working."
msgstr ""
 
msgid "AccessTokens|Are you sure you want to revoke the token \"%{tokenName}\"? This action cannot be undone. Any tools that rely on this access token will stop working."
msgstr ""
msgid "AccessTokens|Are you sure you want to rotate the %{accessTokenType} \"%{tokenName}\"? This action cannot be undone. Any tools that rely on this access token will stop working."
msgstr ""
 
msgid "AccessTokens|Are you sure you want to rotate the token \"%{tokenName}\"? This action cannot be undone. Any tools that rely on this access token will stop working."
msgstr ""
msgid "AccessTokens|Are you sure?"
msgstr ""
 
......@@ -3046,12 +3055,18 @@ msgstr ""
msgid "AccessTokens|Revoke"
msgstr ""
 
msgid "AccessTokens|Revoke the token \"%{tokenName}\"?"
msgstr ""
msgid "AccessTokens|Revoked"
msgstr ""
 
msgid "AccessTokens|Rotate"
msgstr ""
 
msgid "AccessTokens|Rotate the token \"%{tokenName}\"?"
msgstr ""
msgid "AccessTokens|Scopes"
msgstr ""
 
This diff is collapsed.
This diff is collapsed.
......@@ -193,6 +193,22 @@ describe('~/environments/environment_details/components/kubernetes/kubernetes_po
expect(findWorkloadTable().props('items')).toMatchObject(filteredPods);
});
it('shows the correct pod counters in the workload stats', async () => {
const searchTerm = 'pod-4';
findSearchBox().vm.$emit('input', searchTerm);
await nextTick();
const expectedStats = [
{ title: 'Running', value: 0 },
{ title: 'Pending', value: 0 },
{ title: 'Succeeded', value: 0 },
{ title: 'Failed', value: 2 },
];
expect(findWorkloadStats().props('stats')).toEqual(expectedStats);
});
describe('when a status is selected', () => {
const searchTerm = 'pod';
const status = 'Pending';
......
......@@ -342,6 +342,45 @@ describeSkipVue3(skipReason, () => {
});
});
describe('custom field tokens', () => {
it('combines eeSearchTokens with default search tokens', async () => {
const customToken = {
type: `custom`,
title: 'Custom Field',
token: () => {},
};
mountComponent({
props: {
eeSearchTokens: [customToken],
},
});
await waitForPromises();
const searchTokens = findIssuableList().props('searchTokens');
expect(searchTokens).toContainEqual(
expect.objectContaining({
type: customToken.type,
title: customToken.title,
}),
);
// Other tokens are still included
expect(searchTokens).toContainEqual(
expect.objectContaining({
type: TOKEN_TYPE_ASSIGNEE,
}),
);
expect(searchTokens).toContainEqual(
expect.objectContaining({
type: TOKEN_TYPE_LABEL,
}),
);
});
});
describe('events', () => {
describe('when "click-tab" event is emitted by IssuableList', () => {
beforeEach(async () => {
......
......@@ -116,6 +116,33 @@
it_behaves_like 'diff discussions API', 'projects', 'merge_requests', 'iid'
it_behaves_like 'resolvable discussions API', 'projects', 'merge_requests', 'iid'
context "when creating a note for multiple lines" do
it "creates a new diff multiline note" do
line_range = {
"start" => {
"line_code" => Gitlab::Git.diff_line_code(diff_note.position.file_path, 1, 1),
"type" => diff_note.position.type,
"new_line" => 1
},
"end" => {
"line_code" => Gitlab::Git.diff_line_code(diff_note.position.file_path, 3, 3),
"type" => diff_note.position.type,
"new_line" => 3
}
}
position = diff_note.position.to_h.merge({ line_range: line_range }).except(:ignore_whitespace_change)
post api("/projects/#{parent.id}/merge_requests/#{noteable['iid']}/discussions", user),
params: { body: 'hi!', position: position }
expect(response).to have_gitlab_http_status(:created)
expect(json_response['notes'].first['body']).to eq('hi!')
expect(json_response['notes'].first['type']).to eq('DiffNote')
expect(json_response['notes'].first['position']).to eq(position.stringify_keys)
end
end
context "when position_type is file" do
it "creates a new diff note" do
position = diff_note.position.to_h.merge({ position_type: 'file' }).except(:ignore_whitespace_change)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment