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

setup: fix old pipenv environment variables #992

Merged
merged 1 commit into from
May 15, 2020

Conversation

blankoworld
Copy link
Contributor

@blankoworld blankoworld commented May 14, 2020

Recently RERO-ils changed pipenv to poetry. The setup used a specific
option -w that reduced displayed messages.

It uses FLASK_SKIP_DOTENV for that. But this variable is problematic
with the new poetry system as it skip .env files (used for
development, production, etc.).

This commit removes this old variable and fix a bootstrap problem too.

  • Deletes FLASK_SKIP_DOTENV variable
  • Fixes Travis test while bootstraping

Co-Authored-by: Olivier DOSSMANN [email protected]

Why are you opening this PR?

While launching poetry run setup -P -w, the setup didn't find the .env file in which I add specific customization (for example for RERO_ILS_CSS or specific REDIS ports).

This comes from FLASK_SKIP_DOTENV used previously with pipenv. This is not needed anymore!

How to test?

  • create a .env with INVENIO_INSTANCE_PATH=../var/ils
  • In ../var/ils/invenio.cfg change a specific variable, for example CACHE_REDIS_URL="redis://0.0.0.0:8888/0"
  • Change docker-services.yml to change REDIS port: - 8888:6379
  • Relaunch dockers: docker-compose down && docker-compose up -d && ./docker/wait-for-services.sh
  • Launch poetry run setup -P -w

It should start.

To be sure, you can test the same thing on dev branch.

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

Recently RERO-ils changed pipenv to poetry. The setup used a specific
option `-w` that reduced displayed messages.

It uses FLASK_SKIP_DOTENV for that. But this variable is problematic
with the new poetry system as it skip `.env` files (used for
development, production, etc.).

This commit removes this old variable and fix a bootstrap problem too.

* Deletes FLASK_SKIP_DOTENV variable
* Fixes Travis test while bootstraping

Co-Authored-by: Olivier DOSSMANN <[email protected]>
@blankoworld blankoworld marked this pull request as ready for review May 14, 2020 16:51
@blankoworld blankoworld requested review from jma, rerowep and lauren-d May 14, 2020 16:51
@iGormilhit iGormilhit self-requested a review May 15, 2020 06:30
Copy link

@iGormilhit iGormilhit left a comment

Choose a reason for hiding this comment

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

Commit message approved.

@blankoworld blankoworld merged commit b75bc30 into rero:dev May 15, 2020
@blankoworld blankoworld deleted the doo-fix-skip-dotenv branch May 19, 2020 07:00
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.

4 participants