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

fix(tox): Address issue with generative environment variables #29368

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

john-bodley
Copy link
Member

SUMMARY

The way the SQLite environment variables were specified were incorrect meaning that the SUPERSET__SQLALCHEMY_DATABASE_URI and SUPERSET__SQLALCHEMY_EXAMPLES_URI environment variables never adhered to the specified environment.

TESTING INSTRUCTIONS

BEFORE

$ tox -e py310-mysql --showconfig | grep SUPERSET__SQLALCHEMY
  SUPERSET__SQLALCHEMY_DATABASE_URI=sqlite:///<redacted>/superset/.tox/py310-mysql/tmp/superset.db
  SUPERSET__SQLALCHEMY_EXAMPLES_URI=sqlite:///<redacted>/superset/.tox/py310-mysql/tmp/examples.db
$ tox -e py310-sqlite --showconfig | grep SUPERSET__SQLALCHEMY
  SUPERSET__SQLALCHEMY_DATABASE_URI=sqlite:///<redacted>/superset/.tox/py310-sqlite/tmp/superset.db
  SUPERSET__SQLALCHEMY_EXAMPLES_URI=sqlite:///<redacted>/superset/.tox/py310-sqlite/tmp/examples.db

AFTER

$ tox -e py310-mysql --showconfig | grep SUPERSET__SQLALCHEMY
  SUPERSET__SQLALCHEMY_DATABASE_URI=mysql://mysqluser:mysqluserpassword@localhost/superset?charset=utf8
$ tox -e py310-sqlite --showconfig | grep SUPERSET__SQLALCHEMY
  SUPERSET__SQLALCHEMY_DATABASE_URI=sqlite:///<redacted>/superset/.tox/py310-sqlite/tmp/superset.db
  SUPERSET__SQLALCHEMY_EXAMPLES_URI=sqlite:///<redacted>/superset/.tox/py310-sqlite/tmp/examples.db

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@john-bodley john-bodley marked this pull request as ready for review June 25, 2024 21:04
@dosubot dosubot bot added the install:config Installation - Configuration settings label Jun 25, 2024
Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

LGTM

@mistercrunch
Copy link
Member

Hey @john-bodley taking a side-topic here, but wondering what you think of tox as part of our devex stack. I noticed it isn't used for CI anymore in favor of GHA, but has the merit to run locally - though personally I have issue running the test suites using it when I tried.

Wondering if we'd consider either dropping support for it or whether we should be using it in CI for consistency (?)

@john-bodley
Copy link
Member Author

@mistercrunch it seems like act would be the way to go. Consistency is key.

The fragmentation between local and remote CI is not great. Personally I’ve wasted numerous hours/days due to inconsistencies when trying to test locally versus remote.

@john-bodley john-bodley merged commit 53450b7 into apache:master Jun 26, 2024
58 of 60 checks passed
@john-bodley john-bodley deleted the john-bodley--fix-tox branch June 26, 2024 19:01
@mistercrunch
Copy link
Member

Totally agreed, I love the idea of moving to act and removing tox. I'll see if I can make it work easily out of the box today. If so it'd be a matter of:

  • wiping tox and everything tox-related
  • documenting how to use act

Hoping it works out of the box. I'll open a DRAFT PR to track progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install:config Installation - Configuration settings size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants