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

refactor(airflow): Remove bootstrap_project #599

Merged
merged 8 commits into from
Mar 21, 2024
Merged

Conversation

ankatiyar
Copy link
Contributor

@ankatiyar ankatiyar commented Mar 7, 2024

Description

Following the discussion wrt kedro-org/kedro#3683

Development notes

  • Remove bootstrap_project and get project_path from metadata
  • Update tests

Checklist

  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the relevant RELEASE.md file
  • Added tests to cover my changes

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
@ankatiyar ankatiyar requested a review from noklam March 7, 2024 11:43
Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
@ankatiyar ankatiyar marked this pull request as ready for review March 11, 2024 16:45
@ankatiyar ankatiyar requested a review from merelcht March 11, 2024 16:45
@ankatiyar ankatiyar changed the title fix(airflow): Remove bootstrap_project refactor(airflow): Remove bootstrap_project Mar 12, 2024
Comment on lines +98 to +99
type=click.Path(writable=True, resolve_path=False, file_okay=False),
default="airflow_dags/",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this change is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The target path shouldn't be resolved relative to the current directory at this point because it needs to be joined with the metadata.project_path later on.

Copy link
Contributor

@noklam noklam left a comment

Choose a reason for hiding this comment

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

looks good!

ankatiyar and others added 2 commits March 21, 2024 09:32
Signed-off-by: Ankita Katiyar <110245118+ankatiyar@users.noreply.github.com>
Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
Copy link
Member

@merelcht merelcht left a comment

Choose a reason for hiding this comment

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

LGTM, but left one question.

Comment on lines +101 to +103
project_path = kedro_project.resolve()
metadata = bootstrap_project(project_path)
return metadata
Copy link
Member

Choose a reason for hiding this comment

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

Is this now necessary for the test setup because we don't call bootstrap_project in the actual flow anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, since we don't do it in the plugin code, it's necessary for the unit tests to run.

@ankatiyar ankatiyar merged commit 9acc3a5 into main Mar 21, 2024
17 checks passed
@ankatiyar ankatiyar deleted the airflow-remove-bootstrap branch March 21, 2024 11:23
tgoelles pushed a commit to tgoelles/kedro-plugins that referenced this pull request Jun 6, 2024
* Remove bootstrap_project

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>

* Refactor

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>

* Fix tests

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>

* Print for debugging

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>

* add resolve

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>

* Update tests

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>

---------

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
Signed-off-by: Ankita Katiyar <110245118+ankatiyar@users.noreply.github.com>
Signed-off-by: tgoelles <thomas.goelles@gmail.com>
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