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

Fix generators specs target branch #9284

Merged

Conversation

ahukkanen
Copy link
Contributor

@ahukkanen ahukkanen commented May 10, 2022

🎩 What? Why?

After we upgraded to Ruby 3, the generators specs started to fail at the release branches because they are trying to install the version from the develop branch on Ruby 2.7, as the previous release version targets Ruby 2.7.

When merging backport PRs to the release/0.26-stable branch, we started to get the following kind of errors from the CI:

Fetching https://github.com/decidim/decidim.git
Fetching gem metadata from https://rubygems.org/.......
Resolving dependencies.....
decidim-api-0.27.0.dev requires ruby version >= 3.0, which is incompatible with
the current version, ruby 2.7.5p203

This caused the whole pipeline to fail because it couldn't install Decidim.

This PR interprets the target "edge" branch based on the Decidim::Generators version number:

  • If the version ends with .dev, install the version at the develop branch
  • In other cases, target the release/0.xx-stable branch where 0.xx is replaced with the correct version

📌 Related Issues

Testing

Run the generators specs against the release/0.26-stable branch.

For develop this should not have any effect.

📋 Checklist

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

@ahukkanen ahukkanen marked this pull request as ready for review May 11, 2022 08:52
@andreslucena andreslucena added the type: internal PRs that aren't necessary to add to the CHANGELOG for implementers label May 11, 2022
Copy link
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.

👍🏽

@andreslucena andreslucena merged commit 1c3a1a2 into decidim:develop May 11, 2022
@andreslucena
Copy link
Member

Do you want me to do the backport @ahukkanen?

@ahukkanen ahukkanen deleted the fix/generators-specs-target-branch branch May 11, 2022 15:08
ahukkanen added a commit to mainio/decidim that referenced this pull request May 11, 2022
* Dynamically get the edge release branch based on the current version

* Move the current generators spec to the runtime directory

* Add spec for testing the generators edge version git branch

* Fix the repo root path at the generators runtime specs

* Require the Decidim::Generators base module for the generators tests
@ahukkanen
Copy link
Contributor Author

@andreslucena I created the backport at #9290.

andreslucena pushed a commit that referenced this pull request May 19, 2022
* Dynamically get the edge release branch based on the current version

* Move the current generators spec to the runtime directory

* Add spec for testing the generators edge version git branch

* Fix the repo root path at the generators runtime specs

* Require the Decidim::Generators base module for the generators tests
andreslucena pushed a commit that referenced this pull request May 19, 2022
* Dynamically get the edge release branch based on the current version

* Move the current generators spec to the runtime directory

* Add spec for testing the generators edge version git branch

* Fix the repo root path at the generators runtime specs

* Require the Decidim::Generators base module for the generators tests
@alecslupu alecslupu added this to the 0.27.0 milestone Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: generators 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.

None yet

3 participants