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

Preceding checkpointv2 relationship fix #611

Merged
merged 20 commits into from
Jan 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f71a498
Changed the relationship name used for preceding Checkpointv2 query
austeja-bentley Jan 20, 2021
df15277
Rush change
austeja-bentley Jan 20, 2021
cf8774a
API break: changed the CheckpointV2Query.precedingCheckpoint method n…
austeja-bentley Jan 20, 2021
5f8b4cf
Merge branch 'master' of /~https://github.com/imodeljs/imodeljs into pr…
austeja-bentley Jan 27, 2021
77d5274
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 27, 2021
919c6bc
Merge branch 'master' of /~https://github.com/imodeljs/imodeljs into pr…
austeja-bentley Jan 27, 2021
43538b1
API update
austeja-bentley Jan 27, 2021
bcadf2a
Merge branch 'preceding-checkpointv2-relationship-fix' of https://git…
austeja-bentley Jan 27, 2021
b465010
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 27, 2021
902f330
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 27, 2021
c4c2a9b
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 27, 2021
b28bd93
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 28, 2021
b584d50
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 28, 2021
b2ee54a
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 28, 2021
67c04cb
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 29, 2021
1bd73e1
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 29, 2021
4c4c3e8
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 29, 2021
a73d688
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 29, 2021
a7db111
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 29, 2021
1960a44
Merge branch 'master' into preceding-checkpointv2-relationship-fix
mergify[bot] Jan 30, 2021
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
4 changes: 2 additions & 2 deletions clients/imodelhub/src/imodelhub/CheckpointsV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export class CheckpointV2Query extends WsgQuery {
* This query returns a closest CheckpointV2 that will reach target ChangeSet by only merging forward. This resets all previously set filters.
* @returns This query.
*/
public precedingCheckpoint(targetChangeSetId: string): this {
this.filter(`PrecedingCheckpoint-backward-ChangeSet.Id+eq+'${targetChangeSetId}'`);
public precedingCheckpointV2(targetChangeSetId: string): this {
this.filter(`PrecedingCheckpointV2-backward-ChangeSet.Id+eq+'${targetChangeSetId}'`);
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion common/api/imodelhub-client.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export class CheckpointV2Handler {
export class CheckpointV2Query extends WsgQuery {
byChangeSetId(changeSetId: string): this;
byState(state: CheckpointV2State): this;
precedingCheckpoint(targetChangeSetId: string): this;
precedingCheckpointV2(targetChangeSetId: string): this;
selectContainerAccessKey(): this;
selectFailureInfo(): this;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@bentley/imodelhub-client-tests",
"comment": "Test fixes to setup mock with the new PrecedingCheckpointV2 relationship",
"type": "none"
}
],
"packageName": "@bentley/imodelhub-client-tests",
"email": "70565417+austeja-bentley@users.noreply.github.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@bentley/imodelhub-client",
"comment": "PrecedingCheckpointv2 usage in CheckpointV2Handler",
"type": "none"
}
],
"packageName": "@bentley/imodelhub-client",
"email": "70565417+austeja-bentley@users.noreply.github.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ describe("iModelHub CheckpointV2Handler", () => {
});

async function verifyPrecedingCheckpointV2(changeSetId: string, expectedPrecedingChangeSetId: string) {
mockGetCheckpointV2(imodelId, `?$filter=PrecedingCheckpoint-backward-ChangeSet.Id+eq+%27${changeSetId}%27`, mockCheckpointV2(expectedPrecedingChangeSetId, CheckpointV2State.Successful, "1"));
const checkpoints = await iModelClient.checkpointsV2.get(requestContext, imodelId, new CheckpointV2Query().precedingCheckpoint(changeSetId));
mockGetCheckpointV2(imodelId, `?$filter=PrecedingCheckpointV2-backward-ChangeSet.Id+eq+%27${changeSetId}%27`, mockCheckpointV2(expectedPrecedingChangeSetId, CheckpointV2State.Successful, "1"));
const checkpoints = await iModelClient.checkpointsV2.get(requestContext, imodelId, new CheckpointV2Query().precedingCheckpointV2(changeSetId));
chai.assert(checkpoints);
chai.expect(checkpoints.length).to.be.equal(1);
chai.expect(checkpoints[0].changeSetId).to.be.equal(expectedPrecedingChangeSetId);
Expand Down