Skip to content

Fix doorkeeper initialization after 5.6.0 release#9785

Merged
andreslucena merged 1 commit intodecidim:developfrom
mainio:fix/doorkeeper-5.6.0
Sep 12, 2022
Merged

Fix doorkeeper initialization after 5.6.0 release#9785
andreslucena merged 1 commit intodecidim:developfrom
mainio:fix/doorkeeper-5.6.0

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

🎩 What? Why?

Yesterday Doorkeeper released version 5.6.0 and Decidim generators will automatically start using that due to the loose version lock to Doorkeeper 5.x.

It included this change:
doorkeeper-gem/doorkeeper@e19466f

This causes Doorkeeper to check if it has been configured already during the initialization hook. Which then causes the exception because Doorkeeper configuration in Decidim runs after the Doorkeeper initialization has run.

This causes the generators tests to fail constantly in the CI to the following exception:

/.../.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/doorkeeper-5.6.0/lib/doorkeeper/config.rb:33:in `configuration': Configuration for doorkeeper missing. Do you have doorkeeper initializer? (Doorkeeper::MissingConfiguration)
	from /.../.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/doorkeeper-5.6.0/lib/doorkeeper/engine.rb:7:in `block in <class:Engine>'
	from /.../.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `instance_exec'
	from /.../.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `run'
	from /.../.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-6.1.6/lib/rails/initializable.rb:61:in `block in run_initializers'

Testing

See that the generators tests are green.

@ahukkanen ahukkanen added dependencies Pull requests that update a dependency file or issues that talk about updating dependencies type: internal PRs that aren't necessary to add to the CHANGELOG for implementers labels Sep 9, 2022
@ahukkanen
Copy link
Copy Markdown
Contributor Author

The generators spec is failing when it's running the generator with the --edge or --branch develop flags because it's loading the code from GitHub which does not contain this fix before it is merged.

Once this is merged, the build should be green.

Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

I've tried it locally, and it works as expected. 👍🏽

@andreslucena andreslucena merged commit fc7c129 into decidim:develop Sep 12, 2022
entantoencuanto added a commit that referenced this pull request Sep 12, 2022
* develop:
  Fix doorkeeper initialization after 5.6.0 release (#9785)
@ahukkanen ahukkanen deleted the fix/doorkeeper-5.6.0 branch September 12, 2022 08:15
entantoencuanto added a commit that referenced this pull request Sep 12, 2022
* develop:
  Fix doorkeeper initialization after 5.6.0 release (#9785)
entantoencuanto added a commit that referenced this pull request Sep 12, 2022
* develop:
  Fix doorkeeper initialization after 5.6.0 release (#9785)
  Add additional details in HTTP 500 error page message (#9762)
  Publication date field for blog articles (#9757)
  Import budgeting projects into accountability results (#9604)
  Redesign: flash messages (#9774)
entantoencuanto added a commit that referenced this pull request Sep 12, 2022
* develop:
  Fix doorkeeper initialization after 5.6.0 release (#9785)
  Add additional details in HTTP 500 error page message (#9762)
  Publication date field for blog articles (#9757)
  Import budgeting projects into accountability results (#9604)
fblupi pushed a commit to AjuntamentdeBarcelona/decidim that referenced this pull request Sep 19, 2022
eliegaboriau pushed a commit to eliegaboriau/decidim that referenced this pull request Oct 25, 2022
laurajaime pushed a commit to CodiTramuntana/decidim that referenced this pull request Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file or issues that talk about updating dependencies type: internal PRs that aren't necessary to add to the CHANGELOG for implementers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants