Skip to content

Commit

Permalink
Merge branch 'main' into daylight-savings-calendar-events
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic authored Oct 4, 2024
2 parents b2ce67e + 9ce6206 commit fea06b1
Show file tree
Hide file tree
Showing 221 changed files with 5,427 additions and 1,988 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: bk-kibana-chrome-forward-testing
description: 'Chrome Forward Testing for Kibana'
links:
- url: 'https://buildkite.com/elastic/kibana-chrome-forward-testing'
title: Pipeline link
spec:
type: buildkite-pipeline
system: buildkite
owner: 'group:kibana-operations'
implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
name: kibana / chrome forward testing
description: 'Testing Kibana against upcoming versions of Chrome'
spec:
env:
# This is what will switch the FTRs pipeline to use Chrome Beta
USE_CHROME_BETA: 'true'
# Unit-tests don't depend on Chrome's versions, integration tests , so we don't need to run those
LIMIT_CONFIG_TYPE: 'functional'
SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts'
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'

allow_rebuilds: true
branch_configuration: main
default_branch: main
repository: elastic/kibana
pipeline_file: .buildkite/scripts/pipelines/pull_request/pipeline.sh
skip_intermediate_builds: true
provider_settings:
prefix_pull_request_fork_branch_names: false
skip_pull_request_builds_for_existing_commits: true
trigger_mode: none
teams:
kibana-operations:
access_level: MANAGE_BUILD_AND_READ
appex-qa:
access_level: MANAGE_BUILD_AND_READ
kibana-tech-leads:
access_level: MANAGE_BUILD_AND_READ
everyone:
access_level: BUILD_AND_READ
# Scheduled runs for the pipeline
schedules:
Daily 12 pm UTC:
cronline: 0 12 * * *
message: Daily Chrome Forward Testing
branch: main
7 changes: 4 additions & 3 deletions .buildkite/pipeline-resource-definitions/locations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ spec:
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-artifacts-snapshot.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-artifacts-staging.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-artifacts-trigger.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-chrome-forward-testing.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-codeql.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-coverage-daily.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-forward-testing.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml
Expand All @@ -26,11 +28,12 @@ spec:
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-on-merge.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-performance-daily.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-performance-data-set-extraction-daily.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-pointer-compression.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-pr.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-purge-cloud-deployments.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-emergency-release.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates-emergency.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release-testing.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/scalability_testing-daily.yml
Expand All @@ -43,5 +46,3 @@ spec:
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-investigations.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-rule-management.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-pointer-compression.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-codeql.yml
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"**/@bazel/typescript/protobufjs": "6.11.4",
"**/@hello-pangea/dnd": "16.6.0",
"**/@langchain/core": "^0.2.18",
"**/@langchain/google-common": "^0.1.1",
"**/@types/node": "20.10.5",
"**/@typescript-eslint/utils": "5.62.0",
"**/chokidar": "^3.5.3",
Expand Down Expand Up @@ -999,11 +1000,13 @@
"@kbn/zod-helpers": "link:packages/kbn-zod-helpers",
"@langchain/community": "0.2.18",
"@langchain/core": "^0.2.18",
"@langchain/google-genai": "^0.0.23",
"@langchain/google-common": "^0.1.1",
"@langchain/google-genai": "^0.1.0",
"@langchain/google-vertexai": "^0.1.0",
"@langchain/langgraph": "0.0.34",
"@langchain/openai": "^0.1.3",
"@langtrase/trace-attributes": "^3.0.8",
"@launchdarkly/node-server-sdk": "^9.5.4",
"@launchdarkly/node-server-sdk": "^9.6.0",
"@launchdarkly/openfeature-node-server": "^1.0.0",
"@loaders.gl/core": "^3.4.7",
"@loaders.gl/json": "^3.4.7",
Expand Down Expand Up @@ -1148,7 +1151,7 @@
"jsts": "^1.6.2",
"kea": "^2.6.0",
"langchain": "^0.2.11",
"langsmith": "^0.1.39",
"langsmith": "^0.1.55",
"launchdarkly-js-client-sdk": "^3.4.0",
"load-json-file": "^6.2.0",
"lodash": "^4.17.21",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,6 @@ function validateNodeProps<
`[Chrome navigation] Error in node [${id}]. Only one of "href" or "cloudLink" can be provided.`
);
}
if (renderAs === 'panelOpener' && !link) {
throw new Error(
`[Chrome navigation] Error in node [${id}]. If renderAs is set to "panelOpener", a "link" must also be provided.`
);
}
if (renderAs === 'item' && !link && !onClick) {
throw new Error(
`[Chrome navigation] Error in node [${id}]. If renderAs is set to "item", a "link" or "onClick" must also be provided.`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ export interface DataQualityDetailsLocatorParams extends SerializableRecord {
table?: DegradedFieldsTable;
};
expandedDegradedField?: string;
showCurrentQualityIssues?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import { URL_PARAM_ARRAY_EXCEPTION_MSG } from './translations';

export const FilterGroup = (props: PropsWithChildren<FilterGroupProps>) => {
const {
featureIds,
dataViewId,
onFiltersChange,
timeRange,
Expand All @@ -58,7 +59,7 @@ export const FilterGroup = (props: PropsWithChildren<FilterGroupProps>) => {
maxControls = Infinity,
ControlGroupRenderer,
Storage,
featureIds,
storageKey,
} = props;

const filterChangedSubscription = useRef<Subscription>();
Expand All @@ -79,8 +80,8 @@ export const FilterGroup = (props: PropsWithChildren<FilterGroupProps>) => {
const [controlGroup, setControlGroup] = useState<ControlGroupRendererApi>();

const localStoragePageFilterKey = useMemo(
() => `${featureIds.join(',')}.${spaceId}.${URL_PARAM_KEY}`,
[featureIds, spaceId]
() => storageKey ?? `${featureIds.join(',')}.${spaceId}.${URL_PARAM_KEY}`,
[featureIds, spaceId, storageKey]
);

const currentFiltersRef = useRef<Filter[]>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,5 @@ export interface FilterGroupProps extends Pick<ControlGroupRuntimeState, 'chaini
*/
ControlGroupRenderer: typeof ControlGroupRenderer;
Storage: typeof Storage;
storageKey?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,23 +155,19 @@ export const RuleTypeList: React.FC<RuleTypeListProps> = ({
hasBorder
title={rule.name}
onClick={() => onSelectRuleType(rule.id)}
description={
<>
{rule.description}
{rule.description && <EuiSpacer size="s" />}
<EuiText
color="subdued"
size="xs"
style={{ textTransform: 'uppercase', fontWeight: euiTheme.font.weight.bold }}
>
{producerToDisplayName(rule.producer)}
</EuiText>
</>
}
description={rule.description}
style={{ marginRight: '8px', flexGrow: 0 }}
data-test-subj={`${rule.id}-SelectOption`}
isDisabled={rule.enabledInLicense === false}
/>
>
<EuiText
color="subdued"
size="xs"
style={{ textTransform: 'uppercase', fontWeight: euiTheme.font.weight.bold }}
>
{producerToDisplayName(rule.producer)}
</EuiText>
</EuiCard>
<EuiSpacer size="s" />
</React.Fragment>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const RuleTypeModal: React.FC<RuleTypeModalProps & RuleTypeModalState> =
<EuiFlexItem
style={{
overflow: 'hidden',
marginTop: -euiTheme.size.base /* Offset extra padding for card hover drop shadow */,
marginTop: `-${euiTheme.size.base}`,
}}
>
{ruleTypesLoading ? (
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-eslint-plugin-eslint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ module.exports = {
no_this_in_property_initializers: require('./rules/no_this_in_property_initializers'),
no_unsafe_console: require('./rules/no_unsafe_console'),
no_unsafe_hash: require('./rules/no_unsafe_hash'),
no_deprecated_authz_config: require('./rules/no_deprecated_authz_config'),
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ const ACCESS_TAG_PREFIX = 'access:';

const isStringLiteral = (el) => el.type === 'Literal' && typeof el.value === 'string';
const isLiteralAccessTag = (el) => isStringLiteral(el) && el.value.startsWith(ACCESS_TAG_PREFIX);
const isLiteralNonAccessTag = (el) =>
isStringLiteral(el) && !el.value.startsWith(ACCESS_TAG_PREFIX);

const isTemplateLiteralAccessTag = (el) =>
el.type === 'TemplateLiteral' && el.quasis[0].value.raw.startsWith(ACCESS_TAG_PREFIX);
const isTemplateLiteralNonAccessTag = (el) =>
el.type === 'TemplateLiteral' && !el.quasis[0].value.raw.startsWith(ACCESS_TAG_PREFIX);

const maybeReportDisabledSecurityConfig = (node, context, isVersionedRoute = false) => {
// Allow disabling migration for routes that are opted out from authorization
if (process.env.MIGRATE_DISABLED_AUTHZ === 'false') {
return;
}

const callee = node.callee;
const isAddVersionCall =
callee.type === 'MemberExpression' && callee.property.name === 'addVersion';
Expand Down Expand Up @@ -166,11 +167,11 @@ const handleRouteConfig = (node, context, isVersionedRoute = false) => {

const accessTagsFilter = (el) => isLiteralAccessTag(el) || isTemplateLiteralAccessTag(el);
const nonAccessTagsFilter = (el) =>
isLiteralNonAccessTag(el) || isTemplateLiteralNonAccessTag(el);
!isLiteralAccessTag(el) && !isTemplateLiteralAccessTag(el);

const getAccessPrivilege = (el) => {
if (el.type === 'Literal') {
return `'${el.value.split(':')[1]}'`;
return `'${el.value.split(ACCESS_TAG_PREFIX)[1]}'`;
}

if (el.type === 'TemplateLiteral') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,28 @@ ruleTester.run('no_deprecated_authz_config', rule, {
`,
name: 'invalid: access tags are string literals, move to security.authz.requiredPrivileges',
},
{
code: `
router.get({
path: '/some/path',
options: {
tags: ['access:ml:someTag', 'access:prefix:someTag'],
},
});
`,
errors: [{ message: "Move 'access' tags to security.authz.requiredPrivileges." }],
output: `
router.get({
path: '/some/path',
security: {
authz: {
requiredPrivileges: ['ml:someTag', 'prefix:someTag'],
},
},
});
`,
name: 'invalid: access tags have multiple prefixes, move to security.authz.requiredPrivileges',
},
{
code: `
router.get({
Expand All @@ -180,6 +202,30 @@ ruleTester.run('no_deprecated_authz_config', rule, {
`,
name: 'invalid: access tags are template literals, move to security.authz.requiredPrivileges',
},
{
code: `
router.get({
path: '/some/path',
options: {
tags: ['access:securitySolution', routeTagHelper('someTag')],
},
});
`,
errors: [{ message: "Move 'access' tags to security.authz.requiredPrivileges." }],
output: `
router.get({
path: '/some/path',
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},options: {
tags: [routeTagHelper('someTag')],
},
});
`,
name: 'invalid: access tags and tags made with helper function, only access tags are moved to security.authz.requiredPrivileges',
},
{
code: `
router.get({
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pageLoadAssetSize:
dashboardEnhanced: 65646
data: 454087
dataQuality: 19384
datasetQuality: 52000
datasetQuality: 55000
dataUsage: 30000
dataViewEditor: 28082
dataViewFieldEditor: 42021
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export const SchedulePanel: FC<PropsWithChildren<SchedulePanelProps>> = ({
<>
<EuiSplitPanel.Outer>
<EuiSplitPanel.Inner color="subdued">
<EuiTitle>
<h2>{title}</h2>
<EuiTitle size="s">
<h4>{title}</h4>
</EuiTitle>
</EuiSplitPanel.Inner>
<EuiSplitPanel.Inner>
Expand Down Expand Up @@ -115,7 +115,6 @@ export const ConnectorSchedulingComponent: React.FC<ConnectorContentSchedulingPr
}
return (
<>
<EuiSpacer size="l" />
{hasIngestionError ? <ConnectorError /> : <></>}
{children}
<EuiFlexGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ export const ConnectorContentScheduling: React.FC<ConnectorContentSchedulingProp
paddingSize="m"
id={`${type}-content-sync-schedule`}
buttonContent={
<EuiFlexGroup direction="column" gutterSize="s">
<EuiFlexGroup direction="column" gutterSize="xs">
<EuiFlexItem>
<EuiTitle size="s">
<h4>{getAccordionTitle(type)}</h4>
<EuiTitle size="xs">
<h5>{getAccordionTitle(type)}</h5>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ describe('DocumentList', () => {
</I18nProvider>
);

expect(screen.getByText('Browse documents')).toBeInTheDocument();
expect(screen.getByPlaceholderText('Search documents in this index')).toBeInTheDocument();
});
});
Loading

0 comments on commit fea06b1

Please sign in to comment.