Skip to content

Add gitpod support#10641

Merged
alecslupu merged 59 commits intodecidim:developfrom
mainio:feature/gitpod
Apr 4, 2023
Merged

Add gitpod support#10641
alecslupu merged 59 commits intodecidim:developfrom
mainio:feature/gitpod

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

🎩 What? Why?

Adds support for Gitpod which allows creating on the fly "throw away" development environments e.g. for testing different PRs.

The docker container should be thought of as a representation of your development machine. On top of the Gitpod base image, I am installing:

  • PostgreSQL (server, client and development libraries for bindings)
  • NVM and correct Node version
  • rbenv and correct Ruby version

In the Gitpod configuration, we initialize (init) the development environment by creating the development app and running seeds on it. If prebuilds are enabled, this speeds up spinning up new workspaces as the user doesn't have to wait for the development app generation. The command part is run when the workspace is started.

The /workspace folder within the workspace environment gets persisted based on the init task. This is why I am storing some crucial information in that folder, such as PostgreSQL data since the database is created and seeded during the init task. This way, any new environment created on top of that prebuild gets the same content in their /workspace folder as there was at the end of the init task.

I am also adding some configurations for the GitHub integration to support quick workspace creation for PRs. See the attached video for more details on this.

Testing

Try this URL:
https://gitpod.io/#https://github.com/mainio/decidim/tree/feature/gitpod

You will need to create a Gitpod account which you can do by signing in with your GitHub account.

📷 Screenshots

decidim-gitpod.mp4

In case the user has popups blocked for the site, it wouldn't
otherwise open.
Because compiling the assets takes a while.
In order to persist the database for prebuilds.
In order to persist the database within the workspace.
@ahukkanen ahukkanen added target: developer-experience type: internal PRs that aren't necessary to add to the CHANGELOG for implementers labels Mar 29, 2023
@ahukkanen
Copy link
Copy Markdown
Contributor Author

One thing to be noted for this is that the current configuration will create a prebuild environment for each and every PR. This might be problematic for the backports since they will cause a large amount of PRs in a short time and each of those PRs would consume 10-15 minutes of the quota for the account running the prebuilds.

Someone had suggested a feature at the Gitpod repository that would solve this:
gitpod-io/gitpod#11352

But it seems that issue hasn't got much traction so far at least.

As Gitpod has updated this to Ubuntu 22.04 on April 3rd.
@alecslupu alecslupu merged commit 0a10a82 into decidim:develop Apr 4, 2023
@ahukkanen ahukkanen deleted the feature/gitpod branch April 5, 2023 13:52
entantoencuanto added a commit that referenced this pull request Jun 8, 2023
* feature/redesign: (70 commits)
  Fix failing specs
  Redesign sortitions (#10831)
  Redesign: data toggle (#10886)
  Redesign: collaborative drafts (#10729)
  Redesign: pending pages (#10944)
  Redesign: my account (#10904)
  use foundation classes instead of default html validation (#10921)
  Fix failings redesign specs
  Add gitpod support (#10641)
  Fix pipeline after #10409 (#10670)
  Upgrade webpack and other javascript libraries (#10643)
  New Crowdin updates (#10409)
  Refactor attachment title (#10103)
  Fix for exporting hidden moderated proposals (#10630)
  Fix Exception as admin on a Proposal with meeting author (#10628)
  Fix: Deleted and hidden comments are exported (#10629)
  Rename "terms and conditions" to "terms of service" (#10614)
  Upgrade Graphql to 2.0.19 and Graphql-Api to 3.0.1 (#10606)
  Standardize the format of the words "they will" (#10617)
  Fix the spec after word standardization (#10624)
  ...
entantoencuanto added a commit that referenced this pull request Jun 12, 2023
…blies-details-page

* feature/redesign: (71 commits)
  Unskip tests (#10951)
  Fix failing specs
  Redesign sortitions (#10831)
  Redesign: data toggle (#10886)
  Redesign: collaborative drafts (#10729)
  Redesign: pending pages (#10944)
  Redesign: my account (#10904)
  use foundation classes instead of default html validation (#10921)
  Fix failings redesign specs
  Add gitpod support (#10641)
  Fix pipeline after #10409 (#10670)
  Upgrade webpack and other javascript libraries (#10643)
  New Crowdin updates (#10409)
  Refactor attachment title (#10103)
  Fix for exporting hidden moderated proposals (#10630)
  Fix Exception as admin on a Proposal with meeting author (#10628)
  Fix: Deleted and hidden comments are exported (#10629)
  Rename "terms and conditions" to "terms of service" (#10614)
  Upgrade Graphql to 2.0.19 and Graphql-Api to 3.0.1 (#10606)
  Standardize the format of the words "they will" (#10617)
  ...
entantoencuanto added a commit that referenced this pull request Jun 15, 2023
…ations

* feature/redesign: (78 commits)
  Redesign: initiatives (#10646)
  Redesign: surveys (#10922)
  Redesign: coauthors (#10954)
  remove font-bold from breadcrumb (#10990)
  Redesign: participatory texts (#10941)
  Redesign: budgets (#10195)
  Redesign: fix buttons & geocoder (#10975)
  Unskip tests (#10951)
  Fix failing specs
  Redesign sortitions (#10831)
  Redesign: data toggle (#10886)
  Redesign: collaborative drafts (#10729)
  Redesign: pending pages (#10944)
  Redesign: my account (#10904)
  use foundation classes instead of default html validation (#10921)
  Fix failings redesign specs
  Add gitpod support (#10641)
  Fix pipeline after #10409 (#10670)
  Upgrade webpack and other javascript libraries (#10643)
  New Crowdin updates (#10409)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target: developer-experience 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