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

Allow arbitrary python code #530

Merged
merged 17 commits into from
Aug 26, 2024
Merged

Allow arbitrary python code #530

merged 17 commits into from
Aug 26, 2024

Conversation

Maleware
Copy link
Contributor

@Maleware Maleware commented Aug 21, 2024

Description

This PR is the outcome of the decision https://github.com/stackabletech/decisions/issues/21

Contains:

  • CONFIG_OVERRIDE_FILE_HEADER_KEY (operator-rs constant)
  • CONFIG_OVERRIDE_FILE_FOOTER_KEY (operator-rs constant)
  • Bump stackable-operator from 0.73.0 to 0.74.0
  • Removing ..Default::default() from lib.rs as we don't want default values ( can be forgotten )
  • Adding Error for writeln!

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxe

Author

Preview Give feedback

Reviewer

Preview Give feedback

Acceptance

Preview Give feedback

@Maleware Maleware self-assigned this Aug 21, 2024
rust/operator-binary/src/superset_controller.rs Outdated Show resolved Hide resolved
rust/operator-binary/src/superset_controller.rs Outdated Show resolved Hide resolved
@Maleware Maleware changed the title Allow abitrary python code Allow arbitrary python code Aug 22, 2024
@Maleware Maleware marked this pull request as ready for review August 22, 2024 11:39
Copy link
Member

@sbernauer sbernauer left a comment

Choose a reason for hiding this comment

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

Sorry ^^
I still think some docs would be great (with the usual experimental disclaimer)

CHANGELOG.md Outdated Show resolved Hide resolved
rust/operator-binary/src/superset_controller.rs Outdated Show resolved Hide resolved
Maleware and others added 3 commits August 22, 2024 13:58
@Maleware
Copy link
Contributor Author

Excellent point, done with 4b64920

Copy link
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

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

Some tests would be good. Especially testing if role group and role configOverrides work as expected.

sbernauer
sbernauer previously approved these changes Aug 22, 2024
Copy link
Member

@sbernauer sbernauer left a comment

Choose a reason for hiding this comment

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

LGTM % Razvans comment

@Maleware
Copy link
Contributor Author

🟢 ./scripts/run-tests --test smoke_superset-4.0.2_openshift-false --skip-release

--- PASS: kuttl (89.84s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/smoke_superset-4.0.2_openshift-false (89.83s)
PASS

Copy link
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

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

approved as discussed

@Maleware Maleware enabled auto-merge August 26, 2024 12:02
@Maleware Maleware disabled auto-merge August 26, 2024 12:41
@Maleware Maleware added this pull request to the merge queue Aug 26, 2024
Merged via the queue into main with commit f3eac55 Aug 26, 2024
31 checks passed
@Maleware Maleware deleted the feature/abitrary-python-imports branch August 26, 2024 13:01
@lfrancke
Copy link
Member

lfrancke commented Sep 2, 2024

The decision is not public, can you summarize what this is about and if it is something that is documented please include a link to the docs. If it's not documented can you briefly summarize why note?

Does this need to be mentioned in the release notes?

@Maleware
Copy link
Contributor Author

Maleware commented Sep 2, 2024

This is to allow the user to add arbitrary python code to the superset_config.py.

We've got it documented in our superset docs and airflow docs

For a customer we added a whole class and reference to it to this config file s.th. they were able to use a custom OIDC login/logut.
However, this can be used for any case where superset allows us to replace functions with custom ones. It was driven by superset documentation about custom OIDC manager.

We've reached a decision on that this is how superset wants to be configured ( no matter how ugly it might appear ) and thus we want the operator to be useful in this case.

We've had an additional customer for airflow who wrote their whole config for themself ( basically ignoring the operators work and thus it's not used ) to achieve having own classes and functions. They now can use the configs the operator provides and have their custom code as a config.

I can't really make a objective statement weather or not we should mention it in the release notes. For me it should as it enables some customers and they might wanna know.

Left to do: We have a draft PR in docker images where we can include necessary libraries to use OIDC with superset properly ( airflow might wanna have that too, to be discussed ).

@lfrancke
Copy link
Member

Thank you. In that case: Can you please add a short sentence as it could appear in the release notes as a comment here?

@Maleware
Copy link
Contributor Author

Maleware commented Sep 13, 2024

Sure

Release Notes:
Apache Superset: Allow custom arbitrary python code in superset_config.py

@lfrancke lfrancke added release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/24.11.0 release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants