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

Install operation fails when repository has URL encoded space #137

Open
richard-giraud opened this issue Nov 8, 2024 · 3 comments · May be fixed by #138
Open

Install operation fails when repository has URL encoded space #137

richard-giraud opened this issue Nov 8, 2024 · 3 comments · May be fixed by #138
Labels

Comments

@richard-giraud
Copy link

richard-giraud commented Nov 8, 2024

Describe the bug
sfp install fails with the message Error: URL parsing failed. when the repository URL has URL-encoded spaces. E.g.: [email protected]:v3/project%20name/project%20name. The %20 seems to give the issues.

The remote URL that triggered the issue comes from the Azure DevOps UI. It's something that most any user of ADO will encounter if the repository has a space in its name.

To Reproduce
(Please pardon the imprecision here. The error occurs on a system owned be the client and it's not possible for me to use it to report the issue directly.)

Steps to reproduce the behavior:

  1. Set up a project that's capable of installing 1 or more packages to a Scratch Org. It needs to be a git repository with an origin remote that lacks spaces.
  2. Use sfp to build and install the artifacts:
    1. sfp build --v DevHub
    2. sfp install -o DevHub
  3. Observe that the install succeeds.
  4. Delete the .sfpowerscripts and artifacts folders to clean up the existing packages. This needs to be done because the repository URL is included in the resulting artifacts.
  5. Change the origin:
    1. git remote remove origin
    2. git remote add origin [email protected]:RGENT/Salesforce%20POC.git
  6. Use sfp to build and install the artifacts:
    1. sfp build -v DevHub
    2. sfp install -o DevHub
  7. Observe that install fails with the message: Error: URL parsing failed.

Expected behavior
I expect 2 things:

  1. %20 is acceptable. This is how it comes from Azure DevOps.
  2. If there is an error parsing the URL, then the error messages is more descriptive.

Screenshots
Image

Platform Details (please complete the following information):

  • OS: Windows 11 with WSL2 and Ubuntu 24.04 LTS
  • Version: sfp 39.2.3 wsl-x64 node-v20.15.1
  • Salesforce CLI(sfdx cli) Version: sf 2.65.8 wsl-x64 node-v20.15.1
  • CI Platform: None. This happens in the local environment.

Additional context
This appears to be due to a bug in a dependency:

  • @flxbl-io/sfp depends on git-url-parse via the gitUrlParse function call at
    let currentRemoteURL = gitUrlParse(sfpPackage.repository_url);
    .
  • git-url-parse depends on git-up.
  • git-up depends on parse-url v8 (^8.1.0).
  • There's a bug report that says git-up needs to be updated to use the latest version of parse-url.
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 8, 2024
…rseable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 8, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
@richard-giraud
Copy link
Author

richard-giraud commented Nov 8, 2024

The PR improves the error message. I'm working on a PR to fix this upstream.

@richard-giraud
Copy link
Author

I've submitted a bug report upstream (IonicaBizau/git-up#36) and provided a PR.

richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 14, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 14, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 14, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 14, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 14, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 14, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 14, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 15, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 15, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 15, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 15, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 15, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
richard-giraud added a commit to richard-giraud/sfp that referenced this issue Nov 15, 2024
…seable

This adds a skipped test that should be enabled after flxbl-io#137
@richard-giraud
Copy link
Author

The upstream bugs have been addressed and PR #138 will resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant