auth0 / auth0-deploy-cli

The Auth0 Deploy CLI is a tool that helps you manage your Auth0 tenant configuration. It integrates into your development workflows as a standalone CLI or as a node module.
MIT License
248 stars 154 forks source link

Fix branding template body path parsing issue #943

Closed kushalshit27 closed 2 months ago

kushalshit27 commented 3 months ago

🔧 Changes

📚 References

🔬 Testing

Testing has been done considering different path for POSIX and Windows. For tenant.yaml: POSIX path on yaml:

    - template: universal_login
      body: ./branding_templates/universal_login.html

Windows path on yaml:

    - template: universal_login
      body: .\branding_templates\universal_login.html

Same test has been done for json(directory) export/import.

📝 Checklist

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 84.32%. Comparing base (4b062cf) to head (1a66515).

Files Patch % Lines
src/utils.ts 80.00% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #943 +/- ## ========================================== - Coverage 84.33% 84.32% -0.01% ========================================== Files 116 116 Lines 3791 3802 +11 Branches 743 745 +2 ========================================== + Hits 3197 3206 +9 - Misses 328 329 +1 - Partials 266 267 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

vasantteja commented 3 months ago

Quick question, our pipeline is failing with this error 2024-08-14T15:13:07.881Z - error: Problem running command import 2024-08-14T15:13:07.881Z - error: Problem deploying branding, Error: Unable to load file /universal_login.html due to Error: ENOENT: no such file or directory, access '/branding_templates/universal_login.html Does this pr solve this issue.

kushalshit27 commented 3 months ago

Hi, @vasantteja This should solve the error:

I have tested for tenant.yaml: POSIX path on yaml:

    - template: universal_login
      body: ./branding_templates/universal_login.html

Windows path on yaml:

    - template: universal_login
      body: .\branding_templates\universal_login.html

Same test has been done for json(directory) export/import.

vasantteja commented 3 months ago

Hi, @vasantteja This should solve the error:

I have tested for tenant.yaml: POSIX path on yaml:

    - template: universal_login
      body: ./branding_templates/universal_login.html

Windows path on yaml:

    - template: universal_login
      body: .\branding_templates\universal_login.html

Same test has been done for json(directory) export/import.

Thanks for the update. Appreciate the help.

vasantteja commented 3 months ago

Hi @kushalshit27,

I noticed that another PR related to this issue was merged in version 7.24.1. I used it to run our pipeline, but it failed with the same error mentioned above. I assume our issue will not be resolved until this PR is merged. Do you have any idea when this PR will be merged?

kushalshit27 commented 2 months ago

@vasantteja planning to release today!