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

[Search] Client side session service #76889

Merged
merged 98 commits into from
Oct 16, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
1396af4
Add a session service and use it in discover and dashboard
Sep 7, 2020
7bc93c3
check unefined
Sep 7, 2020
e6f31d8
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 7, 2020
7de920f
Start session in visualize
Sep 7, 2020
b6eac29
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 8, 2020
9615706
Fix tests
Sep 8, 2020
812015d
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 8, 2020
739dde9
docs
Sep 8, 2020
a9dec42
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 14, 2020
63c04d3
OSS error alignemnt
Sep 17, 2020
fc6d3c2
Adjust error messages in xpack
Sep 17, 2020
154a146
Add getErrorMessage
Sep 17, 2020
12e7898
Use showError in vizualize
Sep 17, 2020
f1390e2
Cleanup
Sep 17, 2020
1f9c340
ts, doc and i18n fixes
Sep 20, 2020
e6a794d
Fix jest tests
Sep 20, 2020
13be80c
Fix functional test
Sep 20, 2020
3e9dc9b
functional test
Sep 20, 2020
6f0b080
ts
Sep 20, 2020
4f73686
Merge branch 'master' of github.com:elastic/kibana into search/error-…
Sep 20, 2020
021d12f
Update functional tests
Sep 21, 2020
3035450
Add unit tests to interceptor and timeout error
Sep 21, 2020
dd48dd2
expose toasts test function
Sep 21, 2020
21b44b7
doc
Sep 21, 2020
aaa08cc
typos
Sep 21, 2020
5a8dee8
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 21, 2020
8e09b74
lint
Sep 21, 2020
396578d
Cleanup
Sep 21, 2020
f6fbb08
Merge branch 'master' of github.com:elastic/kibana into search/error-…
Sep 21, 2020
551335d
review 1
Sep 22, 2020
9b0e7ca
Merge branch 'master' of github.com:elastic/kibana into search/error-…
Sep 22, 2020
57b2a74
Code review
Sep 22, 2020
848eb0c
doc
Sep 22, 2020
4e6f47d
doc fix
Sep 22, 2020
741e8cd
visualization type fix
Sep 22, 2020
40c9411
fix jest
Sep 22, 2020
2c3d594
Fix xpack functional test
Sep 23, 2020
1142434
Merge branch 'master' of github.com:elastic/kibana into search/error-…
Sep 23, 2020
af29d63
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 23, 2020
a7fcea4
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 23, 2020
9c6972b
fix xpack test
Sep 23, 2020
a9a1715
Merge branch 'master' of github.com:elastic/kibana into search/error-…
Sep 23, 2020
ecd5cce
code review
Sep 23, 2020
8abced8
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 24, 2020
0f956c0
Merge branch 'search/error-alignment' into search/client-session-service
Sep 24, 2020
eed53fb
Add tracking methods to session service
Sep 24, 2020
9b13bf9
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 28, 2020
990aba6
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 28, 2020
36400f0
remove chromium
Sep 28, 2020
8a25855
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 29, 2020
7b432ea
Fix ts and jest tests
Sep 29, 2020
2c8e9ea
jest + docs
Sep 29, 2020
fc33904
ts fix
Sep 30, 2020
dd7da3f
siem test
Sep 30, 2020
862d53a
Merge branch 'master' of github.com:elastic/kibana into search/client…
Sep 30, 2020
db7ea0e
Use session service to show a timeout notification per session + more…
Sep 30, 2020
cd2bc82
ts and docs
Sep 30, 2020
b4034c2
Remove session service from search source (not needed)
Oct 1, 2020
3c0331f
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 1, 2020
b7e441d
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 4, 2020
92de71d
Code review
Oct 4, 2020
b07a802
ts
Oct 4, 2020
b5beec7
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 5, 2020
2c503b8
Single active session in FE session service
Oct 5, 2020
26e8539
Merge branch 'master' into search/client-session-service
kibanamachine Oct 5, 2020
abffc40
Cleanup
Oct 6, 2020
6ce7fa9
Don't integrate with dashboard \ visualize
Oct 6, 2020
8ae20f7
Merge branch 'search/client-session-service' of github.com:lizozom/ki…
Oct 6, 2020
936391b
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 6, 2020
10e239b
Typescript
Oct 6, 2020
fc8a3f8
ts
Oct 7, 2020
5597cab
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 7, 2020
31189dc
Improve functional tests
Oct 7, 2020
40ba6c7
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 7, 2020
beb00b9
es
Oct 7, 2020
607f7ab
Merge branch 'master' into search/client-session-service
kibanamachine Oct 8, 2020
24310bd
simplify filter test
Oct 8, 2020
ed3d8c0
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 8, 2020
8b557ab
Merge branch 'search/client-session-service' of github.com:lizozom/ki…
Oct 8, 2020
ea0724b
wait until loadedw
Oct 8, 2020
d60d97d
filter test
Oct 8, 2020
1f0524e
delete crypto for now
Oct 8, 2020
87518d4
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 12, 2020
da7850a
Select the correct index :facepalm:
Oct 12, 2020
b7f00c5
timerange
Oct 12, 2020
fac858d
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 13, 2020
c064626
Adjust functional test logic
Oct 13, 2020
3924dfd
improved test format @dosant
Oct 13, 2020
5365204
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 13, 2020
1483a41
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 14, 2020
c8294b6
Handle exceptions
Oct 14, 2020
52aa231
Don't close sessions automatically, warn instead
Oct 14, 2020
798dc5e
jest
Oct 14, 2020
e181864
Adjust functional test
Oct 15, 2020
0cca933
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 15, 2020
69179e6
Merge branch 'master' of github.com:elastic/kibana into search/client…
Oct 15, 2020
a2f9b65
Remove unused code
Oct 15, 2020
4d11ab6
delete export
Oct 15, 2020
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
18 changes: 18 additions & 0 deletions src/plugins/data/common/utils/tap_once.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,22 @@ describe('tapOnce', () => {
},
});
});

test('fires once even when there is an error', async (done) => {
Copy link
Contributor

@majagrubic majagrubic Oct 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great for adding a test case!

const tester = jest.fn().mockImplementation(() => {
throw new Error();
});

const source = from([1, 2, 3, 4]).pipe(tapOnce(tester));

source.subscribe(() => {});
source.subscribe({
next: () => {},
complete: () => {
expect(tester).toBeCalledWith(1);
expect(tester).toBeCalledTimes(1);
done();
},
});
});
});
10 changes: 7 additions & 3 deletions src/plugins/data/common/utils/tap_once.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ export function tapOnce<T>(fn: (v: T) => any) {
let first = true;
return source$.pipe(
tap((payload) => {
if (first) {
fn(payload);
try {
if (first) {
fn(payload);
}
first = false;
} catch (e) {
first = false;
}
first = false;
})
);
};
Expand Down