Development
Learn techniques for debugging different elements of Chalk.
We’ve compiled some common errors that people come across, as well as some approaches to debug these errors and their most common root causes. If you are still struggling to debug, please reach out in your support channel!
These are errors you would encounter when running queries, either manual or orchestrated.
If you’re receiving either 0 rows when you expect a non-zero query result, or if the feature values that you’re seeing
in your query results do not match what you’re expecting, we recommend that you follow the steps in
our guide for debugging queries. This includes some common tips and
tricks, such as using store_plan_stages
and stepping through the query plan.
The 401 status code means unauthenticated
. We’d recommend verifying that the token you’re using to run the query is
correct. To refresh your token, you can run chalk login
from the terminal using our CLI and then chalk config
to verify that your token has been provisioned for the right environment.
The 500 status code means internal server error
. This should usually come with another message with more details on
the root cause of the error. If you are struggling to debug this, please reach out to us!
The 502 status code means bad gateway
, which usually indicates timeout
or not enough servers
. We’d recommend
looking at CPU utilization on your cluster to determine if you need to modify the cloud resource configurations. You
can do so in the Settings > Resources
page in the Chalk dashboard by modifying and applying resource configuration JSON
changes under Advanced Resource Configuration
. However, we’d also encourage reaching out to us for discussion on how
to optimize resource configuration for your environment!
If you are executing a long-running query from a notebook or somewhere locally, the client’s polling for query status might have a timeout shorter than the query’s runtime. If the query times out before completion, we’d recommend verifying whether the query is still running in the dashboard by looking at the query run page and validating that there is a pod in the cluster running the query. It’s possible that your query may also complete after the polling timeout, in which case you can view the query status in the dashboard.
The first thing to validate is that every feature can be mapped to a resolver output. If all features have resolvers, then you might see this error message if Chalk is unable to construct a dependency graph for resolving the features that you are querying. This is usually a result of a join that cannot be processed. Please reduce the number of output features in your query until you have identified a minimal set that reproduces the circular dependency error and reach out to us with this context!
The first thing to check is whether there actually are duplicate resolvers by the same name. If there are not, this error message can also sometimes be an indicator of a missing import. If you are unable to determine if your recent changes required an import, you can use a linting tool to find out, such as pylint.
These are errors you would encounter when running chalk apply
or chalk apply --branch
.
You would usually encounter this error when running chalk apply --branch
. In the Chalk dashboard under Branches
, you
can check the status of the branch server. You can also kill lingering processes on branches, such as long-running
queries, by stopping and restarting the branch server in the dashboard.
If you’ve verified that you have a token and are properly authenticated, then you should also verify what role you
have within the Chalk environment. The developer
role can only run chalk apply --branch
rather than chalk apply
.
These are errors that you might observe through metrics monitors on deployed and orchestrated features and resolvers, as opposed to errors you would encounter in local development.
Typically, these errors are an indication of a misalignment in load and resource configuration. Please reach out to us in your support channels with context on data scale and current resource configurations and we can help you identify mitigation strategies to avoid these errors!
If you’re seeing stale features, we’d recommend ensuring that you have max_staleness set for the features to configure the maximum staleness allowed for the features, so that Chalk will know to recompute fresh values as specified.