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

Fix Nuclio function invocations when deployed via the Helm chart #5917

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Mar 23, 2023

The CVAT_NUCLIO_FUNCTION_NAMESPACE needs to be defined consistently in order for Nuclio integration to work. Currently, it's set to cvat for the main CVAT server process, but not for any other CVAT process (which means it defaults to nuclio in those processes). Since it's the annotation worker process that actually invokes the Nuclio functions, the invocation fails.

Fix it by synchronizing the Nuclio environment variables across all backend deployments. Technically, I think only the server and annotation worker deployments need these variables, but since they're accessed by cvat/settings/base.py in every process that loads Django, define them everywhere to be sure.

Motivation and context

Fixes #5626.

How has this been tested?

Manual testing on a local minikube cluster. Also, by running helm upgrade --dry-run.

Checklist

  • I submit my changes into the develop branch
  • I have added a description of my changes into the CHANGELOG file
  • [ ] I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • [ ] I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

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
Copy link
Contributor

The `CVAT_NUCLIO_FUNCTION_NAMESPACE` variable needs to be defined
consistently in order for Nuclio integration to work. Currently, it's set to
`cvat` for the main CVAT server process, but not for any other CVAT process
(which means it defaults to `nuclio` in those processes). Since it's the
annotation worker process that actually invokes the Nuclio functions, the
invocation fails.

Fix it by synchronizing the Nuclio environment variables across all backend
deployments. Technically, I think only the server and annotation worker
deployments need these variables, but since they're accessed by
`cvat/settings/base.py` in every process that loads Django, define them
everywhere to be sure.
@SpecLad
Copy link
Contributor Author

SpecLad commented Mar 24, 2023

Sure; updated.

@nmanovic nmanovic merged commit 7b7b5b4 into cvat-ai:develop Mar 24, 2023
mikhail-treskin pushed a commit to retailnext/cvat that referenced this pull request Jul 1, 2023
…t-ai#5917)

The `CVAT_NUCLIO_FUNCTION_NAMESPACE` needs to be defined consistently in
order for Nuclio integration to work. Currently, it's set to `cvat` for
the main CVAT server process, but not for any other CVAT process (which
means it defaults to `nuclio` in those processes). Since it's the
annotation worker process that actually invokes the Nuclio functions,
the invocation fails.

Fix it by synchronizing the Nuclio environment variables across all
backend deployments. Technically, I think only the server and annotation
worker deployments need these variables, but since they're accessed by
`cvat/settings/base.py` in every process that loads Django, define them
everywhere to be sure.

Fixes cvat-ai#5626.
@SpecLad SpecLad deleted the helm-nuclio-env branch July 20, 2023 10:11
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.

'X-Nuclio-Function-Namespace' header is set incorrectly when invoking a Nuclio function for auto annotation.
3 participants