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

Unexpected GraphQL Error for Schedules #11794

Closed
jerome-laurent-pro opened this issue Jan 19, 2023 · 1 comment
Closed

Unexpected GraphQL Error for Schedules #11794

jerome-laurent-pro opened this issue Jan 19, 2023 · 1 comment
Assignees

Comments

@jerome-laurent-pro
Copy link

Dagster version

1.1.10

What's the issue?

Unexpected GraphQL Error when opening the Schedule screen or any asset on Dagit.

Operation name: LatestRunTagQuery

Message: Invalid version: '5.7.38-log'

Path: ["pipelineRunsOrError","results"]

Locations: [{"line":4,"column":7}]

What did you expect to happen?

Schedules and assets are displayed correctly.
The schedules work.

Additional information

This involves the use of MySQL storage to persist the metadata.
For the local dev, I added a MySQL container to my docker-compose, and everything was running smoothly.

  db:
    profiles: [ "local" ]
    image: mysql:5.7
    container_name: dagster_mysql
    hostname: ${MYSQL_HOSTNAME}
    restart: always
    env_file:
      - .env
    environment:
      - MYSQL_DATABASE=${MYSQL_DATABASE}
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - MYSQL_USER=${MYSQL_USERNAME}
      - MYSQL_PASSWORD=${MYSQL_PASSWORD}

But for deployment, I used the MySQL instance of my company on AWS RDS.
It's working (the metadata is persisted in the MySQL database created for the occasion) BUT there is this specific error appearing on any asset page or on the schedule page. And the schedules don't work.

The MySQL version of the RDS is 5.7.38 so I don't know where the log (in 5.7.38-log) is coming from.

How to reproduce?

I tried to reproduce it locally but failed.

@prha prha self-assigned this Jan 26, 2023
prha added a commit that referenced this issue Jan 27, 2023
### Summary & Motivation
We were using `packaging.parse` to compare mysql server versions, which
broke when `0.23.0` was released with dropped support for
`LegacyVersion`.

This rolls our own custom version compares to find minimum supported
versions, which is tolerant of non semver compliant version strings.

The regex parses all the numeric values, and does tuple int comparisons.

Reported in #11794

Reference links:
pypa/packaging#407

### How I Tested These Changes
Added some test cases that override the server version string to
exercise the parsing logic.
gibsondan pushed a commit that referenced this issue Jan 27, 2023
### Summary & Motivation
We were using `packaging.parse` to compare mysql server versions, which
broke when `0.23.0` was released with dropped support for
`LegacyVersion`.

This rolls our own custom version compares to find minimum supported
versions, which is tolerant of non semver compliant version strings.

The regex parses all the numeric values, and does tuple int comparisons.

Reported in #11794

Reference links:
pypa/packaging#407

### How I Tested These Changes
Added some test cases that override the server version string to
exercise the parsing logic.
@prha
Copy link
Member

prha commented Jan 27, 2023

This should be resolved now with dagster release 1.1.14. Feel free to open a new issue if you still see this.

If upgrading is not an option, you could also pin packaging<22.0

@prha prha closed this as completed Jan 27, 2023
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

No branches or pull requests

2 participants