[BUG] graphql update schema operations are not working
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- csharp, graphql
调研方向
从 publisher.Api.GetApiJson 开始,跟踪 extractor 修改后的构件如何传递给 publisher。使用 extractor 重现仅更新 GraphQL schema 的过程,然后确认即使没有发生更改的 apiInformation.json 文件,发布仍能成功,同时继续处理 specification.json。
由索引模型根据 Issue 内容生成。
描述
Release version
v6.0.1.1
Describe the bug
When you update the graphql schema and run the extractor, it will only generate the specification.json file as a change. But publisher will fail because tool expects apiInformation.json file is also needed to make it work. please find below error.
crit: Publisher[0] System.InvalidOperationException: API **** has an empty JSON object. at **publisher.Api.GetApiJson(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject** configurationApiJson, CancellationToken cancellationToken) at publisher.Api.PutApi(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject configurationApiJson, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken) at publisher.Api.<>c__DisplayClass23_0.<<ProcessArtifactsToPut>b__4>d.MoveNext() --- End of stack trace from previous location --- at System.Threading.Tasks.Parallel.<>c__501.<b__50_0>d.MoveNext()
--- End of stack trace from previous location ---
at common.IEnumerableExtensions.ForEachParallel[T](IEnumerable1 enumerable, Func2 action, CancellationToken cancellationToken)
at publisher.Api.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken) at publisher.Service.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, ListRestResources listRestResources, PutRestResource putRestResource, DeleteRestResource deleteRestResource, ILogger logger, CancellationToken cancellationToken)
at publisher.Publisher.ProcessCommitIdFilesToPut(IReadOnlyCollection1 commitIdFilesToPut, CancellationToken cancellationToken) at publisher.Publisher.RunWithCommitId(CommitId commitId, CancellationToken cancellationToken) at publisher.Publisher.Run(CancellationToken cancellationToken) at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken) info: Microsoft.Hosting.Lifetime[0]
You can see the GetAPIJson function expects apiInformationfile to be present while calling.
Expected behavior
It should run without apiinformtion file as we are changing specification only and it is update to the existing graphQL API.
Actual behavior
Publisher failing with the above error if we don't put apiInfomation.json file in changes. We have to manually make any dummy updates in the apiInformation file so extractor detects it and then publisher work fine.
Reproduction Steps
- use any existing graphQl api. Make schema updates to the same
- run extractor
- see the generated changed artifacts in the PR
- it has generated only specification.json for the api
- Run the publisher with the last commit option and this error will pop up.
- 主要语言
- C#
- 星标
- 449
- 派生
- 248
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/apiops 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 45/100
-
[BUG] Publisher misses logger dependency in policy XML可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 70/100
-
难度 4/5 3-5 天 新手友好度 55/100
-
难度 3/5 1-2 天 新手友好度 45/100
相似的 Issue
-
[Doc Gap] Document new --enable-public-network-access breaking change for azurebackup vault create未关闭copilot documentation
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
area-dashboard
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
0 - Backlog Bug
难度 2/5 1-3 小时 新手友好度 72/100
BrighterCommand/Brighter#4539 ·
维护者通常 1 天内回复
-
area-networking
难度 2/5 1-3 小时 新手友好度 68/100
dotnet/aspnetcore#69671 · 1 条评论 ·
维护者通常 1 天内回复
-
test
难度 2/5 1-3 小时 新手友好度 72/100
NethermindEth/nethermind#14274 ·
维护者通常 1 天内回复