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

fix(build): override env var with manually-defined localBaseUrl #62

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

kahboom
Copy link
Collaborator

@kahboom kahboom commented Apr 30, 2024

This PR fixes an issue with the build and Rekor endpoint. .env.local file was not being picked up for pre-defining NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN at runtime, and user-defined endpoints in the UI (via Settings modal) were further not overriding that default value.

Changes:

  • Revert react-hook-form changes for sanitization of the endpoint URL, and instead use PatternFly and validation natively as we were before, because it affects how baseUrl is used in React Context
  • Use process.env instead of getConfig from next.js, which also seems unreliable
  • Incorporate some of Masha (UXD)'s feedback request to only validate on submit
Screenshot 2024-04-30 at 6 32 15 PM Screenshot 2024-04-30 at 6 40 29 PM

fix(build): use local baseUrl

lint fix
Copy link

codecov bot commented Apr 30, 2024

Codecov Report

Attention: Patch coverage is 72.28916% with 23 lines in your changes are missing coverage. Please review.

Project coverage is 64.30%. Comparing base (4cd9ab6) to head (915ed91).

❗ Current head 915ed91 differs from pull request most recent head 8da94d6. Consider uploading reports for the commit 8da94d6 to get more accurate results

Files Patch % Lines
src/modules/components/Settings.tsx 72.83% 22 Missing ⚠️
src/modules/api/context.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
- Coverage   65.91%   64.30%   -1.61%     
==========================================
  Files          14       14              
  Lines        1590     1569      -21     
  Branches       59       43      -16     
==========================================
- Hits         1048     1009      -39     
- Misses        542      560      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lance lance merged commit 371eae7 into main Apr 30, 2024
16 checks passed
@lance lance deleted the fix-endpoint-bug branch April 30, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants