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

[Bug][Bamboo] Change the splicing of cicd_scopes.name and cicd_pipelines.name #6106

Closed
2 of 3 tasks
xiaomingzhang12 opened this issue Sep 18, 2023 · 3 comments · Fixed by #6133
Closed
2 of 3 tasks
Assignees
Labels
type/bug This issue is a bug

Comments

@xiaomingzhang12
Copy link

xiaomingzhang12 commented Sep 18, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Now cicd_scopes.name is spliced in the way of project + "space ” +“ -” + "space ”+ plan.
image

What do you expect to happen

cicd_scopes.name needs to be changed to project + "/" + plan, this kind of splicing logic.
Take the above screenshot as an example
The value of xm-1 - p1 needs to be changed to xm-1/p1.
The name in the table cicd_pipelines also needs to be changed to this splicing logic.

How to reproduce

See above

Anything else

No response

Version

main

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@xiaomingzhang12 xiaomingzhang12 added the type/bug This issue is a bug label Sep 18, 2023
@xiaomingzhang12 xiaomingzhang12 changed the title [Bug][Bamboo] Change the splicing of cicd_scopes.name [Bug][Bamboo] Change the splicing of cicd_scopes.name and cicd_pipelines.name Sep 18, 2023
@d4x1
Copy link
Contributor

d4x1 commented Sep 21, 2023

hi @mintsweet
cicd_scopes.name comes from _tool_bamboo_plans.name, and _tool_bamboo_plans.name is set when uses choose bamboo plans inConfig UI via API HTTP PUT /connections/:connectionId/scopes, so I need your help to fix cicd_scopes.name.

cc @xiaomingzhang12

cicd_pipelines.name should be fixed in backend. @d4x1

@d4x1
Copy link
Contributor

d4x1 commented Sep 21, 2023

@Startrekzky @xiaomingzhang12
I found that plan's name form hlw-h3 - h2 is returned from bamboo's API, for example:

{
    "shortName": "h2",
    "shortKey": "H2",
    "type": "chain",
    "enabled": true,
    "link":
    {
        "href": "http://18.232.129.138:8085/rest/api/latest/plan/HLWH3-H2",
        "rel": "self"
    },
    "key": "HLWH3-H2",
    "name": "hlw-h3 - h2",
    "planKey":
    {
        "key": "HLWH3-H2"
    }
}

"name": "hlw-h3 - h2" is the plan's official name.

Shall we update it with our custom splicing logic?

@xiaomingzhang12
Copy link
Author

@Startrekzky @xiaomingzhang12 I found that plan's name form hlw-h3 - h2 is returned from bamboo's API, for example:

{
    "shortName": "h2",
    "shortKey": "H2",
    "type": "chain",
    "enabled": true,
    "link":
    {
        "href": "http://18.232.129.138:8085/rest/api/latest/plan/HLWH3-H2",
        "rel": "self"
    },
    "key": "HLWH3-H2",
    "name": "hlw-h3 - h2",
    "planKey":
    {
        "key": "HLWH3-H2"
    }
}

"name": "hlw-h3 - h2" is the plan's official name.

Shall we update it with our custom splicing logic?

In that case, I think it's better to use the format returned by the bamboo api itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug This issue is a bug
Projects
None yet
3 participants