Commit 12577c6e authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent 4c6c0280
Please view this file on the master branch, on stable branches it's out of date.
## 12.3.0
### Security (3 changes)
- Limit number of jobs in running pipelines for the past hour on per plan basis. !1182
- Filter out old system notes for epics in notes api endpoint response.
- Do not allow creation of projects from group templates if project is not descendant of that group.
### Removed (1 change)
- Remove Ruby Elasticsearch indexer. !15641
### Fixed (53 changes, 5 of them are from the community)
- LDAP group sync: check parent group membership and improve performance. !13435 (Alex Lossent)
- Added a migration which fixes discussions for existing promoted epics. !14708
- Fix Docker Registry access when Group SAML session enforcement is active. !14843
- Fix missing borders between settings items. !14877
- SCIM uses fallbacks when name.formatted not present. !14878
- Fix visibility of link to dependency-list in project sidebar based on permissions. !15066
- Hide info for unlicensed projects on Ops Dashboard. !15099
- Fix focus-visibility of vulnerability-actions within security dashboard. !15115
- Resolve Design viewer does not respect version. !15119
- Fix bug to display alert menu correctly in dashboards. !15261
- Allow developer role to access group-level templates when creating a new project. !15364
- Maintain related issues after moving issue. !15391
- Fix the documentation link on the empty Dependency List page. !15402
- Fix broken docs link on security dashboard. !15404
- Change epics count in sidebar to only count open epics. !15459
- Include ancestor group labels in autocomplete for epics. !15460
- Enable target users across all feature flag environment scopes. !15500
- Change payload for comparing security reports in MR widget. !15531
- Add space between CI usage warning messages. !15563 (briankabiro)
- Make sure groups with templates finder returns subgroups. !15631
- Properly delete files when a package is removed. !15634
- Fix x-axis burndown chart offset by timezone. !15690
- Resolve SRV records for DB load balancing. !15691
- Ensure all CI minutes used are reset for all namespaces and relative projects. !15744
- Show proper error in SCIM create user endpoint. !15756
- Update permissions on Dependency List page. !15771
- Allow ancestor group milestones in issue board scope. !15858
- Show weight on new board issue. !16028 (Lee Tickett)
- Do not show 'automatically removed' suffix for manually removed labels. !16079
- Link to the embedded doc in the Geo callout about hashed storage. !16114
- Fix LFS authentication URL in EE. !16146
- Prevent project's approval rules having same name. !16216
- Fix create issue for container scanning from security dashboard. !16226
- Add current_user to security report comparison services. !16252
- Fix setting of weight of a new issue in board list. !16299
- Update ExternalPullRequest on :synchronize action to ensure source_sha is updated locally. !16318
- Fix wrong tier error message for Operations dashboard. !16319
- Perform case insensitive diff on license names. !16335
- Moves Buy additional minutes button to the pipelines tab. !16443
- Update GitHub Importer Personal Access Token field description for CI/CD projects only to reflect latest OAuth changes. !16453
- Use Pull Request number instead of internal Pull Request ID. !16504
- Fix service desk emails not creating issues intermittently. !16577
- Reinitialize metrics files on webserver master process start. !16623
- Fix the group's epic page. The Paste issue link placeholder shown as 'undefinedundefinedundefined' in Chinese environment. And the error message showed nothing. !16628 (wdmcheng)
- Fix issue redirects going to /issues/:id/designs. !16638
- Eliminate analytics feature flag requirement for /analytics routes. !16663
- Match environment names case insensitively for feature flag spec search. !16691
- Fix merge request redirects going to /commits page. !16705
- Align text color for edited with issue/mr. !16721
- Added Packages top item to the group level packages fly out navigation menu. !16791
- Restores data for assignee changes in merge request webhooks. !16812 (Jesse Hall @jessehall3)
- Fix alignment of comments count in issue and MR lists. !16829
- Wait until pipeline is completed before checking for software license violations. !16853
### Changed (27 changes, 1 of them is from the community)
- Geo: Refactor data-sources to allow for replication of content in Object Storage. !13997
- Improve UX multi assignees in MR. !14851
- Add ability to block API pushes to protected branches when contents match CODEOWNERS rule. !14900
- Add browser notications to add/edit/delete vulnability dismissal reasons. !15015
- Geo: Add orphaned project registry cleaner. !15021
- Update Security Dashboard for improved usability. !15050
- Present SAST report comparison logic to backend. !15114
- Ensure design notifications are sent. !15250
- Apply the group setting "Restrict access by IP address" to API requests. !15282
- Hide boards-switcher on group boards. !15293 (briankabiro)
- Group Security Dashboard shows projects with security reports only. !15334
- Use GlEmptyState component for design management empty state. !15374
- DB Load Balancing: Log Prometheus current number of hosts and current index. !15440
- Clarify SSO enforcement setting behaviour. !15533
- DB Load Balancing: Support SRV lookups. !15558
- Add status checking behaviors to pipeline triggers. !15580
- Only show Service Desk email address to project members. !15676
- Use static status check names on GitHub integrations. !15737
- Display the Security Dashboard in the Security tab of the pipeline view. !15824
- Remove primary button from feature flags empty state and update text. !15841
- Extend License Compliance entity for Pipelines and MR view. !15957
- Improve DB load balancing log to log host offline due to replication lag. !15995
- Eliminating `analytics` feature flag and introduce separate feature flags for Analytics features. !16102
- Add asterisk to name field in new feature flag form. !16248
- Update Container Scanning job template, use klar image. !16342
- Improve projects list page UI. !16656
- Add user feedback to exit routine of onboarding tour.
### Performance (2 changes)
- Send only necessary fields on mr-widget auto-refresh. !15495
- Two step Routable lookup. !16621
### Added (46 changes, 1 of them is from the community)
- Public project-level approval rule API. !13895
- Support reordering issues and epics using Drag&Drop. !14565
- Add deletion support for designs. !14656
- Add Epics select dropdown to Issue sidebar. !14763
- Edit delete vuln dismissal message. !14770
- add Productivity Analytics page with basic charts. !14772
- Add License information to the Dependency List based on current license rules. !14905
- Adds an api to generate suggestions for username. !15048
- Add Upgrade button to the User Billing page. !15075
- Enable "only/except: external_pull_request" with GitHub integration when a pull request is open for the given ref. !15082
- Allow to filter epics by timeframe or state using GraphQL. !15110
- Support restricting group access by multiple IP subnets. !15142
- Merge License info to Dependency List report. !15157
- Add Licenses info into Dependencies response. !15160
- Add 'License-Check' approval rule to enforce license compliance policy. !15196
- Added a toggle to show/hide dismissed vulnerabilities in the security dashboard. !15333
- Add audit event for archiving & unarchiving projects. !15362
- Pressing the Escape key now closes designs in Design Management. !15379
- Expose a count of Notes for a Design in a new notes_count property of DesignType in GraphQL. !15433
- Implement public MR-level approval rules API. !15441
- Cancel redundant merge train pipelines. !15450
- Add vulnerabilities to Dependencies API. !15485
- Expose a new events property of DesignType in GraphQL that represents the change that happened to a Design within a given version. !15561
- Add new layout for trial. !15630
- Track repository pushes as audit events. !15667
- Create Metadata/Tags table. !15770
- Allow SmartCard authentication to use SAN extensions. !15773
- Maximum Users metric in Admin Dashboard includes current active user count. !15810
- Public MR-level approval state API endpoint. !15859
- Add secondary lag message on Git push over HTTP. !15901
- Expose epic_iid in issues API. !15998
- Refresh license approval check when a license is blacklisted. !16070
- Disable editing of the 'License-Check' approval rule name. !16149
- Implement Cluster Environments polling. !16316
- Support creating project from template via API. !16352
- Add link to additional shared minutes from pipeline quote overview. !16389
- Add audit events for protected branches. !16399
- Geo: Exit LogCursor if it has been failing for too long. !16408
- Implement design comment counts and current-version status icon indicator. !16416
- Track page view counts for Cycle Analytics and Productivity Analytics features. !16431
- Update release blocks to support association of milestones. !16562
- Set default whitespace diff behaviour. !16570 (Lee Tickett)
- Implement `/zoom` and `/remove_zoom` quick actions. !16609
- Add Snowplow click tracking for issue sidebar. !16833
- Upgrade pages to 1.9.0.
- Adds total usage information to the usage quotas page.
### Other (27 changes, 8 of them are from the community)
- Update Pipelines Minutes expiry banner to Alert Component. !14786
- Add internal API for group cluster environments. !15096
- Rename approval rule. !15140
- Productivity Analytics: Add error handling for reporting on groups which have no plan. !15291
- Convert Issue Analytics chart into ECharts. !15389
- Display group's full name when creating a project from custom group-level project templates. !15392
- Only in ee available selection entries in user settings adapted to match ce. !15452 (Marc Schwede)
- Rename Approvers field and modal title. !15461
- Add a tooltip to Add Designs button. !15471
- Show the paths for groups in groups dropdown. !15513
- Turn epic dates into one clickable block. !15722 (Lee Tickett)
- Add default route for admin/geo. !15726 (Lee Tickett)
- Improve unapproved MR merge button text. !15745 (Lee Tickett)
- Update the ES indexer to v1.3.0. !15821
- Groups dropdown: Fix group styles in dropdown. !15839
- Document SRV handling for DB load balancing. !16000
- Internationalization of shared/promotions/_promote_audit_events.html.haml. !16033 (Takuya Noguchi)
- Remove vue-resource from service_desk_service.js. !16041 (Lee Tickett)
- Remove unused classes for report comparison. !16045
- Remove vue-resource from related-issues. !16057 (Lee Tickett)
- Add CI variable for repository languages. !16477
- SAST template that doesn't rely on Docker-in-Docker. !16487
- Adding docs for Web IDE Default Commit Options. !16629
- Adding top border back to snippet files. !16709
- Remove vue-resource from drafts. (Lee Tickett)
- Changing instance of key-modern icon to key icon.
- Fixes style-lint errors and warnings for EE builds.scss file.
## 12.2.5
### Security (1 change)
......
12.4.0-pre
12.3.0-pre
import Vue from 'vue';
import * as types from './mutation_types';
import { normalizeMetrics, sortMetrics, normalizeQueryResult } from './utils';
import { normalizeMetrics, sortMetrics, normalizeMetric, normalizeQueryResult } from './utils';
const normalizePanel = panel => panel.metrics.map(normalizeMetric);
export default {
[types.REQUEST_METRICS_DATA](state) {
......@@ -9,13 +11,19 @@ export default {
},
[types.RECEIVE_METRICS_DATA_SUCCESS](state, groupData) {
state.groups = groupData.map(group => {
let { metrics } = group;
let { metrics = [], panels = [] } = group;
// each panel has metric information that needs to be normalized
panels = panels.map(panel => ({
...panel,
metrics: normalizePanel(panel),
}));
// for backwards compatibility, and to limit Vue template changes:
// for each group alias panels to metrics
// for each panel alias metrics to queries
if (state.useDashboardEndpoint) {
metrics = group.panels.map(panel => ({
metrics = panels.map(panel => ({
...panel,
queries: panel.metrics,
}));
......@@ -23,6 +31,7 @@ export default {
return {
...group,
panels,
metrics: normalizeMetrics(sortMetrics(metrics)),
};
});
......
......@@ -63,6 +63,25 @@ export function groupQueriesByChartInfo(metrics) {
return Object.values(metricsByChart);
}
export const uniqMetricsId = metric => `${metric.metric_id}_${metric.id}`;
/**
* Not to confuse with normalizeMetrics (plural)
* Metrics loaded from project-defined dashboards do not have a metric_id.
* This method creates a unique ID combining metric_id and id, if either is present.
* This is hopefully a temporary solution until BE processes metrics before passing to fE
* @param {Object} metric - metric
* @returns {Object} - normalized metric with a uniqueID
*/
export const normalizeMetric = (metric = {}) =>
_.omit(
{
...metric,
metric_id: uniqMetricsId(metric),
},
'id',
);
export const sortMetrics = metrics =>
_.chain(metrics)
.sortBy('title')
......
......@@ -7,6 +7,7 @@ import {
metricsDashboardResponse,
dashboardGitResponse,
} from '../mock_data';
import { uniqMetricsId } from '~/monitoring/stores/utils';
describe('Monitoring mutations', () => {
let stateCopy;
......@@ -128,6 +129,7 @@ describe('Monitoring mutations', () => {
describe('SET_QUERY_RESULT', () => {
const metricId = 12;
const id = 'system_metrics_kubernetes_container_memory_total';
const result = [{ values: [[0, 1], [1, 1], [1, 3]] }];
beforeEach(() => {
......@@ -146,12 +148,13 @@ describe('Monitoring mutations', () => {
});
it('sets metricsWithData value', () => {
const uniqId = uniqMetricsId({ metric_id: metricId, id });
mutations[types.SET_QUERY_RESULT](stateCopy, {
metricId,
metricId: uniqId,
result,
});
expect(stateCopy.metricsWithData).toEqual([12]);
expect(stateCopy.metricsWithData).toEqual([uniqId]);
});
it('does not store empty results', () => {
......
import { groupQueriesByChartInfo } from '~/monitoring/stores/utils';
import { groupQueriesByChartInfo, normalizeMetric, uniqMetricsId } from '~/monitoring/stores/utils';
describe('groupQueriesByChartInfo', () => {
let input;
......@@ -12,7 +12,11 @@ describe('groupQueriesByChartInfo', () => {
];
output = [
{ title: 'title', y_label: 'MB', queries: [{ metricId: null }, { metricId: null }] },
{
title: 'title',
y_label: 'MB',
queries: [{ metricId: null }, { metricId: null }],
},
{ title: 'new title', y_label: 'MB', queries: [{ metricId: null }] },
];
......@@ -35,3 +39,36 @@ describe('groupQueriesByChartInfo', () => {
expect(groupQueriesByChartInfo(input)).toEqual(output);
});
});
describe('normalizeMetric', () => {
[
{ args: [], expected: 'undefined_undefined' },
{ args: [undefined], expected: 'undefined_undefined' },
{ args: [{ id: 'something' }], expected: 'undefined_something' },
{ args: [{ id: 45 }], expected: 'undefined_45' },
{ args: [{ metric_id: 5 }], expected: '5_undefined' },
{ args: [{ metric_id: 'something' }], expected: 'something_undefined' },
{
args: [{ metric_id: 5, id: 'system_metrics_kubernetes_container_memory_total' }],
expected: '5_system_metrics_kubernetes_container_memory_total',
},
].forEach(({ args, expected }) => {
it(`normalizes metric to "${expected}" with args=${JSON.stringify(args)}`, () => {
expect(normalizeMetric(...args)).toEqual({ metric_id: expected });
});
});
});
describe('uniqMetricsId', () => {
[
{ input: { id: 1 }, expected: 'undefined_1' },
{ input: { metric_id: 2 }, expected: '2_undefined' },
{ input: { metric_id: 2, id: 21 }, expected: '2_21' },
{ input: { metric_id: 22, id: 1 }, expected: '22_1' },
{ input: { metric_id: 'aaa', id: '_a' }, expected: 'aaa__a' },
].forEach(({ input, expected }) => {
it(`creates unique metric ID with ${JSON.stringify(input)}`, () => {
expect(uniqMetricsId(input)).toEqual(expected);
});
});
});
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