Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Reapply: feat(api): Allow configuring the API URL at runtime #1707

Merged
merged 2 commits into from
Apr 27, 2023
Merged

Reapply: feat(api): Allow configuring the API URL at runtime #1707

merged 2 commits into from
Apr 27, 2023

Conversation

lordrip
Copy link
Member

@lordrip lordrip commented Apr 27, 2023

Reapply #1687

Context

Currently, the API URL is retrieved using an environment variable available at build time only. This creates friction in the VSCode extension context as it blocks running more than one instance of it.

Changes

This commit adds a constructor parameter to optionally receive the API URL so it can be overridden through the VSCode bootstrap process.

The API URL still defaults to the same environment variable provided at build time.

Example running at port :9000

image

fixes: 1451

@lordrip lordrip requested a review from a team April 27, 2023 14:02
@sonarcloud
Copy link

sonarcloud bot commented Apr 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Apr 27, 2023

Codecov Report

Merging #1707 (28e475f) into main (32ded5c) will decrease coverage by 0.12%.
The diff coverage is 53.48%.

@@            Coverage Diff             @@
##             main    #1707      +/-   ##
==========================================
- Coverage   66.94%   66.82%   -0.12%     
==========================================
  Files          72       72              
  Lines        2072     2077       +5     
  Branches      471      471              
==========================================
+ Hits         1387     1388       +1     
- Misses        644      648       +4     
  Partials       41       41              
Impacted Files Coverage Δ
src/api/apiService.ts 29.03% <33.33%> (ø)
src/api/requestService.ts 62.96% <62.96%> (ø)
src/api/index.ts 100.00% <100.00%> (ø)

@lordrip lordrip merged commit ff7d24a into KaotoIO:main Apr 27, 2023
@lordrip lordrip deleted the fix/reapply-api-url branch May 6, 2023 17:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow configuration at runtime of the url to reach the backend
3 participants