Skip to content

(DEPRECATED) Bump decidim from v0.29.2 to v0.30.0.rc1 #141

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

Closed
wants to merge 3 commits into from

Conversation

andreslucena
Copy link
Member

This PR updates to the last release candidate version, released yesterday

Mind that there are some changes that need to be handled server-side: https://github.com/decidim/decidim/releases/tag/v0.30.0.rc1

@andreslucena
Copy link
Member Author

@alecslupu I see too many unecessary changes here related to decidim/decidim#13624

Basically there's a mini bug where we're deleting an empty line after the comment with the modification time in the migration files:

Screenshot of the diff of a file with a newline difference

Apart from that, I think that we actually should be a bit more honest with the changes here. The logic should be:

  • if the files are the same, then don't change them
  • If the files are different, then apart from changing the file itself we should actually add a comment just after this line. Something like this:
# This migration comes from decidim_meetings (originally 20210512100333)
# It was last updated automatically during the update process (on 20250219)

I'm seeing the result of this diff and it isn't honest, and it might be a pain to debug in the future (like you only would realize that this migration was changed if you check the diff):

Screenshot of the diff of another file with more changes

Mind that I had to manually change the `db/schema.rb` file, as the
migrations for this application are broken: in 2017 we did a lot of
manual migrations that doesn't exist upstream (in decidim/decidim) and
that generates a problem locally and in testing where we can't run the
`db:migrate` task in a new database, but we need to do the
`db:schema:load` or `db:test:prepare` that loads the schema from the
schema.rb file instead of running each of the migrations.

Some examples of these files are:

- db/migrate/20170606113833_add_index_to_accountability_results_on_external_id.decidim_accountability.rb
- db/migrate/20170128100053_allow_erased_users.rb
- db/migrate/20170405084212_fix_email_uniqueness_index.rb
- db/migrate/20170125130555_remove_attachments_table.rb
@andreslucena andreslucena force-pushed the deps/decidim/0.30.0.rc1 branch from 4bcb618 to 86effd0 Compare February 19, 2025 09:17
@alecslupu
Copy link
Contributor

alecslupu commented Feb 19, 2025

Basically there's a mini bug where we're deleting an empty line after the comment with the modification time in the migration files:

Actually, I would say there is no bug. This change is actually coming from #13690, and the code that actually does that, is taken directly from rails's core.
If we look into: 20240619102701_add_valuation_assignments_count_to_decidim_proposals_proposals.decidim_proposals.rb we can see that the # This migration comes from decidim_conferences (originally 20240404202756) is right after the magic comment (# frozen_string_literal: true), but if we check 20240717080147_rename_external_domain_whitelist_to_external_domain_allowlist.decidim.rb, we can see the comment style has been changed.

I would say that we can add that extra comment like:

# It was last updated automatically during the update process (on 20250219)

Between the 2 mentioned files, the Rails upgrade from 6.1.7.6 to 7.0.8.4 happened.

I would say that we do not need to fix this comment

@andreslucena
Copy link
Member Author

Actually, I would say there is no bug. This change is actually coming from #13690, and the code that actually does that, is taken directly from rails's core.

Ahhh ook. Then yeah, if it's already there we can leave it out then!

I would say that we can add that extra comment like:

That'd be great! I think some installations can be bitten by this in the future and if you think that the migration wasn't changed when it was actually changed then it can be pain. To be honest this is something that we should have done each time we changed old migrations upstream too.

@andreslucena andreslucena changed the title Bump decidim from v0.29.2 to v0.30.0.rc1 (DEPRECATED) Bump decidim from v0.29.2 to v0.30.0.rc1 Feb 19, 2025
@andreslucena
Copy link
Member Author

Closing this one in favour of #142

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.

2 participants