Skip to content

Conversation

@CharlieR-o-o-t
Copy link

@CharlieR-o-o-t CharlieR-o-o-t commented Sep 21, 2023

What this PR does / why we need it:
For now it's impossible to use non-urlencoded URL with cluster-api gitlab repo client.
After url.Parse call, url.RawPath is used which is optional, and exists only if provided URL has encoded characters.

E.g this url
https://gitlab.foo.com/api/v4/projects/3441/packages/generic/aws-provider/v0.2.34/infrastructure-components.yaml
will result in error
invalid url: a GitLab repository url should be in the form https://{host}/api/v4/projects/{projectSlug}/packages/generic/{packageName}/{defaultVersion}/{componentsPath}

/area clusterctl
area/clusterctl

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 21, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @CharlieR-o-o-t. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ykakarap for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 21, 2023
Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

/area clusterctl
/ok-to-test

Thanks for this! Did you run into this issue with a release version of clusterctl?

@k8s-ci-robot k8s-ci-robot added area/clusterctl Issues or PRs related to clusterctl ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. do-not-merge/needs-area PR is missing an area label labels Sep 21, 2023
@CharlieR-o-o-t
Copy link
Author

@killianmuldoon
I'm using cluster-api-operator and cluster-api is vendored. Yes, the problem is actual for release version.

I have noticed that some tests has been failed and found the reason of usage url.RawPath.
URL provided to repository gitlab client is expected to be encoded since "ProjectSlug" should be able to contain path separator characters like "/", in other case url will be parsed incorrectly.

So, it's expected the projectSlug should be always url-encoded.

So, cluster-api gitlab client will not work in case when ProjectID is provided instead of ProjectSlug, this is correct url to access package registry, but invalid in context of cluster-api client.

@Jont828
Copy link
Contributor

Jont828 commented Nov 3, 2023

@CharlieR-o-o-t This change seems reasonable to me. Did you try this out locally to verify that it works? And second, it looks like you're getting some unit test failures saying that it failed to create the GitLab client.

@CharlieR-o-o-t
Copy link
Author

@CharlieR-o-o-t This change seems reasonable to me. Did you try this out locally to verify that it works? And second, it looks like you're getting some unit test failures saying that it failed to create the GitLab client.

hello, I had take a look into unit tests, there is strict test condition that gitlab project expected to be url encoded string. This is why it's failing. There is bunch of unit tests linked to this.

I need some time to rework this. To allow both url encoded and non url-encoded. Will update soon.

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 13, 2023
@fabriziopandini
Copy link
Member

/lgtm cancel

as per

I need some time to rework this. To allow both url encoded and non url-encoded. Will update soon.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 13, 2023
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 15, 2023
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

@CharlieR-o-o-t: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-test-main f201cea link true /test pull-cluster-api-test-main
pull-cluster-api-e2e-blocking-main f201cea link true /test pull-cluster-api-e2e-blocking-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 25, 2024
@fabriziopandini
Copy link
Member

/close

as per #10605 (comment)

@k8s-ci-robot
Copy link
Contributor

@fabriziopandini: Closed this PR.

In response to this:

/close

as per #10605 (comment)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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

Labels

area/clusterctl Issues or PRs related to clusterctl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants