Details
-
Bug
-
Resolution: Fixed
-
Neutral
-
2.0
-
None
-
None
Description
In my use-case, I create a list of synchronization requests (for my 14 workspaces). These happen sequentially, but evidently too quickly, as the ID for each request is the same. This makes it impossible to get information about a particular request from the synchronization manager.
Steps to reproduce
- For loop over the below method, to create requests:
private SynchronizationRequest createSynchronizationRequest(String url, String workspace) { SynchronizationRequest req = new SynchronizationRequest(); req.setUrl(url); req.setWorkspace(workspace); req.setFromPath("/"); req.setToPath("/"); return req; }
- note that all the requests will have the same id: `req.getIdentifier()`
Expected results
Requests should have unique IDs, so that they can be queried by ID later.
Actual results
Requests have the same identifier.
Workaround
I manually appended the workspace to the identifier:
private SynchronizationRequest createSynchronizationRequest(String url, String workspace) { SynchronizationRequest req = new SynchronizationRequest(); // THIS LINE req.setIdentifier(generateNewSyncId(workspace)); // ^^^^^^^ req.setUrl(url); req.setWorkspace(workspace); req.setFromPath(ROOT_PATH); req.setToPath(ROOT_PATH); return req; }
The generateNewSyncId() method just creates a string from the date + the workspace.
Development notes
Checklists
Acceptance criteria
Attachments
1.
|
Provide PR with a fix |
|
Completed | Roman Kovařík |
2.
|
Code review |
|
Completed | Adam Siska |
3.
|
Replicate the use case |
|
Completed | Roman Kovařík |
4.
|
Preint QA |
|
Completed | Adam Siska |
5.
|
Add MGNLSYNC project to changelog and bundle |
|
Completed | Roman Kovařík |
6.
|
Final QA |
|
Completed | Jaromir Sarf |
7.
|
Raise module version in DX-core |
|
Completed | Adam Siska |