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

[DPE-5016] Hierarchical configuration handling #121

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

Batalex
Copy link
Contributor

@Batalex Batalex commented Dec 10, 2024

Changes:

  • Service account configuration values take precedence over integration hub's.
  • Fixed a few typos in readme

The environment

We added spark.app.another-name=something_in_the_way to the integration hub (you can thank Pedro for the inspiration), and spark.app.another-name=something_in_the_air to the test service account using spark-client.

Before

spark-client.service-account-registry get-config --username test --namespace test | grep another-name
# spark.app.another-name=something_in_the_way

spark-client.service-account-registry get-config --username test --namespace test --ignore-integration-hub | grep another-name
# spark.app.another-name=something_in_the_air

spark-client.pyspark --username test --namespace test
Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /__ / .__/\_,_/_/ /_/\_\   version 3.4.2
      /_/

Using Python version 3.10.12 (main, Sep 11 2024 15:47:36)
Spark context Web UI available at http://192.168.1.103:4040
Spark context available as 'sc' (master = k8s://https://192.168.1.103:16443, app id = spark-6537ceeacf4346dd9640acf23c9cc4e5).
SparkSession available as 'spark'.
>>>
>>> spark.sparkContext._conf.get("spark.app.another-name")
'something_in_the_way'

After

python ./spark8t/cli/service_account_registry.py get-config --username test --namespace test | grep another-name
# spark.app.another-name=something_in_the_air

python ./spark8t/cli/service_account_registry.py get-config --username test --namespace test --ignore-integration-hub | grep another-name
# spark.app.another-name=something_in_the_air

python ./spark8t/cli/pyspark.py --username test --namespace test --ignore-integration-hub   
Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /__ / .__/\_,_/_/ /_/\_\   version 3.4.2
      /_/

Using Python version 3.10.15 (main, Oct 16 2024 04:37:23)
Spark context Web UI available at http://192.168.1.103:4040
Spark context available as 'sc' (master = k8s://https://192.168.1.103:16443, app id = spark-ef4e4299efcd473399912745a66bc878).
SparkSession available as 'spark'.
>>> spark.sparkContext._conf.get("spark.app.another-name")
'something_in_the_air'

@Batalex Batalex requested review from welpaolo and deusebio December 10, 2024 16:26
@Batalex Batalex self-assigned this Dec 10, 2024
Copy link
Contributor

@welpaolo welpaolo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@deusebio deusebio left a comment

Choose a reason for hiding this comment

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

LGTM!

@Batalex Batalex merged commit f7f816b into main Dec 11, 2024
4 checks passed
@Batalex Batalex deleted the dpe-5016-config-handling branch December 11, 2024 08:43
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.

3 participants