-
Notifications
You must be signed in to change notification settings - Fork 10
Add check for jira_ticket parameter being passed via spark-run for adhoc spark jobs #161
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
Add check for jira_ticket parameter being passed via spark-run for adhoc spark jobs #161
Conversation
|
How about letting user to use a separate argument for the jira ticket? I.e. # Ad-hoc CLI
paasta spark-run --aws-profile=dev-core-ml --jira-ticket="ABC-123" --spark-args "..."
# Jupyter
spark = paasta.create_spark_session(
{
'spark.executor.cores': '4',
...
},
profile_name="dev-core-ml",
jira_ticket="ABC-123",
) |
This is a cleaner solution I think. Would this work out of the box? Or do users need to update spark-tools to be able to use this additional kwarg? |
yeah this will need updating spark_run in paasta and spark-tools, but both approaches require bumping servcie_configuration_lib in paasta and spark-tools anyway |
Then I'd prefer the cleaner way. |
chi-yelp
left a comment
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.
Commented for a nit, lgtm otherwise
| user_spark_opts = _convert_user_spark_opts_value_to_str(user_spark_opts) | ||
|
|
||
| if self.mandatory_default_spark_srv_conf.get('spark.yelp.jira_ticket.enabled') == 'true': | ||
| needs_jira_check = os.environ.get('USER', '') not in ['batch', 'TRON', ''] |
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.
nit: can be simplified as follows, and add a comment
| needs_jira_check = os.environ.get('USER', '') not in ['batch', 'TRON', ''] | |
| # Check Jira ticket if the run is not a Tron run | |
| needs_jira_check = os.environ.get('USER') not in ['batch', 'TRON'] |
What this change does
In order to more accurately attribute the costs of feature development to infrastructure costs we are making a change to how we submit adhoc spark jobs. Users will need to pass an additional parameter
jira_ticketin spark-args. The value of this parameter should be the top level jira ticket being used to track your project. This will allow us to aggregate the entire project's spark development costs over time.Will work only after the flag
spark.yelp.jira_ticket.enabledis set to true in srv-configs and the new version with these changes are included in paasta and spark-tools.Testing
jira_ticket label is being added to executors
https://app.cloudzero.com/explorer?activeCostType=real_cost&granularity=hourly&partitions=k8slabel%3Aspark_yelp_com_jira_ticket&dateRange=Last%2024%20Hours&k8slabel%3Aspark_yelp_com_user=sids&showRightFlyout=filters
Tech Spec
Jira Ticket