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

BugFix - Druid Airflow Exception to about content #27174

Merged
merged 7 commits into from
Oct 31, 2022

Conversation

emincanoguz11
Copy link
Contributor

@emincanoguz11 emincanoguz11 commented Oct 21, 2022

Hi,
This PR is about
Closes: #27029

I tested with local env and docker. I see that this result

raise AirflowException(f'The error code of {url}: {req_index.content}')
airflow.exceptions.AirflowException: The error code of DRUID-URL/druid/indexer/v1/task: b'{"error":"Cannot construct instance of `org.apache.druid.indexer.partitions.DimensionRangePartitionsSpec`, problem: partitionDimensions must be specified\\n at [Source: (org.eclipse.jetty.server.HttpInputOverHTTP); line: 102, column: 7] (through reference chain: org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexSupervisorTask[\\"spec\\"]->org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexIngestionSpec[\\"tuningConfig\\"]->org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexTuningConfig[\\"partitionsSpec\\"])"}'

P.S : I deleted my own Druid Broker host

Screen Shot 2022-10-20 at 18 04 21

Also I take pictures for standarts

Screen Shot 2022-10-21 at 08 33 31
Screen Shot 2022-10-21 at 08 33 41
Screen Shot 2022-10-21 at 08 33 48
Screen Shot 2022-10-21 at 08 34 09

@boring-cyborg
Copy link

boring-cyborg bot commented Oct 21, 2022

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

- Good choice for language

Co-authored-by: Niko <onikolas@amazon.com>
Copy link
Contributor

@o-nikolas o-nikolas left a comment

Choose a reason for hiding this comment

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

Thanks for making that update! A committer will be required to run the workflow for a first time committer (and ultimately merge if everything passes and they are happy with the code). Unfortunately I am not a committer, I'll CC a few who may have time to have a look: @eladkal @potiuk @kaxil

@o-nikolas
Copy link
Contributor

@uranusjr has run the build workflow on you PR and there were some static check failures, you'll need to patch those up.
You can enable pre-commit to easily run static checks on your code (readme).

Do also rebase your branch since some changes were recently merged to standardize quoting in the Airflow codebase.

@emincanoguz11
Copy link
Contributor Author

emincanoguz11 commented Oct 25, 2022

Thanks Nikolas. I am very busy for this weekend. I will check on Friday.

P.S @o-nikolas Is this problem about character number or write type? I don't know.

Screen Shot 2022-10-25 at 21 58 33

@o-nikolas
Copy link
Contributor

Thanks Nikolas. I am very busy for this weekend. I will check on Friday.

No worries, thanks for sticking with it :)

P.S @o-nikolas Is this problem about character number or write type? I don't know.

Screen Shot 2022-10-25 at 21 58 33

This is mypy warning you that at least one of the strings you're formatting here is a byte string, and that Python 3 doesn't handle this edge case gracefully when formatting with f-strings.
You can see from the example output in the screenshot you linked in the description that the logged output contains the b prefix: ... b'{"error":.... calling a .decode('utf-8') on the values which are bytstrings will likely solve your issue (assuming they're utf-8 encoded).

@potiuk
Copy link
Member

potiuk commented Oct 31, 2022

You need to rebase I am afraid

@emincanoguz11
Copy link
Contributor Author

@potiuk Today, I will rebase and change. Thanks to approved

Copy link
Contributor Author

@emincanoguz11 emincanoguz11 left a comment

Choose a reason for hiding this comment

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

I changed f string to format type. Can we check this feature?

@emincanoguz11
Copy link
Contributor Author

emincanoguz11 commented Oct 31, 2022

Can I correct PR? I rebased firstly after that I changed the PR. But I get error in workflow. I don't know.

@uranusjr
Copy link
Member

I merged main and moved the error message to task log instead, since the HTTP response string can be potentially long and not belong to the exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Druid Operator is not getting host
4 participants