Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Archive Migration] x-pack-banners/multispace #135783

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
66e75eb
[Archive Migration] x-pack-banners/multispace
wayneseymour Jul 6, 2022
12300ec
Move to enabled per:
wayneseymour Sep 5, 2022
00a6415
Just run my stuff this go-round.
wayneseymour Sep 6, 2022
e968409
Merge branch 'main' into migrations/x-pack-banners/multispace
wayneseymour Sep 7, 2022
ac3d4a9
Merge branch 'main' of github.com:elastic/kibana into pr/wayneseymour…
wayneseymour Sep 8, 2022
9a84ead
Fixup.
wayneseymour Sep 8, 2022
04120c8
Drop new archive,
wayneseymour Sep 8, 2022
4467a1e
Whoops
wayneseymour Sep 8, 2022
1e2cf3a
Merge branch 'main' into migrations/x-pack-banners/multispace
wayneseymour Sep 8, 2022
05f1102
Drop redundant test.
wayneseymour Sep 8, 2022
00491fd
Merge branch 'migrations/x-pack-banners/multispace' of github.com:way…
wayneseymour Sep 8, 2022
6a21af4
Merge branch 'main' of github.com:elastic/kibana into pr/wayneseymour…
wayneseymour Sep 13, 2022
0d9a6f6
Not sure what's what yet,
wayneseymour Sep 13, 2022
9fb93b8
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Sep 13, 2022
b745297
Change value in test and config.
wayneseymour Sep 13, 2022
b36cbb1
Merge branch 'migrations/x-pack-banners/multispace' of github.com:way…
wayneseymour Sep 13, 2022
d3ca9bf
Drop double quotes,
wayneseymour Sep 13, 2022
e9104cd
One more try before asking in kibana-core
wayneseymour Sep 13, 2022
465c63d
try snake case
wayneseymour Sep 14, 2022
3522d39
back to space case but
wayneseymour Sep 14, 2022
56080d3
Just to see what happens I guess.
wayneseymour Sep 14, 2022
5e254fa
Merge branch 'main' of github.com:elastic/kibana into pr/wayneseymour…
wayneseymour Sep 14, 2022
196e499
Merge branch 'main' into migrations/x-pack-banners/multispace
wayneseymour Sep 19, 2022
538de83
Merge branch 'main' of github.com:elastic/kibana into pr/wayneseymour…
wayneseymour Sep 20, 2022
d5680bb
Merge fixups.
wayneseymour Sep 20, 2022
b55c3c6
Merge branch 'main' into migrations/x-pack-banners/multispace
wayneseymour Sep 21, 2022
ca19e27
Merge branch 'main' of github.com:elastic/kibana into pr/wayneseymour…
wayneseymour Sep 22, 2022
010c0a5
Change refs of "global_banner_text" to
wayneseymour Sep 23, 2022
4a689f3
Stop the shell expansion
wayneseymour Sep 23, 2022
31c211a
Merge branch 'main' into migrations/x-pack-banners/multispace
wayneseymour Sep 25, 2022
77da79d
Merge branch 'main' into migrations/x-pack-banners/multispace
wayneseymour Sep 26, 2022
896249c
Drop duplicate.
wayneseymour Sep 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 4 additions & 18 deletions scripts/archive_migration_functions.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
#!/bin/bash

# ??? Should we migrate
# x-pack/test/functional/es_archives/logstash/example_pipelines
# !!! No, we've found 0 saved objects that are listed in the standard_list
# !!! It contains the following saved object(s)
# config
# space

standard_list="url,index-pattern,query,graph-workspace,tag,visualization,canvas-element,canvas-workpad,dashboard,search,lens,map,cases,uptime-dynamic-settings,osquery-saved-query,osquery-pack,infrastructure-ui-source,metrics-explorer-view,inventory-view,infrastructure-monitoring-log-view,apm-indices"

orig_archive="x-pack/test/functional/es_archives/spaces/multi_space"
new_archive="x-pack/test/functional/fixtures/kbn_archiver/spaces/multi_space"
orig_archive="x-pack/test/functional/es_archives/banners/multispace"
new_archive="x-pack/test/functional/fixtures/kbn_archiver/banners/multi_space"

# newArchives=("x-pack/test/functional/fixtures/kbn_archiver/dashboard/session_in_space")
# newArchives+=("x-pack/test/functional/fixtures/kbn_archiver/dashboard/session_in_another_space")

testFiles=("x-pack/test/functional/apps/discover/preserve_url.ts")
testFiles+=("x-pack/test/functional/apps/visualize/preserve_url.ts")
testFiles+=("x-pack/test/functional/apps/dashboard/group1/preserve_url.ts")
# testFiles=("x-pack/test/functional/apps/discover/preserve_url.ts")

test_config="x-pack/test/functional/apps/dashboard/group1/config.ts"
# test_config="x-pack/test/functional/apps/discover/config.ts"
# test_config="x-pack/test/functional/apps/visualize/config.ts"
test_config="x-pack/test/banners_functional/config.ts"

list_stragglers() {

Expand Down
2 changes: 1 addition & 1 deletion src/dev/build/tasks/bin/scripts/kibana
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ if [ -f "${CONFIG_DIR}/node.options" ]; then
KBN_NODE_OPTS="$(grep -v ^# < ${CONFIG_DIR}/node.options | xargs)"
fi

NODE_OPTIONS="--no-warnings --max-http-header-size=65536 $KBN_NODE_OPTS $NODE_OPTIONS" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli/dist" ${@}
NODE_OPTIONS="--no-warnings --max-http-header-size=65536 $KBN_NODE_OPTS $NODE_OPTIONS" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli/dist" "${@}"
6 changes: 4 additions & 2 deletions x-pack/plugins/banners/server/ui_settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const createConfig = (parts: Partial<BannersConfigType> = {}): BannersConfigType
placement: 'disabled',
backgroundColor: '#0000',
textColor: '#FFFFFF',
textContent: 'Hello from the banner',
textContent: 'some global banner text',
disableSpaceBanners: false,
...parts,
});
Expand All @@ -31,7 +31,9 @@ describe('registerSettings', () => {
expect(uiSettings.register).toHaveBeenCalledTimes(1);
expect(uiSettings.register).toHaveBeenCalledWith({
'banners:placement': expect.any(Object),
'banners:textContent': expect.any(Object),
'banners:textContent': expect.objectContaining({
value: 'some global banner text',
}),
'banners:textColor': expect.any(Object),
'banners:backgroundColor': expect.any(Object),
});
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/banners_functional/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
serverArgs: [
...kibanaFunctionalConfig.get('kbnTestServer.serverArgs'),
'--xpack.banners.placement=top',
'--xpack.banners.textContent=global_banner_text',
'--xpack.banners.textContent="global banner text"',
],
},
};
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/banners_functional/tests/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function ({ getPageObjects }: FtrProviderContext) {
await PageObjects.common.navigateToApp('login');

expect(await PageObjects.banners.isTopBannerVisible()).to.eql(true);
expect(await PageObjects.banners.getTopBannerText()).to.eql('global_banner_text');
expect(await PageObjects.banners.getTopBannerText()).to.eql('global banner text');
});
});
}
23 changes: 12 additions & 11 deletions x-pack/test/banners_functional/tests/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const spacesService = getService('spaces');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects([
'common',
Expand All @@ -21,14 +21,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

describe('per-spaces banners', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/banners/multispace');
});

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/banners/multispace');
});

before(async () => {
await spacesService.create({
id: 'another-space',
name: 'Another Space',
disabledFeatures: [],
});
await kibanaServer.uiSettings.replace(
{
'banners:textContent': 'default space banner text',
Expand All @@ -39,6 +36,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
expectSpaceSelector: true,
});
});
after(async () => {
await spacesService.delete('another-space');
await kibanaServer.savedObjects.cleanStandardList();
});

it('displays the space-specific banner within the space', async () => {
await PageObjects.common.navigateToApp('home');
Expand All @@ -51,15 +52,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await PageObjects.common.navigateToApp('home', { basePath: '/s/another-space' });

expect(await PageObjects.banners.isTopBannerVisible()).to.eql(true);
expect(await PageObjects.banners.getTopBannerText()).to.eql('global_banner_text');
expect(await PageObjects.banners.getTopBannerText()).to.eql('global banner text');
});

it('displays the global banner on the login page', async () => {
await PageObjects.security.forceLogout();
await PageObjects.common.navigateToApp('login');

expect(await PageObjects.banners.isTopBannerVisible()).to.eql(true);
expect(await PageObjects.banners.getTopBannerText()).to.eql('global_banner_text');
expect(await PageObjects.banners.getTopBannerText()).to.eql('global banner text');
});
});
}
62 changes: 0 additions & 62 deletions x-pack/test/functional/es_archives/banners/multispace/data.json

This file was deleted.

Loading