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

modernization #8

Open
wants to merge 2 commits into
base: airflow-v2
Choose a base branch
from

Conversation

cloneluke
Copy link

upgrading to airflow 2.2.2-python3.8 package
adding more apt packages for ease of use
upgrade pip inline
install aws cli for ease of use
remove use of non-maintained pygresql in favor of more common/more maintained psycopg2
changed airflow entries to match airflow 2.x new syntax
upgraded to cdk v2
upgraded all imports to the new cdk v2 structure
upgraded rds to T3 instance class from T2
upgrading postgres rds engine to VER_13_4
upgraded typescript to 4.0.5
changing version naming standard to match airflow version + python version
loosened strict typscript compiler to allow for dynamic variables
fixed some deprecated cdk calls/references
added ssh into fargate option

Luke Bodeen added 2 commits September 29, 2021 13:26
adding more apt packages for ease of use
upgrade pip inline
install aws cli for ease of use
remove use of non-maintained pygresql in favor of more common/more maintained psycopg2
changed airflow entries to match airflow 2.x new syntax
upgraded to cdk v2
upgraded all imports to the new cdk v2 structure
upgraded rds to T3 instance class from T2
upgraded typescript to 4.0.5
changing version naming standard to match airflow version + python version
loosened strict typscript compiler to allow for dynamic variables
fixed some deprecated cdk calls/references
added ssh into fargate option
@cloneluke
Copy link
Author

@cloneluke
Copy link
Author

@toricls

@toricls
Copy link

toricls commented Dec 11, 2021

Hi @cloneluke, thank you for your contribution! Introducing Airflow v2.x is a really exciting idea I think!

To get this PR merged, I think we need some decisions from the authors (@realvz and @thechaithanya) because this repository is, AFAIK, deeply tied to our blog post here - "Running Airflow on AWS Fargate | Containers". So just introducing Airflow v2 here could break the relations between this repo and the blog post.

So one idea in my mind is:

  • Having the changes in a new branch called like airflow-v2, not mainline
  • Adding a note on mainline README like If you want to try this repo with Airflow v2, use this branch for example, and vice versa in airflow-v2 branch README

But again we still need some decisions (and also some tests) by the authors.

@realvz and @thechaithanya,

Could you give us your thoughts on this PR and my idea above? Of course different ideas are also very welcomed if you have ‪any 🤗‬

@thechaithanya
Copy link
Contributor

Hi @toricls,
I agree with the different branch approach and that's what exactly on my mind.

I'll post my comments on the CR changes later.
On a side note, I don't have write permissions on this repo/package.

@toricls
Copy link

toricls commented Dec 11, 2021

Great, thanks @thechaithanya!

I just added you as a collaborator in this repo (this is wired in the first place from my view because you're one of the original author 😉), so let me know if the permissions are not enough or anything else!

@toricls toricls changed the base branch from mainline to airflow-v2 December 11, 2021 01:19
@thechaithanya
Copy link
Contributor

Great, thanks @thechaithanya!

I just added you as a collaborator in this repo (this is wired in the first place from my view because you're one of the original author 😉), so let me know if the permissions are not enough or anything else!

Thanks. I haven't configured 2FA earlier. So, my permissions were revoked!!

Copy link
Contributor

@thechaithanya thechaithanya left a comment

Choose a reason for hiding this comment

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

Please add testing details

@@ -94,6 +95,6 @@ export class RDSConstruct extends Construct {
endpoint: string,
password: string
): string {
return `postgresql+pygresql://${dbConfig.masterUsername}:${password}@${endpoint}:${dbConfig.port}/${dbConfig.dbName}`;
return `postgresql+psycopg2://${dbConfig.masterUsername}:${password}@${endpoint}:${dbConfig.port}/${dbConfig.dbName}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the motive behind this change? Are there any added benefits, as this is used only for metadata?

Copy link
Author

Choose a reason for hiding this comment

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

psycopg is much more active open source project than pygresql https://github.com/psycopg https://github.com/PyGreSQL so that is why the change was made

Comment on lines +12 to +23
python3-setuptools \
libpq-dev \
gcc \
build-essential \
g++ \
git-all \
unixodbc-dev \
apt-utils \
apt-transport-https \
debconf-utils \
vim \
telnet
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of bundling in too many packages, consider moving them to optional requirements.txt, which user can fill in.
If needed, update ReadMe with details

Choose a reason for hiding this comment

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

Isn't requirements.txt a Python thing?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. And all these packages are being installed using pip.
I should have included Line #11. It looks like this..

RUN python3 -m pip install PyGreSQL argcomplete pycurl
    python3-setuptools \
    .....

@@ -1,9 +1,12 @@
import { Construct } from "@aws-cdk/core";
//import { Construct } from "aws-cdk-lib/core";
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete commented code from this file and other files as well

@cloneluke
Copy link
Author

Hi @cloneluke, thank you for your contribution! Introducing Airflow v2.x is a really exciting idea I think!

To get this PR merged, I think we need some decisions from the authors (@realvz and @thechaithanya) because this repository is, AFAIK, deeply tied to our blog post here - "Running Airflow on AWS Fargate | Containers". So just introducing Airflow v2 here could break the relations between this repo and the blog post.

So one idea in my mind is:

  • Having the changes in a new branch called like airflow-v2, not mainline
  • Adding a note on mainline README like If you want to try this repo with Airflow v2, use this branch for example, and vice versa in airflow-v2 branch README

But again we still need some decisions (and also some tests) by the authors.

@realvz and @thechaithanya,

Could you give us your thoughts on this PR and my idea above? Of course different ideas are also very welcomed if you have ‪any 🤗‬

Also maybe we should use tagging instead of branching for airflow major releases?

@feliperandopiercloud
Copy link

Will this PR be merged?

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.

5 participants