Skip to content

Conversation

@zackspear
Copy link
Contributor

@zackspear zackspear commented Mar 13, 2025

Ineligible to run release config error state was being overwritten because the ConfigErrorState ENUM didn't include the value returned by emhttp.

https://github.com/unraid/api/blob/main/api/src/unraid-api/graph/resolvers/config/config.resolver.ts#L26

Summary by CodeRabbit

  • New Features

    • Introduced an "ineligible" error state that enhances configuration error reporting. Users will now receive more detailed and specific messages when configuration issues occur, aiding in quicker troubleshooting and clearer communication. Existing error responses remain unchanged, ensuring smooth integration and backward compatibility. This improvement reinforces our commitment to robust and clear error reporting.
  • Bug Fixes

    • Corrected HTML syntax for navigation links, ensuring proper functionality within the application.

@zackspear zackspear requested a review from elibosley March 13, 2025 00:54
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2025

Walkthrough

The pull request modifies the ConfigErrorState enumeration in the GraphQL schema by removing the entire enum in one file and adding a new value, INELIGIBLE, in another. This results in a change in how configuration error states are represented across the API and web components. Additionally, various files are updated to reflect changes in last download times and correct HTML syntax.

Changes

File(s) Change Summary
api/.../config.graphql Removed the ConfigErrorState enum entirely.
api/.../vars.graphql
web/composables/gql/graphql.ts
Added enumeration value INELIGIBLE to the ConfigErrorState enum.
web/_webGui/testWebComponents.page Inserted "ineligible" => 'INELIGIBLE' into the $configErrorEnum array.
api/.../modifications/__test__/__fixtures__/downloaded/.login.php.last-download-time
api/.../modifications/__test__/__fixtures__/downloaded/DefaultPageLayout.php
api/.../modifications/__test__/__fixtures__/downloaded/DefaultPageLayout.php.last-download-time
api/.../modifications/__test__/__fixtures__/downloaded/Notifications.page.last-download-time
api/.../modifications/__test__/__fixtures__/downloaded/auth-request.php.last-download-time
Updated last download time values in respective files.
api/.../modifications/__test__/snapshots/DefaultPageLayout.php.modified.snapshot.php Corrected HTML syntax for the href attribute in the flashReport function.
web/store/server.ts Removed TypeScript directive suppressing a type error related to INELIGIBLE.

Suggested reviewers

  • pujitm
  • mdatelle

Poem

In the realm of enums, a new state takes flight,
INELIGIBLE joins, shining bright.
From GraphQL to web, the changes cascade,
A tapestry woven, no detail delayed.
With time values updated, and syntax refined,
This pull request dances, a coder's design! 🎉


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 2255716 and b9a271e.

📒 Files selected for processing (3)
  • api/src/graphql/schema/types/config/config.graphql (0 hunks)
  • web/composables/gql/graphql.ts (3 hunks)
  • web/store/server.ts (0 hunks)
💤 Files with no reviewable changes (2)
  • api/src/graphql/schema/types/config/config.graphql
  • web/store/server.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/composables/gql/graphql.ts
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Test API
  • GitHub Check: Build Web App
  • GitHub Check: Build API
  • GitHub Check: Cloudflare Pages

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@elibosley
Copy link
Member

Wondering if we can't eliminate the Enum in favor of loading directly (the raw value?) or since you iterate on this it's probably better to just let the backend have the enum and remove the frontend logic eventually in favor of backend validation and error states.

Just want to remove one of the multiple sources of truth, but it's probably too soon to do so.

@elibosley
Copy link
Member

No idea why this was failing, but I'll merge once it's ready.

@github-actions
Copy link
Contributor

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR1220/dynamix.unraid.net.plg

@zackspear
Copy link
Contributor Author

Wondering if we can't eliminate the Enum in favor of loading directly (the raw value?) or since you iterate on this it's probably better to just let the backend have the enum and remove the frontend logic eventually in favor of backend validation and error states.

Agreed that the logic for this should move to the backend. Maybe a future improvement. But I'll leave it up to you for when you want to do it.

@elibosley elibosley merged commit 1f00212 into main Mar 14, 2025
8 checks passed
@elibosley elibosley deleted the fix/api-overwritting-expired-updates-warning-state branch March 14, 2025 00:19
pujitm pushed a commit that referenced this pull request Mar 18, 2025
🤖 I have created a release *beep* *boop*
---


## [4.2.0](v4.1.3...v4.2.0)
(2025-03-18)


### Features

* add resolver for logging
([#1222](#1222))
([2d90408](2d90408))
* connect settings web component
([#1211](#1211))
([653de00](653de00))
* improve local dev with install path
([#1221](#1221))
([32c5b0a](32c5b0a))
* split plugin builds
([4d10966](4d10966))
* swap to absolute paths for css
([#1224](#1224))
([6f9fa10](6f9fa10))
* update theme application logic and color picker
([#1181](#1181))
([c352f49](c352f49))
* use patch version if needed on update check
([#1227](#1227))
([6ed46b3](6ed46b3))


### Bug Fixes

* add INELIGIBLE state to ConfigErrorState enum
([#1220](#1220))
([1f00212](1f00212))
* **api:** dynamix notifications dir during development
([#1216](#1216))
([0a382ca](0a382ca))
* **api:** type imports from generated graphql types
([#1215](#1215))
([fd02297](fd02297))
* **deps:** update dependency @nestjs/schedule to v5
([#1197](#1197))
([b1ff6e5](b1ff6e5))
* **deps:** update dependency @vueuse/core to v12
([#1199](#1199))
([d8b8339](d8b8339))
* fix changelog thing again
([2426345](2426345))
* fix invalid path to node with sh execution
([#1213](#1213))
([d12448d](d12448d))
* load tag correctly
([acd692b](acd692b))
* log errors
([629feda](629feda))
* one-command dev & web env files
([#1214](#1214))
([8218fab](8218fab))
* re-release fixed
([bb526b5](bb526b5))
* recreate watcher on path change
([#1203](#1203))
([5a9154e](5a9154e))
* update brand loading variants for consistent sizing
([#1223](#1223))
([d7a4b98](d7a4b98))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants