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

AIRFLOW-3014 Increase possible length of passwords in connection table #3851

Closed

Conversation

bravefoot
Copy link

Make sure you have checked all steps below.

Jira

  • My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

Description

  • [X ] Here are some details about my PR, including screenshots of any UI changes:
    Adds a migration script to increase the size of the password column in the connection table

Tests

  • [X ] My PR adds the following unit tests OR does not need testing for this extremely good reason:
    I did not see unit tests around migration scripts. If I was mistaken, I'd be happy to add a test.

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

  • Passes git diff upstream/master -u -- "*.py" | flake8 --diff

@bravefoot
Copy link
Author

Sqlite does not allow the modification of columns, so the build for them will fail. Is there a common workaround for this?

@ashb
Copy link
Member

ashb commented Sep 6, 2018

It looks like SQLite doesn't actually enforce the max length on the columns:

sqlite> insert into connection (password) values('aaaaaaaaaaaaaaaaaaaaaaaaa...a');
sqlite> select id, length(password) from connection;
1|1
2|1900

So maybe the fix is to simply not run this migration on sqlite engines? I'm some what surprised that the tests we added in #3516 didn't catch this (as the model already has the length set at 5000 but we were missing a migration to change it. (Which is nothing to do with this PR).

@stale
Copy link

stale bot commented Dec 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Dec 10, 2018
@stale stale bot closed this Dec 18, 2018
@jomv1
Copy link

jomv1 commented Apr 2, 2019

I'm facing same problem. This PR could have solve it.
Shouldn't it be easy to skip the migration from the SQLITE and merge this?

@ashb
Copy link
Member

ashb commented Apr 3, 2019

@jomv1 A PR would be welcome if this is still a problem on latest versions of Airflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale PRs per the .github/workflows/stale.yml policy file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants