Skip to content

Commit 6bd5a80

Browse files
committed
cleanup + changeset
1 parent ac900b4 commit 6bd5a80

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

.changeset/dry-nails-prove.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hive': patch
3+
---
4+
5+
Fix internal server error when promoting a monolith schema to an empty target.

integration-tests/tests/api/schema/promotion.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ test.concurrent('promote monolith version to empty target', async () => {
11651165
privateAccessKey,
11661166
).then(r => r.expectNoGraphQLErrors());
11671167

1168-
const [versionToPromote] = await fetchVersions(2);
1168+
const [versionToPromote] = await fetchVersions(1);
11691169

11701170
assertNonNullish(otherTarget.createTarget.ok);
11711171
let promoteResult = await schemaVersionPromote(

packages/services/api/src/modules/schema/providers/schema-publisher.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2409,8 +2409,11 @@ export class SchemaPublisher {
24092409
}): SchemaLogDiffInput {
24102410
// we do not need to diff the services
24112411
// the "main" diff already covers all changes
2412-
invariant(args.logs.origin.length === 1, 'In a single schema there can only be one log.');
2413-
invariant(args.logs.target.length <= 1, 'In a single schema there can only be up to one log.');
2412+
invariant(args.logs.origin.length === 1, 'In a monolith project there can only be one log.');
2413+
invariant(
2414+
args.logs.target.length <= 1,
2415+
'In a monolith project there can only be up to one log.',
2416+
);
24142417

24152418
return {
24162419
deleted: [],

0 commit comments

Comments
 (0)