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

Debug health check #5587

Merged
merged 13 commits into from
Jan 17, 2023
Merged

Debug health check #5587

merged 13 commits into from
Jan 17, 2023

Conversation

azhavoro
Copy link
Contributor

Motivation and context

How has this been tested?

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@azhavoro azhavoro marked this pull request as ready for review January 13, 2023 16:49
@nmanovic
Copy link
Contributor

@azhavoro , can we customize the error message in the PR?

@@ -29,3 +29,7 @@ export function customWaViewHit(pageName?: string, queryString?: string, hashInf
}
}
}

export function isPublicInstance(): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that it is a right solution. Probably HealthCheck endpoint can return extra information. Need to think how to implement that. Another solution is to have the message as a variable in settings. Please think and propose the best solution.

@nmanovic
Copy link
Contributor

@azhavoro , could you please resolve the conflict?

if (Object.prototype.hasOwnProperty.call(data, checkName) &&
checkName !== 'Cache backend: media' &&
data[checkName] !== 'working') {
isHealthy = false;
Copy link
Member

Choose a reason for hiding this comment

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

If it is a temporary workaround, let's keep a comment about it here

azhavoro and others added 5 commits January 17, 2023 13:47
Co-authored-by: Boris Sekachev <boris.sekachev@yandex.ru>
Co-authored-by: Boris Sekachev <boris.sekachev@yandex.ru>
Co-authored-by: Boris Sekachev <boris.sekachev@yandex.ru>
Copy link
Contributor

@nmanovic nmanovic left a comment

Choose a reason for hiding this comment

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

From my perspective these changes are fine!

<!-- Raised an issue to propose your change
(https://github.com/cvat-ai/cvat/issues).
It helps to avoid duplication of efforts from multiple independent
contributors.
Discuss your ideas with maintainers to be sure that changes will be
approved and merged.
Read the
[CONTRIBUTION](https://github.com/cvat-ai/cvat/blob/develop/CONTRIBUTING.md)
guide. -->

<!-- Provide a general summary of your changes in the Title above -->

### Implementation & using

Regular import from the whole cvat-ui-app, like: ```import consts from
'config';```

To change config for app.cvat.ui, need to specify a new file during
webpack build time:
```UI_APP_CONFIG='/home/bsekachev/config.override.tsx' yarn build```

In development:
``UI_APP_CONFIG='/home/bsekachev/config.override.tsx' yarn
start:cvat-ui``


Override file content in this case is simple:

```ts
import config from './cvat/cvat-ui/src/config';

config.HEALH_CHECK_RETRIES = 5;

export default {
    ...config,
    NEW_CONFIG_VARIABLE: 'test value',
};
```

Implemented via webpack aliases:
```
resolve { alias: {
                config$: appConfigFile,
            } }
```

+ No typescript errors in code, because default ``app-config`` exists in
``src``.

Co-authored-by: Andrey Zhavoronkov <andrey@cvat.ai>
@nmanovic nmanovic merged commit 3fa6f35 into develop Jan 17, 2023
@nmanovic nmanovic deleted the az/debug_health_check branch January 17, 2023 20:27
mikhail-treskin pushed a commit to retailnext/cvat that referenced this pull request Jul 1, 2023
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