Skip to content

Commit

Permalink
Merge pull request 'Upgrade to Consul 1.5.0' (#20) from upgrade_to_1.…
Browse files Browse the repository at this point in the history
  • Loading branch information
javierm committed Mar 16, 2023
2 parents e80ae88 + f41ac12 commit b19422c
Show file tree
Hide file tree
Showing 1,054 changed files with 9,157 additions and 7,036 deletions.
36 changes: 36 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Version control
.git
.gitignore

# Confidential information
config/database.yml
config/secrets.yml
config/deploy-secrets.yml
config/maintenance.yml

# Logfiles and tempfiles.
**/log/*
!**/log/.keep
**/tmp/

# Files attached by users
public/system/
public/ckeditor_assets/
storage/

# Files generated by scripts or compiled
public/sitemap.xml
public/assets/
public/machine_learning/data/

# Bundler config, cache and gemsets
**/.bundle/
**/.ruby-gemset

# Files used in local development
**/.byebug_history
**/.DS_Store

# Test results
spec/examples.txt
coverage/
16 changes: 16 additions & 0 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Assignment management

on:
pull_request_target:
types: [opened, reopened]

permissions:
pull-requests: write

jobs:
assign-author:
name: Auto-assign pull request author
if: github.repository_owner == 'consul'
runs-on: ubuntu-latest
steps:
- uses: toshimaru/[email protected]
26 changes: 26 additions & 0 deletions .github/workflows/kanban.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Kanban management
on:
pull_request_target:
types: [opened, reopened]
env:
MY_GITHUB_TOKEN: ${{ secrets.KANBAN_TOKEN }}

jobs:
assign_one_project:
name: Add new pull requests to the kanban
if: github.repository_owner == 'consul'
runs-on: ubuntu-latest
steps:
- name: Assign new pull requests to the reviewing column
uses: srggrs/[email protected]
if: github.event.pull_request.draft == false
with:
project: "https://github.com/orgs/consul/projects/1"
column_name: "Reviewing"

- name: Assign new draft pull requests to the doing column
uses: srggrs/[email protected]
if: github.event.pull_request.draft == true
with:
project: "https://github.com/orgs/consul/projects/1"
column_name: "Doing"
49 changes: 22 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,35 @@
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal

# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/tmp

/spec/examples.txt
# Confidential information
/config/database.yml
/config/secrets.yml
/config/deploy-secrets.yml
/config/maintenance.yml

/coverage
# Logfiles and tempfiles.
log/*
!log/.keep
tmp/

/config/beta-testers.txt
.byebug_history

# Mac finder artifacts
.DS_Store
# Files attached by users
/public/system/
/public/ckeditor_assets/
/storage/

# Intellij IDE project settings
/.idea
# Files generated by scripts or compiled
/public/sitemap.xml
/public/assets/
/public/machine_learning/data/

# Bundler config, cache and gemsets
.bundle/
.ruby-gemset

public/sitemap.xml
public/assets/
public/machine_learning/data/
public/system/
/public/ckeditor_assets/
storage/
# Files used in local development
.byebug_history
.DS_Store

# Test results
/spec/examples.txt
/coverage/
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ stages:
- lint

tests:
image: "ruby:2.7.4"
image: "ruby:2.7.6"
stage: test
services:
- postgres:10.10
Expand Down Expand Up @@ -34,7 +34,7 @@ tests:
# PRONTO_GITLAB_API_PRIVATE_TOKEN to your repository CI/CD settings
# giving it the value of the Personal Access Token
linters:
image: "ruby:2.7.4"
image: "ruby:2.7.6"
stage: lint
cache:
key: consul
Expand Down
4 changes: 2 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ Rails/HttpStatus:

Rails/I18nLocaleAssignment:
Enabled: true
Exclude:
- "spec/spec_helper.rb"
Include:
- "**/*.rb"

Rails/InverseOf:
Enabled: true
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.4
2.7.6
94 changes: 94 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,100 @@

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [1.5.0](https://github.com/consul/consul/tree/1.5.0) (2022-07-11)

[Full Changelog](https://github.com/consul/consul/compare/1.4.1...1.5.0)

### Added

- **Budgets:** Add hide money option for approval budgets [\#4601](https://github.com/consul/consul/pull/4601)
- **Moderation:** Allow hiding users without hiding their content [\#4214](https://github.com/consul/consul/pull/4214)
- **Newsletter:** Include link to unsubscribe in email notifications [\#4301](https://github.com/consul/consul/pull/4301)
- **Newsletter:** Add geozones as user segments [\#2859](https://github.com/consul/consul/pull/2859)
- **SDG:** Add cs icon of SDGs [\#4782](https://github.com/consul/consul/pull/4782)
- **Translations:** Update translations from Crowdin [\#4851](https://github.com/consul/consul/pull/4851) and [\#4866](https://github.com/consul/consul/pull/4866)

### Changed

- **Accessibility:** Make buttons to vote more accessible [\#4776](https://github.com/consul/consul/pull/4776)
- **Accessibility:** Make "participation not allowed" message accessible [\#4763](https://github.com/consul/consul/pull/4763) and [\#4764](https://github.com/consul/consul/pull/4764)
- **Admin:** Add and improve hint information related to phases duration [\#4806](https://github.com/consul/consul/pull/4806)
- **Authentication:** Send informative email for already confirmed users [\#4228](https://github.com/consul/consul/pull/4228)
- **Documentation:** Add development instructions regarding i18n translations [\#4816](https://github.com/consul/consul/pull/4816)
- **GraphQL:** Add new GraphQL types & schema [\#4766](https://github.com/consul/consul/pull/4766) and [\#4841](https://github.com/consul/consul/pull/4841)
- **Maintenance:** Assign pull request author automatically [\#4870](https://github.com/consul/consul/pull/4870)
- **Maintenance:** Add kanban automation for new pull requests [\#4853](https://github.com/consul/consul/pull/4853) and [\#4868](https://github.com/consul/consul/pull/4868)
- **Maintenance:** Describe enabled processes in the consul.json URL [\#4845](https://github.com/consul/consul/pull/4845)
- **Maintenance:** Allow removing investment supports by default [\#4844](https://github.com/consul/consul/pull/4844)
- **Maintenance:** System emails design [\#4818](https://github.com/consul/consul/pull/4818)
- **Maintenance:** Make it easier to customize allowed parameters [\#4804](https://github.com/consul/consul/pull/4804)
- **Maintenance:** Make it easier to customize validations [\#4790](https://github.com/consul/consul/pull/4790), [\#4792](https://github.com/consul/consul/pull/4792)
- **Maintenance:** Add Rails 6.0 compatibility [\#4789](https://github.com/consul/consul/pull/4789)
- **Maintenance:** Make it easier to customize JavaScript functions [\#4788](https://github.com/consul/consul/pull/4788)
- **Maintenance:** Make it easier to customize model constants [\#4787](https://github.com/consul/consul/pull/4787)
- **Maintenance-Deployment:** Upgrade Ruby to version 2.7.6 [\#4842](https://github.com/consul/consul/pull/4842)
- **Maintenance-Docker:** Add dockerignore file [\#4765](https://github.com/consul/consul/pull/4765) and [\#4798](https://github.com/consul/consul/pull/4798)
- **Maintenance-Gems:** \[Security\] Bump rails-html-sanitizer from 1.3.0 to 1.4.3 [\#4867](https://github.com/consul/consul/pull/4867)
- **Maintenance-Gems:** Bump rack from 2.2.3 to 2.2.3.1 [\#4838](https://github.com/consul/consul/pull/4838)
- **Maintenance-Gems:** Bump rails from 5.2.6 to 5.2.7.1 [\#4784](https://github.com/consul/consul/pull/4784) and [\#4824](https://github.com/consul/consul/pull/4824)
- **Maintenance-Gems:** Bump view_component from 2.37.0 to 2.49.1 [\#4783](https://github.com/consul/consul/pull/4783)
- **Maintenance-Gems:** Bump nokogiri from 1.12.5 to 1.13.3 [\#4781](https://github.com/consul/consul/pull/4781), [\#4808](https://github.com/consul/consul/pull/4808) and [\#4832](https://github.com/consul/consul/pull/4832)
- **Maintenance-Gems:** Bump puma from 4.3.10 to 4.3.12 [\#4777](https://github.com/consul/consul/pull/4777) and [\#4799](https://github.com/consul/consul/pull/4799)
- **Maintenance-Gems:** Bump graphql from 1.11.5 to 1.12.14 [\#4632](https://github.com/consul/consul/pull/4632)
- **Maintenance-Gems:** Bump sprockets from 3.7.2 to 4.0.2 [\#4609](https://github.com/consul/consul/pull/4609) and [\#4826](https://github.com/consul/consul/pull/4826)
- **Maintenance-Refactoring:** Remove and simplify API and votes-related code [\#4807](https://github.com/consul/consul/pull/4807)
- **Maintenance-Refactoring:** Remove URL methods in models [\#4757](https://github.com/consul/consul/pull/4757)
- **Maintenance-Rubocop:** Enable the Rails/I18nLocaleAssignment cop to scan all the application ruby files [\#4696](https://github.com/consul/consul/pull/4696)
- **Maintenance-Specs:** Reduce conflicting queries/requests in system tests [\#4849](https://github.com/consul/consul/pull/4849)
- **Maintenance-Specs:** Implement or remove pending tests [\#4803](https://github.com/consul/consul/pull/4803)
- **Maintenance-Specs:** Allow to customize tests common action modules [\#4801](https://github.com/consul/consul/pull/4801)
- **Maintenance-Specs:** Make it easier to maintain the test suite in forks [\#4755](https://github.com/consul/consul/pull/4755)
- **UX:** Make management and admin headers consistent [\#4734](https://github.com/consul/consul/pull/4734)
- **UX:** Use telephone fields in phone number form controls [\#4643](https://github.com/consul/consul/pull/4643)
- **UX:** Make confirm alerts show the triggering action [\#4543](https://github.com/consul/consul/pull/4543)
- **Verification:** Redefine postal code verification methods to use setting config parameter [\#2125](https://github.com/consul/consul/pull/2125)

### Fixed

- **Admin:** Fix link to comments on admin view for debates [\#4857](https://github.com/consul/consul/pull/4857)
- **Admin:** Fix bug when creating admin tags [\#4837](https://github.com/consul/consul/pull/4837)
- **Admin:** Fix crash deleting admin with assigned budgets [\#4823](https://github.com/consul/consul/pull/4823)
- **Admin:** Remove roles when block or delete users [\#4809](https://github.com/consul/consul/pull/4809)
- **Budgets:** Fix background image from Participatory Budgets page [\#4814](https://github.com/consul/consul/pull/4814) and [\#4825](https://github.com/consul/consul/pull/4825)
- **Budgets:** Show budgets map only if feature is enabled [\#4810](https://github.com/consul/consul/pull/4810)
- **Budgets:** Show assigned heading on investment show [\#4769](https://github.com/consul/consul/pull/4769)
- **Customization:** Add census terms page by default [\#4821](https://github.com/consul/consul/pull/4821)
- **Dashboard:** Fix generating dashboard poster on production [\#4767](https://github.com/consul/consul/pull/4767)
- **Legislation:** Remove legacy annotations route [\#4847](https://github.com/consul/consul/pull/4847)
- **Legislation:** Fix comment notifications on legislation proposals [\#4750](https://github.com/consul/consul/pull/4750)
- **Maintenance:** Include machine learning settings type [\#4827](https://github.com/consul/consul/pull/4827)
- **Maintenance:** Remove redundant permissions to edit/create records [\#4762](https://github.com/consul/consul/pull/4762)
- **Maintenance:** Fix invalid HTML in application layout [\#4753](https://github.com/consul/consul/pull/4753)
- **Maintenance-CSS:** Remove unused CSS containing a typo [\#4846](https://github.com/consul/consul/pull/4846)
- **Maintenance-Rubocop:** Fix Rubocop convention offenses [\#4858](https://github.com/consul/consul/pull/4858)
- **Maintenance-Specs:** Disable JavaScript in notification digest spec [\#4856](https://github.com/consul/consul/pull/4856)
- **Polls:** Add offline ballot sheet votes to the total vote count [\#4775](https://github.com/consul/consul/pull/4775)
- **Registration:** Fix Registration Without E-Mail [\#4811](https://github.com/consul/consul/pull/4811)
- **Security:** Fix HTML injection in search results summary [\#4805](https://github.com/consul/consul/pull/4805)
- **Social-Share:** Fix typo for "instagram" [\#4773](https://github.com/consul/consul/pull/4773)
- **Translations:** Fix typos in the English version [\#4802](https://github.com/consul/consul/pull/4802)
- **Translations:** Fix crash on attributes with interpolation arguments [\#4791](https://github.com/consul/consul/pull/4791)
- **Translations:** Fix translations interpolations errors [\#4756](https://github.com/consul/consul/pull/4756)
- **Translations:** Make dev seeds independent on available locales [\#4733](https://github.com/consul/consul/pull/4733)
- **UX:** Disable Turbolinks for languages with different text direction [\#4850](https://github.com/consul/consul/pull/4850)
- **UX:** Add notice after destroying a banner [\#4848](https://github.com/consul/consul/pull/4848)
- **UX:** Fix banner link on Chromium 101 [\#4822](https://github.com/consul/consul/pull/4822)
- **UX:** Remove unnecessary alert on legislation processes [\#4820](https://github.com/consul/consul/pull/4820)
- **UX:** Fix Confirmation Token to only work once [\#4815](https://github.com/consul/consul/pull/4815)
- **UX:** Fix checkbox label styles [\#4800](https://github.com/consul/consul/pull/4800)
- **UX:** Remove broken technical assistance text in footer [\#4752](https://github.com/consul/consul/pull/4752)

### Removed

- **Maintenance:** Remove legacy code from Madrid's fork [\#4754](https://github.com/consul/consul/pull/4754)
- **Maintenance-Gems:** Remove newrelic and rollbar gem dependencies [\#4645](https://github.com/consul/consul/pull/4645)
- **Maintenance-Gems:** Remove Paperclip and use just Active Storage [\#4600](https://github.com/consul/consul/pull/4600)

## [1.4.1](https://github.com/consul/consul/tree/1.4.1) (2021-11-25)

[Full Changelog](https://github.com/consul/consul/compare/1.4.0...1.4.1)
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ If you'd like us to review your pull request in good spirits, please follow our
* Our CI will check whether the rest of the application is still working properly; check its build and make sure all tests are passing
* Run `bundle exec pronto run` and fix any issues it reports; these issues will also be automatically reported on the pull request
* Follow [the seven rules of a great commit message](https://chris.beams.io/posts/git-commit/)
* Add or modify i18n translations only in the base languages, English (en) and Spanish (es); we manage all other languages through the [Crowdin integration](https://crowdin.com/project/consul).

When we review your pull request and ask for changes, if you're proficient using `git rebase` edit existing commits instead of adding new ones. If you aren't proficient with `git rebase`, ignore this point.

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING_ES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Si quieres que revisemos tu código con una sonrisa, por favor sigue nuestras co
* Los tests se ejecutarán automáticamente para comprobar que el resto de la aplicación sigue funcionando; asegúrate de que los tests pasan
* Ejecuta `bundle exec pronto run` y arregla los problemas de los que informe (si es que hay alguno)
* Sigue [las siete reglas para un gran mensaje de commit](https://chris.beams.io/posts/git-commit/)
* Añade o modifica las traducciones i18n sólo en los idiomas base, inglés (en) y español (es); todos los demás idiomas los gestionamos a través de la [integración de Crowdin](https://crowdin.com/project/consul).

Cuando revisemos tu código y te pidamos que cambies alguna cosa, si tienes experiencia con `git rebase` edita los commits existentes en vez de añadir más. Si no tienes experiencia con `git rebase`, puedes saltarte este punto.

Expand Down
44 changes: 25 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
FROM ruby:2.7.4-buster
FROM ruby:2.7.6-buster

ENV DEBIAN_FRONTEND noninteractive

# Install essential Linux packages
RUN apt-get update -qq
RUN apt-get install -y build-essential libpq-dev postgresql-client nodejs imagemagick sudo libxss1 libappindicator1 libindicator7 unzip memcached cmake pkg-config shared-mime-info
RUN apt-get update -qq \
&& apt-get install -y \
build-essential \
cmake \
imagemagick \
libappindicator1 \
libindicator7 \
libpq-dev \
libxss1 \
memcached \
nodejs \
pkg-config \
postgresql-client \
shared-mime-info \
sudo \
unzip

# Install Chromium for E2E integration tests
RUN apt-get update -qq && apt-get install -y chromium

# Files created inside the container repect the ownership
RUN adduser --shell /bin/bash --disabled-password --gecos "" consul \
&& adduser consul sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
&& adduser consul sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

RUN echo 'Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bundle/bin"' > /etc/sudoers.d/secure_path
RUN chmod 0440 /etc/sudoers.d/secure_path

COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh

# Define where our application will live inside the image
ENV RAILS_ROOT /var/www/consul

Expand All @@ -27,22 +42,13 @@ WORKDIR $RAILS_ROOT

# Use the Gemfiles as Docker cache markers. Always bundle before copying app src.
# (the src likely changed and we don't want to invalidate Docker's cache too early)
# http://ilikestuffblog.com/2014/01/06/how-to-skip-bundle-install-when-deploying-a-rails-app-to-docker/
COPY Gemfile Gemfile

COPY Gemfile.lock Gemfile.lock

COPY Gemfile_custom Gemfile_custom

# Finish establishing our Ruby environment
RUN bundle install --full-index

# Install Chromium for E2E integration tests
RUN apt-get update -qq && apt-get install -y chromium
COPY Gemfile* ./
RUN bundle install

# Copy the Rails application into place
COPY . .

ENTRYPOINT ["./docker-entrypoint.sh"]
# Define the script we want run once the container boots
# Use the "exec" form of CMD so our script shuts down gracefully on SIGTERM (i.e. `docker stop`)
# CMD [ "config/containers/app_cmd.sh" ]
Expand Down
Loading

0 comments on commit b19422c

Please sign in to comment.