-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Bug fix in AWS glue operator when specifying the WorkerType & NumberOfWorkers #19787
Conversation
… worker type and number of workers
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)
|
Instead of sliently dropping |
In the Currently, the |
We can do something like def __init__(
self,
...,
num_of_dpus: Optional[int] = None,
...,
) -> None:
create_job_kwargs = create_job_kwargs or {}
if "WorkerType" in create_job_kwargs and "NumberOfWorkers" in create_job_kwargs:
if num_of_dpus is not None:
raise ValueError("Cannot specify num_of_dpus with custom WorkerType")
elif num_of_dpus is None:
self.num_of_dpus = 10
else:
self.num_of_dpus = num_of_dpus |
I have committed the suggested change i.e. adding the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the CI passes... (just kicked it start)
The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease. |
Awesome work, congrats on your first merged pull request! |
Existing issue:
closes: #19207
related: #19207
This commit is to fix a bug in the AWS Glue Job operator. In the case when we specify the
WorkerType
andNumberOfWorkers
as the parameters in thecreate_job_kwargs
, the glue job creation would fail. This is because AWS Glue API does not allow to use "AllocatedCapacity" or "MaxCapacity" parameters when the 'WorkerType' and 'NumberOfWorkers' are being assigned. This is the issue which I have addressed and fixed in this commit.I have removed the "AllocatedCapacity" or "MaxCapacity" parameters from the
glue_client.create_job
function call if theWorkerType
andNumberOfWorkers
are specified.