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

Update sharetribe #89

Open
wants to merge 1,049 commits into
base: master
Choose a base branch
from
Open

Update sharetribe #89

wants to merge 1,049 commits into from

Conversation

danypr92
Copy link
Member

@danypr92 danypr92 commented Nov 9, 2021

No description provided.

thomasmalbaux and others added 30 commits May 27, 2021 00:34
[Bug] Duplicate social media links in the footer
[Maintenance] Bump json from 9.0.4 to 10.0.0 in /client
Redirect an already logged in user to the home page when they visit the /login page
Was made consistent at sharetribe/go@21bdb80
Then was no longer consistent with sharetribe/go@9fdca60

Now back to consistency!
[Bug] Facebook & LinkedIn logos too small on signup and login pages
[Custom script] Add new body and css fields
[Bug] Email sending feature produces error with certain sender names
sauloperez and others added 30 commits September 29, 2021 17:56
This uses https://github.com/scenic-views/scenic. A well known gem from
Thoughtbot that adds tooling to manage DB view with regular migrations.

I also had to manually remove the line

```
/*!50013 DEFINER=`sharetribe`@`%` SQL SECURITY DEFINER */
```

from db/structure.sql so it works in CI. In there it fails with

```
Mysql2::Error: The user specified as a definer ('sharetribe'@'%') does not exist: SELECT "active_sessions" AS table_name,
```

because that DB user doesn't exist but it won't in production either.
According to
https://dev.mysql.com/doc/refman/5.7/en/stored-objects-security.html
though,

> If a definition omits the DEFINER attribute, the default definer is the user who creates the object.

And that seems fine as well.
This performs a client-side validation and displays "El archivo es
demasiado grande" in the drop area. There doesn't seem to be a way to
print the error the backend returns because fileupload's `fail` callback
doesn't provide any arguments.
[skip ci]
Note I had to remove the DEFINER statement from the structure.sql.

```
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`sharetribe`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `masked_people` AS select `people`.`id` AS `id
```

I did that when we created but with every update Scenic adds it and this
breaks in production. We definitely need to find a better way. Either
ensure the same DEFINER user is present in production or make Scenic
skip that statement (I'm not sure it can).
Having a plan model with the `footer` feature alone doesn't enable it.
The community needs to enable it either from `/es/admin/footer/edit` or
this way.
The column is there but empty (no user has it set in the production DB).
It turns out it is stored in the `emails` table. This supports users
having multiple emails, I suspect to enable a single user having access
to multiple communities.

We don't care about this since there's only a community for Donalo so
we can safely assume a one to one relationship between person and email
records.
When Cucumber gets executed in CI, DatabaseCleaner tries to clean
`masked_people` as if it was a regular table and the command `DELETE
FROM `masked_people``, because it's a view, fails.
Like in production.
The default stack is `Heroku-20` (with Ubuntu 20) but our Ruby version
is not supported there. See
https://devcenter.heroku.com/articles/heroku-18-stack.
We trust Heroku's Unicorn example config
(https://devcenter.heroku.com/articles/rails-unicorn). We also want to
make it possible to configure workers with only changing th
WEB_CONCURRENCY env var.

Note this needs coopdevs/donalo#99 for things to
keep working in production.
This is the one Heroku provisions. I know this might conflict with
future Sharetribe upgrades but I think that's unlikely and even if it
happens we can always resolve conflict as we want (using REDIS_URL).
We have paid and unpaid transactions as shapes. This fixes the new
listing form where if the selected category has no associated shapes
it'll fail to render the listing form.
That's because as the custom fields "Cantidad mínima a solicitar" and
"Cantidad disponible" didn't have an associated category other than the
default one (the first one), the listing/new view didn't show the fields
unless selecting the default category. As a result, the listing had no
custom field values associated and failed to load them on :show.
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.