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

set up gitpod builds for every PR #8145

Merged
merged 26 commits into from
Jul 16, 2020
Merged

Conversation

keshavsethi
Copy link
Member

@keshavsethi keshavsethi commented Jul 14, 2020

Here I am just testing gitpod with some changes
Thanks!

fixes #8122

@codecov
Copy link

codecov bot commented Jul 14, 2020

Codecov Report

Merging #8145 into main will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8145      +/-   ##
==========================================
- Coverage   82.05%   82.05%   -0.01%     
==========================================
  Files         100      100              
  Lines        5772     5755      -17     
==========================================
- Hits         4736     4722      -14     
+ Misses       1036     1033       -3     
Impacted Files Coverage Δ
app/controllers/comment_controller.rb 86.95% <0.00%> (-0.28%) ⬇️
app/controllers/application_controller.rb 92.17% <0.00%> (-0.14%) ⬇️
app/controllers/users_controller.rb 82.16% <0.00%> (-0.13%) ⬇️
app/models/user.rb 86.39% <0.00%> (-0.05%) ⬇️
app/services/search_service.rb 95.04% <0.00%> (-0.05%) ⬇️
app/models/node.rb 91.05% <0.00%> (-0.02%) ⬇️
app/models/tag.rb 97.50% <0.00%> (-0.02%) ⬇️
app/models/answer.rb 100.00% <0.00%> (ø)
app/models/comment.rb 76.89% <0.00%> (ø)
app/api/srch/search.rb 66.24% <0.00%> (ø)
... and 13 more

@jywarren
Copy link
Member

Just noting i added some database configs to #8122 too, so let's see...

@@ -0,0 +1,34 @@
# Warning: The contents of the database defined as "test" will be erased and
Copy link
Member

Choose a reason for hiding this comment

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

ooh! yeah..... good call!

@jywarren
Copy link
Member

@keshavsethi keshavsethi requested a review from a team as a code owner July 14, 2020 20:16
@gitpod-io
Copy link

gitpod-io bot commented Jul 14, 2020

@keshavsethi
Copy link
Member Author

@jywarren I think it will setup db now Please review
Thanks!!

@keshavsethi keshavsethi requested a review from jywarren July 14, 2020 20:18
@jywarren
Copy link
Member

wow! Hope so! 🎉 thank you! My build has taken >24m so far, in #8122

but once prebuilt, hopefully it'll go faster.

@jywarren
Copy link
Member

OK, i had to, in the console, run:

yarn install bundle exec passenger start

(last line instead of passenger start)

and then it worked!!!

@jywarren
Copy link
Member

@jywarren
Copy link
Member

Added those last tweaks... hey tremendous job @keshavsethi -- thank you!

Fingers X this passes, then we'll be zooming along!

@jywarren jywarren changed the title test gitpod setup set up gitpod builds for every PR Jul 14, 2020
@@ -0,0 +1 @@
FROM gitpod/workspace-mysql
Copy link
Member Author

Choose a reason for hiding this comment

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

@jywarren I think we can remove this file??

Copy link
Member

Choose a reason for hiding this comment

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

possibly! want to try?

Copy link
Member Author

Choose a reason for hiding this comment

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

@jywarren I checked gitpod after removing. Buil did getting failed so added it again.
Thanks!!

@jywarren
Copy link
Member

jywarren commented Jul 15, 2020

Hmm. synax still wrong:

mysql -e "SET @@global.sql_mode=(SELECT REPLACE(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', ''));"

image

.gitpod.yml Outdated
- init: >
bundle install --without production &&
cp config/database.yml.gitpod config/database.yml &&
mysql -e "SET @@global.sql_mode=(SELECT REPLACE(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', ''));"; &&
Copy link
Member

Choose a reason for hiding this comment

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

hmm there must be a syntax error in here, but I'm not sure where!

Copy link
Member

Choose a reason for hiding this comment

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

(Also depending on the mysql version, the syntax may be different, but I believe this one is good for us as I tested it on the console. Ref: https://stackoverflow.com/questions/23921117/disable-only-full-group-by)

Copy link
Member

Choose a reason for hiding this comment

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

@keshavsethi I kind of got stuck here but maybe you can figure out the next step? Or if @icarito has an idea?

.gitpod.yml Outdated
bundle install --without production &&
cp config/database.yml.gitpod config/database.yml &&
mysql -e "SET @@global.sql_mode=(SELECT REPLACE(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', ''));"; &&
mysql -e "CREATE DATABASE plots;"; &&
Copy link
Member

Choose a reason for hiding this comment

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

I believe the issue is here, there's a ; and then &&, this is a syntax error.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, after this fix we still see it:

gitpod /workspace/plots2 $  HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
> bundle install --without production && cp config/database.yml.gitpod config/database.yml && mysql -e "SET @@global.sql_mode=(SELECT REPLACE(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', ''));" && mysql -e "CREATE DATABASE plots;"; && cp db/schema.rb.example db/schema.rb && rake db:setup && yarn install
bash: syntax error near unexpected token `&&'
gitpod /workspace/plots2 $ 
gitpod /workspace/plots2 $ } && {
bash: syntax error near unexpected token `}'
gitpod /workspace/plots2 $ passenger start
bash: passenger: command not found
gitpod /workspace/plots2 $ 
gitpod /workspace/plots2 $ }
bash: syntax error near unexpected

But, actually there's a ; on the next line too, so I'll try removing that.

@jywarren
Copy link
Member

That did it. Perfect:

https://3000-a8cc69d8-8dd5-4128-93f5-1816a29b5f96.ws-us02.gitpod.io/

Screen Shot 2020-07-15 at 11 13 23 PM

@jywarren jywarren merged commit 97b136d into publiclab:main Jul 16, 2020
@jywarren
Copy link
Member

Thanks, everyone. This is really exciting. Adding a badge to the README too. 🎉 🎉 🎉

@keshavsethi @Tlazypanda @cesswairimu @sagarpreet-chadha @Shulammite-Aso @keshav234156 @NitinBhasneria @shreyaa-sharmaa @SidharthBansal if you rebase or resync your PRs on plots2 now, you should get a GitPod build here too!

Great for testing integrations, checking UI changes on PRs (esp from first-timers), all kinds of things. Woohoo!!!!

@jywarren
Copy link
Member

Aww, it looks like we didn't actually completely solve #8145 (comment) -- I'm trying to work on it a bit more in #8152 now!

@sagarpreet-chadha
Copy link
Contributor

Wow this is so cool!!!
So we have a docker container running in server, which is listening to github PR's using github webhooks, right?

@jywarren
Copy link
Member

I believe so but basically it's hosted at GitPod, free!

@jywarren
Copy link
Member

Just confirming that we see an error on https://3000-ff07100e-6fdf-4fbe-b308-983437a28749.ws-us02.gitpod.io/wiki --

Mysql2::Error: Expression #26 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'plots.node_revisions.vid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: SELECT  `node`.`nid` AS t0_r0, `node`.`vid` AS t0_r1, `node`.`type` AS t0_r2, `node`.`language` AS t0_r3, `node`.`title` AS t0_r4, `node`.`uid` AS t0_r5, `node`.`status` AS t0_r6, `node`.`created` AS t0_r7, `node`.`changed` AS t0_r8, `node`.`comment` AS t0_r9, `node`.`promote` AS t0_r10, `node`.`moderate` AS t0_r11, `node`.`sticky` AS t0_r12, `node`.`tnid` AS t0_r13, `node`.`translate` AS t0_r14, `node`.`cached_likes` AS t0_r15, `node`.`comments_count` AS t0_r16, `node`.`drupal_node_revisions_count` AS t0_r17, `node`.`path` AS t0_r18, `node`.`main_image_id` AS t0_r19, `node`.`slug` AS t0_r20, `node`.`views` AS t0_r21, `node`.`latitude` AS t0_r22, `node`.`longitude` AS t0_r23, `node`.`precision` AS t0_r24, `node_revisions`.`vid` AS t1_r0, `node_revisions`.`nid` AS t1_r1, `node_revisions`.`uid` AS t1_r2, `node_revisions`.`title` AS t1_r3, `node_revisions`.`body` AS t1_r4, `node_revisions`.`teaser` AS t1_r5, `node_revisions`.`log` AS t1_r6, `node_revisions`.`timestamp` AS t1_r7, `node_revisions`.`format` AS t1_r8, `node_revisions`.`status` AS t1_r9 FROM `node` LEFT OUTER JOIN `node_revisions` ON `node_revisions`.`nid` = `node`.`nid` WHERE (node_revisions.status = 1 AND node.status = 1 AND (type = 'page' OR type = 'tool' OR type = 'place')) GROUP BY node_revisions.nid ORDER BY node_revisions.timestamp DESC LIMIT 30 OFFSET 0

line 17 of Trace of template inclusion: app/views/wiki/index.html.erb


15 16 17 18 19 20 | <th><a href = "?sort=likes"> <%= translation('wiki._wikis.likes') %></a> <i class="fa fa-sort" aria-hidden="true"></i></th>     </tr>     <% wikis.each do \|wiki\| %>       <tr>         <td style="width:50%"><i class="fa fa-file"></i> <a href="<%= wiki.path %>"><%= wiki.latest.title %></a></td>         <td><i><%= wiki.path %></i></td>
-- | --


@icarito
Copy link
Member

icarito commented Jul 21, 2020

yes, some of our queries seem to be incompatible with MySQL 5.7 - I ran into this with our recent upgrade. In Cloud SQL I added the flag: sql_mode="TRADITIONAL" and it started working.

@jywarren
Copy link
Member

MySQL 5.7 and higher? Thanks for the tip, i'll try that!

Tristan-Elizabeth pushed a commit to Tristan-Elizabeth/plots2 that referenced this pull request Jul 21, 2020
* test gitpod

* just checking gitpod

* changed version

* tasks gitpod

* gitpod.io

* initial setup

* db setup

* init update

* create db

* sql error

* gitpod test

* path issue

* Update .gitpod.yml

* Update .gitpod.yml

* removed .gitpod.dockerfile

* added gitpod.dockerfile

* passenger start added

* switch to mysql

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

Co-authored-by: Jeffrey Warren <[email protected]>
Co-authored-by: Sebastian Silva <[email protected]>
@jywarren
Copy link
Member

addressing in #8152

dms-yondy pushed a commit to dms-yondy/plots2 that referenced this pull request Aug 7, 2020
* test gitpod

* just checking gitpod

* changed version

* tasks gitpod

* gitpod.io

* initial setup

* db setup

* init update

* create db

* sql error

* gitpod test

* path issue

* Update .gitpod.yml

* Update .gitpod.yml

* removed .gitpod.dockerfile

* added gitpod.dockerfile

* passenger start added

* switch to mysql

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

Co-authored-by: Jeffrey Warren <[email protected]>
Co-authored-by: Sebastian Silva <[email protected]>
nadimakhtar97 pushed a commit to nadimakhtar97/plots2 that referenced this pull request Sep 21, 2020
* test gitpod

* just checking gitpod

* changed version

* tasks gitpod

* gitpod.io

* initial setup

* db setup

* init update

* create db

* sql error

* gitpod test

* path issue

* Update .gitpod.yml

* Update .gitpod.yml

* removed .gitpod.dockerfile

* added gitpod.dockerfile

* passenger start added

* switch to mysql

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

Co-authored-by: Jeffrey Warren <[email protected]>
Co-authored-by: Sebastian Silva <[email protected]>
shubhangikori pushed a commit to shubhangikori/plots2 that referenced this pull request Oct 12, 2020
* test gitpod

* just checking gitpod

* changed version

* tasks gitpod

* gitpod.io

* initial setup

* db setup

* init update

* create db

* sql error

* gitpod test

* path issue

* Update .gitpod.yml

* Update .gitpod.yml

* removed .gitpod.dockerfile

* added gitpod.dockerfile

* passenger start added

* switch to mysql

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

Co-authored-by: Jeffrey Warren <[email protected]>
Co-authored-by: Sebastian Silva <[email protected]>
alvesitalo pushed a commit to alvesitalo/plots2 that referenced this pull request Oct 14, 2020
* test gitpod

* just checking gitpod

* changed version

* tasks gitpod

* gitpod.io

* initial setup

* db setup

* init update

* create db

* sql error

* gitpod test

* path issue

* Update .gitpod.yml

* Update .gitpod.yml

* removed .gitpod.dockerfile

* added gitpod.dockerfile

* passenger start added

* switch to mysql

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

Co-authored-by: Jeffrey Warren <[email protected]>
Co-authored-by: Sebastian Silva <[email protected]>
piyushswain pushed a commit to piyushswain/plots2 that referenced this pull request Oct 22, 2020
* test gitpod

* just checking gitpod

* changed version

* tasks gitpod

* gitpod.io

* initial setup

* db setup

* init update

* create db

* sql error

* gitpod test

* path issue

* Update .gitpod.yml

* Update .gitpod.yml

* removed .gitpod.dockerfile

* added gitpod.dockerfile

* passenger start added

* switch to mysql

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

Co-authored-by: Jeffrey Warren <[email protected]>
Co-authored-by: Sebastian Silva <[email protected]>
manchere pushed a commit to manchere/plots2 that referenced this pull request Feb 13, 2021
* test gitpod

* just checking gitpod

* changed version

* tasks gitpod

* gitpod.io

* initial setup

* db setup

* init update

* create db

* sql error

* gitpod test

* path issue

* Update .gitpod.yml

* Update .gitpod.yml

* removed .gitpod.dockerfile

* added gitpod.dockerfile

* passenger start added

* switch to mysql

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

Co-authored-by: Jeffrey Warren <[email protected]>
Co-authored-by: Sebastian Silva <[email protected]>
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
* test gitpod

* just checking gitpod

* changed version

* tasks gitpod

* gitpod.io

* initial setup

* db setup

* init update

* create db

* sql error

* gitpod test

* path issue

* Update .gitpod.yml

* Update .gitpod.yml

* removed .gitpod.dockerfile

* added gitpod.dockerfile

* passenger start added

* switch to mysql

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

Co-authored-by: Jeffrey Warren <[email protected]>
Co-authored-by: Sebastian Silva <[email protected]>
ampwang pushed a commit to ampwang/plots2 that referenced this pull request Oct 26, 2021
* test gitpod

* just checking gitpod

* changed version

* tasks gitpod

* gitpod.io

* initial setup

* db setup

* init update

* create db

* sql error

* gitpod test

* path issue

* Update .gitpod.yml

* Update .gitpod.yml

* removed .gitpod.dockerfile

* added gitpod.dockerfile

* passenger start added

* switch to mysql

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

Co-authored-by: Jeffrey Warren <[email protected]>
Co-authored-by: Sebastian Silva <[email protected]>
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
* test gitpod

* just checking gitpod

* changed version

* tasks gitpod

* gitpod.io

* initial setup

* db setup

* init update

* create db

* sql error

* gitpod test

* path issue

* Update .gitpod.yml

* Update .gitpod.yml

* removed .gitpod.dockerfile

* added gitpod.dockerfile

* passenger start added

* switch to mysql

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

* Update .gitpod.yml

Co-authored-by: Jeffrey Warren <[email protected]>
Co-authored-by: Sebastian Silva <[email protected]>
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.

4 participants