Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
7469b58e
Commit
7469b58e
authored
Jun 11, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix IDE pipelines eTagPoll not stopping
Closes #47678
parent
ba4dc01e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
10 deletions
+22
-10
app/assets/javascripts/ide/stores/modules/merge_requests/actions.js
.../javascripts/ide/stores/modules/merge_requests/actions.js
+7
-2
app/assets/javascripts/ide/stores/modules/pipelines/actions.js
...ssets/javascripts/ide/stores/modules/pipelines/actions.js
+8
-4
spec/javascripts/ide/components/pipelines/list_spec.js
spec/javascripts/ide/components/pipelines/list_spec.js
+7
-4
No files found.
app/assets/javascripts/ide/stores/modules/merge_requests/actions.js
View file @
7469b58e
...
@@ -31,10 +31,15 @@ export const openMergeRequest = ({ commit, dispatch }, { projectPath, id }) => {
...
@@ -31,10 +31,15 @@ export const openMergeRequest = ({ commit, dispatch }, { projectPath, id }) => {
commit
(
rootTypes
.
CLEAR_PROJECTS
,
null
,
{
root
:
true
});
commit
(
rootTypes
.
CLEAR_PROJECTS
,
null
,
{
root
:
true
});
commit
(
rootTypes
.
SET_CURRENT_MERGE_REQUEST
,
`
${
id
}
`
,
{
root
:
true
});
commit
(
rootTypes
.
SET_CURRENT_MERGE_REQUEST
,
`
${
id
}
`
,
{
root
:
true
});
commit
(
rootTypes
.
RESET_OPEN_FILES
,
null
,
{
root
:
true
});
commit
(
rootTypes
.
RESET_OPEN_FILES
,
null
,
{
root
:
true
});
dispatch
(
'
pipelines/stopPipelinePolling
'
,
null
,
{
root
:
true
});
dispatch
(
'
pipelines/clearEtagPoll
'
,
null
,
{
root
:
true
});
dispatch
(
'
pipelines/resetLatestPipeline
'
,
null
,
{
root
:
true
});
dispatch
(
'
pipelines/resetLatestPipeline
'
,
null
,
{
root
:
true
});
dispatch
(
'
setCurrentBranchId
'
,
''
,
{
root
:
true
});
dispatch
(
'
setCurrentBranchId
'
,
''
,
{
root
:
true
});
dispatch
(
'
pipelines/stopPipelinePolling
'
,
null
,
{
root
:
true
})
.
then
(()
=>
{
dispatch
(
'
pipelines/clearEtagPoll
'
,
null
,
{
root
:
true
});
})
.
catch
(
e
=>
{
throw
e
;
});
router
.
push
(
`/project/
${
projectPath
}
/merge_requests/
${
id
}
`
);
router
.
push
(
`/project/
${
projectPath
}
/merge_requests/
${
id
}
`
);
};
};
...
...
app/assets/javascripts/ide/stores/modules/pipelines/actions.js
View file @
7469b58e
...
@@ -12,8 +12,12 @@ let eTagPoll;
...
@@ -12,8 +12,12 @@ let eTagPoll;
export
const
clearEtagPoll
=
()
=>
{
export
const
clearEtagPoll
=
()
=>
{
eTagPoll
=
null
;
eTagPoll
=
null
;
};
};
export
const
stopPipelinePolling
=
()
=>
eTagPoll
&&
eTagPoll
.
stop
();
export
const
stopPipelinePolling
=
()
=>
{
export
const
restartPipelinePolling
=
()
=>
eTagPoll
&&
eTagPoll
.
restart
();
if
(
eTagPoll
)
eTagPoll
.
stop
();
};
export
const
restartPipelinePolling
=
()
=>
{
if
(
eTagPoll
)
eTagPoll
.
restart
();
};
export
const
requestLatestPipeline
=
({
commit
})
=>
commit
(
types
.
REQUEST_LATEST_PIPELINE
);
export
const
requestLatestPipeline
=
({
commit
})
=>
commit
(
types
.
REQUEST_LATEST_PIPELINE
);
export
const
receiveLatestPipelineError
=
({
commit
,
dispatch
})
=>
{
export
const
receiveLatestPipelineError
=
({
commit
,
dispatch
})
=>
{
...
@@ -51,9 +55,9 @@ export const fetchLatestPipeline = ({ dispatch, rootGetters }) => {
...
@@ -51,9 +55,9 @@ export const fetchLatestPipeline = ({ dispatch, rootGetters }) => {
Visibility
.
change
(()
=>
{
Visibility
.
change
(()
=>
{
if
(
!
Visibility
.
hidden
())
{
if
(
!
Visibility
.
hidden
())
{
eTagPoll
.
restart
(
);
dispatch
(
'
restartPipelinePolling
'
);
}
else
{
}
else
{
eTagPoll
.
stop
(
);
dispatch
(
'
stopPipelinePolling
'
);
}
}
});
});
};
};
...
...
spec/javascripts/ide/components/pipelines/list_spec.js
View file @
7469b58e
...
@@ -45,12 +45,15 @@ describe('IDE pipelines list', () => {
...
@@ -45,12 +45,15 @@ describe('IDE pipelines list', () => {
setTimeout
(
done
);
setTimeout
(
done
);
});
});
afterEach
(()
=>
{
afterEach
(
done
=>
{
vm
.
$store
.
dispatch
(
'
pipelines/stopPipelinePolling
'
);
vm
.
$store
.
dispatch
(
'
pipelines/clearEtagPoll
'
);
vm
.
$destroy
();
vm
.
$destroy
();
mock
.
restore
();
mock
.
restore
();
vm
.
$store
.
dispatch
(
'
pipelines/stopPipelinePolling
'
)
.
then
(()
=>
vm
.
$store
.
dispatch
(
'
pipelines/clearEtagPoll
'
))
.
then
(
done
)
.
catch
(
done
.
fail
);
});
});
it
(
'
renders pipeline data
'
,
()
=>
{
it
(
'
renders pipeline data
'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment