Skip to content

URL encode query strings in art:promote#211

Merged
memsharded merged 2 commits intoconan-io:mainfrom
maalund:fix/art-promote-url-encoding
Oct 1, 2025
Merged

URL encode query strings in art:promote#211
memsharded merged 2 commits intoconan-io:mainfrom
maalund:fix/art-promote-url-encoding

Conversation

@maalund
Copy link
Contributor

@maalund maalund commented Oct 1, 2025

Closes #210

@CLAassistant
Copy link

CLAassistant commented Oct 1, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, thanks very much for your contribution @maalund

I think it might be worth to add a test to cover this case, something like:

@pytest.mark.requires_credentials
def test_art_promote_build_version():
    conanfile = textwrap.dedent("""
        from conan import ConanFile

        class Pkg(ConanFile):
            name = "mypkg"
            version = "1.0+build"
        """)
    save("./conanfile.py", conanfile)

    run("conan create .")
    run("conan upload mypkg/1.0+build -c -r extensions-stg")

    art_url = os.getenv("ART_URL")
    art_user = os.getenv("CONAN_LOGIN_USERNAME_EXTENSIONS_PROD")
    art_password = os.getenv("CONAN_PASSWORD_EXTENSIONS_PROD")
    run(f"conan art:promote pkglist.json --from=extensions-stg --to=extensions-prod --url={art_url} --user={art_user} --password={art_password}")

    out = run("conan list mypkg/1.0+build:*#* -r=extensions-prod -f=json", stderr=None)
    remote_prod_list_json_out = json.loads(out)
    # check it

    # necessary to do 2 promotes to see the error??
    out = run("conan list mypkg/1.0+build:*#* -r=extensions-prod -f=json", stderr=None)
    remote_prod_list_json_out = json.loads(out)
    # check it again

would be good (I haven't tested it)

@AbrilRBS
Copy link
Member

AbrilRBS commented Oct 1, 2025

If you're having problemas with the CLA bot, note that the commit might have been authored by a different email than the ones associated with your account, so the CLA bot won't be able to mark it as accepted.

The easiest way would be to amend the commit with a valid email author, and force push to get the history clean for the bot

@maalund maalund force-pushed the fix/art-promote-url-encoding branch from 92bd0c2 to ce62e4e Compare October 1, 2025 10:59
@maalund maalund force-pushed the fix/art-promote-url-encoding branch from ce62e4e to 3d0d4f0 Compare October 1, 2025 12:27
@maalund
Copy link
Contributor Author

maalund commented Oct 1, 2025

Test added and author amended.

@memsharded memsharded merged commit 76df426 into conan-io:main Oct 1, 2025
3 checks passed
@memsharded
Copy link
Member

Merged, many thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nested redundant repository structure with the art:promote command

4 participants