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

feat: initial work on codegate version check widget #94

Merged
merged 8 commits into from
Jan 17, 2025

Conversation

alex-mcgovern
Copy link
Collaborator

@alex-mcgovern alex-mcgovern commented Jan 16, 2025

Adds a second check to the "CodeGate Status" widget — depends on stacklok/codegate#612

Related to stacklok/codegate#555

Screen.Recording.2025-01-16.at.1.30.54.PM.mov

@coveralls
Copy link
Collaborator

coveralls commented Jan 16, 2025

Pull Request Test Coverage Report for Build 12828464111

Details

  • 42 of 48 (87.5%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.8%) to 65.711%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/features/dashboard-codegate-status/components/codegate-status-health.tsx 3 4 75.0%
src/features/dashboard-codegate-status/components/codegate-status-polling-control.tsx 4 5 80.0%
src/features/dashboard-codegate-status/components/codegate-status-version.tsx 5 6 83.33%
src/features/dashboard-codegate-status/lib/get-codegate-health.ts 6 7 85.71%
src/features/dashboard-codegate-status/components/codegate-status-refresh-button.tsx 7 9 77.78%
Totals Coverage Status
Change from base Build 12828301359: 0.8%
Covered Lines: 442
Relevant Lines: 596

💛 - Coveralls

Comment on lines +9 to +12
const resp = await fetch(
new URL("/health", import.meta.env.VITE_BASE_API_URL),
);
const data = (await resp.json()) as unknown as HealthResponse;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this api is not integrated into the openapi in codegate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The health one isn't AFAIK — but the version one should be, that's a good point — once the BE work is in, we can generate it & use the API client.

I also noticed a bug in the previous PR where the client wouldn't be initialised with a base URL on first mount and we would make a request to a relative path of the frontend application — should investigate why that is as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's some discussion happening on best way to handle OpenAPI spec in discord — will come back and clean this up once that's settled.

@alex-mcgovern alex-mcgovern marked this pull request as ready for review January 17, 2025 11:48
@alex-mcgovern alex-mcgovern merged commit 0baa10b into main Jan 17, 2025
8 checks passed
@alex-mcgovern alex-mcgovern deleted the feat/555/version-check branch January 17, 2025 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants