Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 23 18:20
    dependabot-preview[bot] labeled #718
  • Aug 23 18:20
    dependabot-preview[bot] labeled #718
  • Aug 23 18:20
    dependabot-preview[bot] opened #718
  • Aug 23 18:20

    dependabot-preview[bot] on composer

    Bump friendsofsymfony/elastica-… (compare)

  • Aug 22 13:40
    hoyes commented #564
  • Aug 20 22:01

    CHTJonas on master

    Bump sass-loader from 7.2.0 to … (compare)

  • Aug 20 22:01

    CHTJonas on npm_and_yarn

    (compare)

  • Aug 20 22:01
    CHTJonas closed #717
  • Aug 20 16:36
    dependabot-preview[bot] labeled #717
  • Aug 20 16:36
    dependabot-preview[bot] labeled #717
  • Aug 20 16:36
    dependabot-preview[bot] opened #717
  • Aug 20 16:36

    dependabot-preview[bot] on npm_and_yarn

    Bump sass-loader from 7.2.0 to … (compare)

  • Aug 19 11:14
    CHTJonas edited #688
  • Aug 16 18:52

    CHTJonas on npm_and_yarn

    (compare)

  • Aug 16 18:51

    CHTJonas on master

    Bump @github/hotkey from 1.2.3 … (compare)

  • Aug 16 18:51
    CHTJonas closed #716
  • Aug 16 08:23
    dependabot-preview[bot] labeled #716
  • Aug 16 08:23
    dependabot-preview[bot] labeled #716
  • Aug 16 08:23
    dependabot-preview[bot] opened #716
  • Aug 16 08:23

    dependabot-preview[bot] on npm_and_yarn

    Bump @github/hotkey from 1.2.3 … (compare)

Peter Hoyes
@hoyes
:thumbsup:
Peter Hoyes
@hoyes
I'm getting ALTER TABLE acts_api_apps CHANGE total_requests total_requests INT NOT NULL;
The migration has total_requests INTEGER DEFAULT 0, which I guess is a nullable field that defaults to 0
I'll find a way to make Travis output the above automatically if the validation fails
Charlie Jonas
@CHTJonas
Ah gotcha. I do handle potential null values in the code so can either annotate as nullable or correct that migration
Picky ORM ugh. Guess it better than an inconsistent DB
Peter Hoyes
@hoyes
If the data is inherently never going to be NULL then best to enforce that in the schema IMO
Peter Hoyes
@hoyes
Yea that is a bit picky - doesn't really matter whether the DB can accept nulls or not in this case.
Peter Hoyes
@hoyes
Just made the error a little more helpful :-) https://travis-ci.org/camdram/camdram/jobs/467794985#L1065
Charlie Jonas
@CHTJonas
Fun topic for discussion - shows versus diary events.

https://www.camdram.net/venues/adc-theatre/shows.json?from=2018-12-01&to=2018-12-03

Expected: return a blank array seeing as there are no performances at the ADC in this date range.
Actual: returns data for ETG because the show's venue matches and at least one of their performances is in the query date range.

Is this a bug or intended behaviour? I can see the distinction between performances and shows and maybe this could be useful to someone?
Or is it just confusing...?
George Bateman
@GKFX
I’m working on a branch where shows have no venue, only performances do, so the problem should go away
Charlie Jonas
@CHTJonas
Cool.
Is it worth fixing in master if this is planned for far future?
George Bateman
@GKFX
No, I should be able to get the branch out in the not-too-distant future
George Bateman
@GKFX
I've pushed the relevant three lines to master anyway; as usual there are a bunch of loose ends to tie up with the branch.
Peter Hoyes
@hoyes
I'll leave this here: https://threader.app/thread/1078388060696576001 (by a ReactJS maintainer)
Charlie Jonas
@CHTJonas
Haha!
Charlie Jonas
@CHTJonas
@GKFX just to check I understand the recent CSP stuff correctly: the warnings/errors from Sentry are only advisory and can be safely ignored?
George Bateman
@GKFX
That is correct, I think it is just a list of IPs who have installed poorly written browser extensions at the moment. Unfortunately there’s less context in the reports than I would like, but the idea is to check that I wrote the policy correctly before we set it to enforce in the next release.
Charlie Jonas
@CHTJonas
Cool - I assumed it was something like that from your commit messages
Charlie Jonas
@CHTJonas
Looks like one fo the recent releases has broken the OAuth2 API. Previously (when authenticated) you could use https://www.camdram.net/auth/account/organisations.json and https://www.camdram.net/auth/account/shows.json to obtain a list of shows/societies/venues that the user had admin rights for. This no longer seems to work and returns 404 instead.
I assume it's caused as a side effect of the transition from FOSRestController to AbstractFOSRestController
George Bateman
@GKFX
yep
fixing now.
Charlie Jonas
@CHTJonas
Ah thanks!
George Bateman
@GKFX
@CHTJonas once that's up would you be able to test it if you're free? I haven't used the OAuth2 API before so I just switched it back on without testing to see if it's right.
Charlie Jonas
@CHTJonas
Yep can do!
Are you about to deploy or should I? :smile:
George Bateman
@GKFX
Already deployed!
Charlie Jonas
@CHTJonas
So now it's returning HTTP 500 Internal Server Error
Which seems to have been picked up by Sentry
George Bateman
@GKFX
Does the shows url work?
typo appears only in the organisations code
Charlie Jonas
@CHTJonas
Yeah shows works :+1:
George Bateman
@GKFX
Wonderful, will push to master.dev for another test
any luck?
Charlie Jonas
@CHTJonas
Gimme a sec sorry!
More difficult to test on dev
Yeah it seems to work now. Returns blank arrays as the default admin user doesn't 'own' anything by default but at least it doesn't error now
Can you deploy to prod?
George Bateman
@GKFX
Yep I've started deployment. Thanks for spotting this!
Charlie Jonas
@CHTJonas
No worries!
Charlie Jonas
@CHTJonas
Anyone know what the point of the ExternalUser -> Person relationship is?
I totally get and understand both ExternalUser -> User and Person -> User, but ExternalUser -> Person doesn't make much sense to me. What's more is that sometimes this relationship is set but other times it isn't: SELECT id, user_id, service, username, name, email, person_id, last_login_at FROM acts_external_users WHERE person_id IS NOT NULL; isn't particularly revealing...
Stuart Cuthbertson
@philosophicles
Not certain but I think users can have a row in ExternalUser without a row in User?
At which point we need to be able to map from (EU xor U) to P.
George Bateman
@GKFX

Users can exist in ExternalUser with null user_id but I think that is a bug. If I go to my externaluser and set user_id = NULL it gets automatically fixed on my next login back to user_id = 4093. On the other hand if I also change my email address (so the software can't automatically fix the null user_id) it acts as though my externaluser doesn't exist and asks me to set up a new account.

I think we should go through the externaluser table and fix all the null user_id's that would be fixed if they logged in (should be an SQL one-liner) then delete the rest, set acts_external_user.user_id to non-nullable, and delete acts_external_user.person_id.