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

Remove dependency on Python #6053

Merged
merged 1 commit into from
Nov 3, 2021
Merged

Remove dependency on Python #6053

merged 1 commit into from
Nov 3, 2021

Conversation

gbp
Copy link
Member

@gbp gbp commented Jan 6, 2021

Instead of using yaml2sh from commonlib this commits adds a new Ruby
script at bin/config which can retrieve individual configuration
variables from config/general.yml.

To get a configuration variable run:
bin/config SITE_NAME

This bin command doesn't initialise the Rails stack so is fast

It also doesn't use lib/configuration.rb Ruby module, although it
could if some configuration variables had defaults assigned. These are:

  1. BUNDLE_PATH
  2. SHARED_DIRECTORIES
  3. SHARED_FILES
  4. SHARED_FILES_PATH
  5. STAGING_SITE

As I understand it these haven't be given a default because they are
only used from the installation shell scripts. Which seems reasonable to
me.

@gbp
Copy link
Member Author

gbp commented Jan 6, 2021

This is not strictly needed once mysociety/commonlib#71 is merged

@gbp
Copy link
Member Author

gbp commented Jan 28, 2021

This would be a step towards #2906

Copy link
Member

@garethrees garethrees left a comment

Choose a reason for hiding this comment

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

Agree with this in principle and removing an old dependency is a nice win.

At this point I'd rather this just be bin/config SETTING so that we don't create extra deprecation issues if we do want a bin/alaveteli in the future.

@gbp gbp mentioned this pull request Oct 29, 2021
@gbp gbp changed the title Remove dependency on Python 2 Remove dependency on Python Oct 29, 2021
Instead of using yaml2sh from commonlib this commits adds a new Ruby
script at bin/config which can retrieve individual configuration
variables from config/general.yml.

To get a configuration variable run:
  bin/config SITE_NAME

This bin command doesn't initialise the Rails stack so is fast

It also *doesn't* use lib/configuration.rb Ruby module, although it
could if some configuration variables had defaults assigned. These are:
1. BUNDLE_PATH
2. SHARED_DIRECTORIES
3. SHARED_FILES
4. SHARED_FILES_PATH
5. STAGING_SITE

As I understand it these haven't be given a default because they are
only used from the installation shell scripts. Which seems reasonable to
me.
@gbp gbp requested a review from garethrees October 29, 2021 09:29
@gbp gbp marked this pull request as ready for review October 29, 2021 09:41
Copy link
Member

@garethrees garethrees left a comment

Choose a reason for hiding this comment

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

Looks great. I've only run bin/config myself – not the Alaveteli scripts. Assuming these all work okay.

script/rails-deploy-before-down Show resolved Hide resolved
@gbp
Copy link
Member Author

gbp commented Nov 3, 2021

Have double checked to confirm (through building vagrant boxes for #6615) that the install scripts are still working.

@gbp gbp merged commit aa4269a into develop Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants