astronomer / astronomer-airflow-version-check

Plugin to check if new version of Astronomer Certified Airflow is available
Apache License 2.0
1 stars 2 forks source link

Add warnings around current versions EOL date #72

Open sunank200 opened 2 weeks ago

sunank200 commented 2 weeks ago

Add a warning to the Airflow UI for the following scenarios:

This pull request provides options to dismiss the end-of-life (EOL) warnings for a configurable number of days (by default, it's set to 7 days). It also provides an option to completely disable the EOL warning with an environment variable.

Configuration

The following environment variables can be set to configure the behaviour of the Astronomer update checks and EOL warnings:

Example Usage

To set these environment variables, you can add the following lines to your environment configuration:

export AIRFLOW__ASTRONOMER__EOL_WARNING_OPT_OUT="False"
export AIRFLOW__ASTRONOMER__EOL_DISMISSAL_PERIOD_DAYS=7
export AIRFLOW__ASTRONOMER__EOL_WARNING_THRESHOLD_DAYS=30

Additionally, as part of this pull request, I have included a migration step for the database in plugins.py.

I tested the airflow deployment by manually adjusting the EOL in the database:

Screenshot 2024-06-20 at 3 54 13 PM Screenshot 2024-06-20 at 3 54 54 PM Screenshot 2024-06-20 at 3 55 10 PM

closes: #63

jedcunningham commented 1 week ago

Hmm, I wonder if we need to be more defensive. What happens if we go from this version with EOL stuff to a version without it? Probably fine? But we need to test that since we can't block that downgrade.

cmarteepants commented 1 week ago

Hmm, I wonder if we need to be more defensive. What happens if we go from this version with EOL stuff to a version without it? Probably fine? But we need to test that since we can't block that downgrade.

Yes rollbacks makes that a possibility.

vatsrahul1001 commented 13 hours ago

@sunank200 I am getting the below error when I am trying this on Astro cloud

image
sunank200 commented 12 hours ago

@sunank200 I am getting the below error when I am trying this on Astro cloud image

@vatsrahul1001 can you try once with new wheel file as I had changed code last night. Did you try it on local? It works for me locally. I will try on astro cloud today.

vatsrahul1001 commented 12 hours ago

@sunank200 same behaviour with new wheel file. This is the deployment link

sunank200 commented 4 hours ago

Use alter command of SQLalchemy for adding columns

@vatsrahul1001 can you test now? It should be fixed. I am able to run on Astro cloud here