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

Maintain Consistency in Giganto's Behavior: Improvements and Fixes Needed for Remote Configuration Mode #881

Closed
sophie-cluml opened this issue Oct 31, 2024 · 0 comments · Fixed by #923
Assignees

Comments

@sophie-cluml
Copy link
Contributor

sophie-cluml commented Oct 31, 2024

  • Description in English

It has been observed that the operation of Giganto in remote configuration mode is inconsistent with its behavior in local configuration mode. The order and manner in which Giganto performs various actions in remote configuration mode should be the same as in local configuration mode.

In remote configuration mode, Giganto operates by receiving remote configuration from the GraphQL API, while in local configuration mode, it reads configuration from files. Although these two modes differ in their configuration setup processes, the operations should maintain consistency outside of these differences.

Therefore, I would like to propose modifying the Giganto code in the following direction when operating in remote configuration mode.

  1. Giganto must complete only the minimal tasks necessary to function as a GraphQL API server before it can properly operate. This is essential, as it needs to receive setConfig API requests to configure itself.

  2. After the configuration is set through the setConfig GraphQL API, migration tasks should be performed.

    • During the migration process, all GraphQL APIs of Giganto should refrain from executing their respective logic and should simply return an error, indicating that migration is in progress.
  3. Once the configuration is set through the setConfig GraphQL API, other tasks such as retain task, peer server task, ingest task, and publish task should be initiated.


  • Description in Korean

현재 Giganto의 remote configuration 모드에서의 동작 방식이 local configuration 모드와 일관성이 없음을 확인하였습니다. Giganto가 remote configuration으로 동작할 때, 각종 동작을 수행하는 순서와 방식은 local configuration 모드에서와 동일해야 합니다. remote configuration 모드에서는 Giganto가 GraphQL API로부터 remote configuration을 수신하여 동작하며, local configuration 모드에서는 파일로부터 configuration을 읽어 동작하는 차이점이 있으므로, 이와 관련해서는 당연히 차이점이 있을 수 밖에 없지만, 이러한 설정 셋업 방식 외에는 동작의 일관성이 유지되어야 합니다.

따라서, remote configuration으로 동작할 때 다음과 같은 방향으로 Giganto 코드를 수정하는 것을 제안하고자 합니다.

  1. GraphQL API 서버로서 동작할 수 있기 위한 최소한의 작업만을 완료한 후, Giganto가 GraphQL API 서버로서 정상적으로 동작해야 합니다. GraphQL API 서버로서의 역할을 수행할 수 있어야 setConfig API 요청을 수신하고 configuration 설정을 할 수 있기 때문입니다.

  2. setConfig GraphQL API를 통해 Giganto의 configuration이 설정 완료된 이후에 DB Migration 작업이 수행되어야 합니다.

    • Migration 작업이 수행되는 동안, Giganto의 모든 GraphQL API는 각 API의 로직을 수행하지 않고 단순히 Error를 반환해야 하며, 에러 메시지를 통해 마이그레이션 중임을 전달할 수 있습니다.
  3. setConfig GraphQL API를 통해 Giganto의 configuration이 설정 완료된 이후에 Retain Task, Peer Server Task, Ingest Task, Publish Task 등, 다른 Task 들을 시작해야 합니다.

@sophie-cluml sophie-cluml changed the title Maintain Consistency in Giganto's Behavior: Improvements Needed for Remote Configuration Mode Maintain Consistency in Giganto's Behavior: Improvements and Fixes Needed for Remote Configuration Mode Oct 31, 2024
@sophie-cluml sophie-cluml self-assigned this Nov 11, 2024
kimhanbeom added a commit that referenced this issue Dec 10, 2024
- Added minimal mode.
  - When local configuration is not used, Giganto will run in minimal
    mode.
  - In minimal mode, only the GraphQL server runs. Tasks and DB
    migrations are skipped.
  - The GraphQL server in minimal mode provides limited APIs.
  - If the configuration is received successfully via the `setConfig`
    GraphQL API, it will switch to normal mode.
- Removed OS-specific configuration directory.

Close: #881
Close: #876
kimhanbeom added a commit that referenced this issue Dec 10, 2024
- Add minimal mode.
  - When local configuration is not used, Giganto will run in minimal
    mode.
  - In minimal mode, only the GraphQL server runs. Tasks and DB
    migrations are skipped.
  - The GraphQL server in minimal mode provides limited APIs.
  - If the configuration is received successfully via the `setConfig`
    GraphQL API, it will switch to normal mode.
- Remove OS-specific configuration directory.

Close: #876
Close: #881
kimhanbeom added a commit that referenced this issue Dec 11, 2024
- Add minimal mode.
  - When local configuration is not used, Giganto will run in minimal
    mode.
  - In minimal mode, only the GraphQL server runs. Tasks and DB
    migrations are skipped.
  - The GraphQL server in minimal mode provides limited APIs.
  - If the configuration is received successfully via the `setConfig`
    GraphQL API, it will switch to normal mode.
- Remove OS-specific configuration directory.

Close: #876
Close: #881
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 a pull request may close this issue.

2 participants