microsoft / microsoft/azure-devops-python-api

run_pipeline discards needed parameters

未关闭
#331 8 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
684
派生
218
平均合并
8 天 10 小时
30 天内合并 PR
1

描述

azure-devops/azure/devops/v6_0/pipelines/pipelines_client.py takes the parameter run_parameters and then sets the variable content via

        content = self._serialize.body(run_parameters, 'RunPipelineParameters')

In doing so it discards templateParameters (along with previewRun, stagesToSkip, and yamlOverride), but my concern is with templateParameters.

If I'm tracing things correctly, the problem is in the class RunPipelineParameters in azure-devops/azure/devops/v6_0/pipelines/models.py which only maps resources and variables:

class RunPipelineParameters(Model):
    """
    :param resources:
    :type resources: :class:`RunResourcesParameters <azure.devops.v6_0.pipelines.models.RunResourcesParameters>`
    :param variables:
    :type variables: dict
    """

    _attribute_map = {
        'resources': {'key': 'resources', 'type': 'RunResourcesParameters'},
        'variables': {'key': 'variables', 'type': '{Variable}'}
    }

    def __init__(self, resources=None, variables=None):
        super(RunPipelineParameters, self).__init__()
        self.resources = resources
        self.variables = variables

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

阅读 azure-devops/azure/devops/v6_0/pipelines/models.py 以及 azure-devops/azure/devops/v6_0/pipelines/pipelines_client.py 中的 run_pipeline 入口点。将 RunPipelineParameters 与 issue 中描述的参数进行比较,然后跟踪其序列化方式。当 run_pipeline 构建 request 时,templateParameters 和列出的其他 run options 都得到保留,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
azure, python
领域
api, devops
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。