kaberett: Overlaid Mars & Venus symbols, with Swiss Army knife tools at other positions around the central circle. (Default)
[personal profile] kaberett
This is a big one, due in no small part to [github.com profile] pinterface, new to Dreamwidth volunteering and coding up a storm. I've gotta say. A very warm welcome also to [github.com profile] dfabulich, who I am pretty sure is also featured in a code tour for the first time!

Read more... )


40 total issues resolved
Contributors: [github.com profile] cesy, [github.com profile] chrisboyle, [github.com profile] dfabulich, [github.com profile] kaberett, [github.com profile] kareila, [github.com profile] me-and, [github.com profile] pinterface, [github.com profile] rahaeli, [github.com profile] zorkian

(... I swear I am never going six weeks between code tours again, I am NICE and DON'T DESERVE THIS...)
pauamma: Cartooney crab holding drink (Default)
[personal profile] pauamma
It's time for another question thread!

The rules:

- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
kaberett: Overlaid Mars & Venus symbols, with Swiss Army knife tools at other positions around the central circle. (Default)
[personal profile] kaberett
[personal profile] cesy has just been tripped up by my pull request #1751: she updated dw-free but not dw-nonfree, and as a consequence Apache wouldn't start. This suggests that you may need to update -nonfree at this point regardless of whether you actually use it; here are the instructions.
kaberett: Overlaid Mars & Venus symbols, with Swiss Army knife tools at other positions around the central circle. (Default)
[personal profile] kaberett
Hi folk,

The May contributor weekend is underway. Feel free to show up in person if you're local and at a loose end, or hop onto IRC and say hi :-)

We can also do Skype sessions for telecommuting!
[personal profile] pinterface

Summary

The present config system is ... non-ideal. It should be better.

Problems / Pain Points

The existing config system is all-or-nothing: if you want to tweak one thing in config.pl—$USE_ACCT_CODES or @SCHEMES, say—you have to copy the entire thing, and will no longer get tweaks made to the base config.

As you might imagine, this makes upgrading painful. "Oh, they added an option and ... now it's all broken because I don't set it."

The existing config system also fails to compose. While it loads three config files—config-private.pl, config-local.pl, and config.pl—it only loads one of each. If you clone, say, dw-nonfree into ext/, it will load config-local.pl from that. Unless you already have your own config-local.pl in ext/local, in which case it won't use nonfree's at all. So even though you only wanted to make one or two changes over the baseline, now you're stuck merging all three config-local.pl files manually.

And just forget about adding bobs-awesome-dw-plugin. I don't know if anything beyond dw-nonfree exists, but hey, maybe at some point.

It also brings up the question of what config variable goes into which file? @SCHEMES and @LANGS are pretty darned site-specific, but they're in config.pl. $HOME is set to the LJHOME env variable in config-local.pl, but when are you ever going to change that? (In fact, things are likely to break if you ever did!)

Good Things

One of the nice things about the existing config system is that it is pure Perl, bringing with it all the flexibility that provides. (Though some might argue that a turing-complete configuration file is also a drawback.)

Proposal

Summary

Let's move to a Debian-style conf-available/conf-enabled split system, where all config files are loaded, and then merged.

Technical Details

Directory Structure

Similar to the existing structure, except the provided config files would be placed into directories called something like "conf-available" or "conf.d". Config files would be loaded, in lexicographical order, from a single "conf-enabled" directory, which is populated with symlinks to the actual config files.

  • etc/conf-available/
    • private.example.pl
    • local.example.pl
    • defaults.pl
    • down-for-maintenance.pl
    • schemes.pl
  • ext/local/conf-available/
    • private.pl
    • local.pl
  • ext/dw-nonfree/conf-available/
    • nonfree.pl
    • schemes.pl
  • etc/conf-enabled/
    • 00-private.pl → $LJHOME/ext/local/conf-available/private.pl
    • 10-local.pl → $LJHOME/ext/local/conf-available/local.pl
    • 50-nonfree.pl → $LJHOME/ext/dw-nonfree/conf-available/nonfree.pl
    • 50-free-schemes.pl → $LJHOME/etc/conf-available/schemes.pl
    • 50-nonfree-schemes.pl → $LJHOME/ext/dw-nonfree/conf-available/schemes.pl
    • 90-defaults.pl → $LJHOME/etc/conf-available/defaults.pl

Config Files

Config files would each return a hash of values. It would be the responsibility of the config system to merge them all together appropriately. Essentially, this would be done in the same manner as used by Config::FromHash. However, because a number of config values are defaulted using prior values, it would be necessary to provide a dynamically-scoped variable containing the config-as-loaded-thus-far, to support that (hopefully that will be made clear by the examples).

# ext/local/conf-available/private.pl
{
    DOMAIN => "example.dreamhack.net",
    DBINFO => {
        # ...
    },
    # ...
};
# ext/local/conf-available/local.pl
{
    IS_DEV_SERVER => 1,
    SITENAME => "My Awesome DW Site",
    # ...
};
# ext/dw-nonfree/conf-available/schemes.pl

use DW::Config::FromHash qw( $CONF );

# Manually append schemes
$CONF->{SCHEMES} = [
    @{$CONF->{SCHEMES}},
    { scheme => 'neato', 'title' => 'Neato' },
    # ...
];

{
    # ...
    # Or, a potentially abstracted way to add things
    add_SCHEMES => [
        { scheme => 'neato', 'title' => 'Neato' },
    ],
    # ...
};
# etc/conf-available/defaults.pl

use DW::Config::FromHash qw( $CONF );

my $www = "www.{$CONF->{DOMAIN}}";
{
    DOMAIN_WEB => $www,
    SITEROOT => "http://$www",
    # ...
};

Merging, and Post-Merge

As mentioned, the config files would be loaded and merged in a manner similar—if not entirely identical—to Config::FromHash.

After the config files are loaded and merged, it would be the responsibility of the Config system to populate all of the appropriate variables in the LJ and DW packages.

Pros

Much simpler to use! You can create a file to override a single value and re-use the existing configuration for everything else. And it works more like you'd expect if you're used to conf.d directories.

Easier manual testing. While automated tests are obviously best, if you need to test something works without and without X service, you can add and remove a symlink to a conf file enabling that service, restart apache, and poke at things.

Paves the way for better support of plopping things into ext/ and having it work. No more "copy these config values into your existing file", just symlink and go.

Cons

Harder to fully comprehend. It's more files floating around, more state to keep track of (-available, -enabled, symlinks galore!).

It's dramatically different, and converting an existing installation would be a pain. (But see below.)

Config reloading (see start_request_reload in Config.pm) is more involved. Far more files to stat, and a lot more work to reload them all. One possibility would be to drop config reloading: how often are config changes made that don't involve a code change that would necessitate restarting apache anyway? ($SERVER_DOWN maybe? But that could easily be converted into a flag file check.)

Not Breaking Existing Installations

It would be preferable to avoid breaking existing installations. I think this is possible: after performing the above, follow that up by running the current config system. While that does mean having multiple config systems running, it gives people time to migrate at their leisure, rather than breaking things immediately.

After some time with the new system, we could then add deprecation notices in the event the old system is still in use. After sufficient time has passed, we could then eliminate it entirely.

Or, we could treat it like ripping off a band-aid and break things and be all "hey, sorry about the one-time pain but we're eliminating the smaller pains you almost never have anyway because really how often do we change these things?".

Why Not Just //= Everything?

One thing you might be thinking is "Well, why not just //= everything in the default config*.pl files?

That's definitely much easier to implement! And it brings with it many of the same benefits—people could simply add their overrides to config-local.pl or config-private.pl and never need to create or edit a config.pl (4f8258a does that for @LANGS, it's totally viable).

One of the drawbacks of that approach is that it requires a developer updating the default config*.pl files to never make a mistake. Accidentally used = instead? Tried to use //= to set a list, even though //= only works for scalars? Well, now things are quietly broken in other people's installs. By automating the merge behavior, we can largely avoid that. Whether the additional complication of a split config brings enough benefits over conditional sets to be worthwhile is another matter.

Thoughts? Questions? Alternative proposals?

kaberett: A sleeping koalasheep (Avatar: the Last Airbender), with the dreamwidth logo above. (dreamkoalasheep)
[personal profile] kaberett
Hello folk!

A reminder that I am running a Dreamwidth contributor weekend on the 14th of May, with spillover to the 15th. To get a sense of what goes on at these events, you can take a look at the November event summary and the February event summary.

If you need the physical address, please let me know and I'll PM it you along with instructions on how to get here by public transport. This is not the same address as the last time I hosted, so please do make sure you know where you're going!

If you'd like to attend remotely, find us on IRC or add me on Skype (ekabrett): I'm intending to have a spare machine running a video Skype call to interested folk from the corner of one of the rooms from about 11am on the Saturday (i.e. if you're attending in person and would rather not participate in the Skype call this will be avoidable).

More logistics! )
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)
[personal profile] sophie
As a reminder, the Dreamhack machine is going to be taken offline at some time between 1am EDT and 6am EDT on April 28th for up to an hour, as the datacenter will be doing maintenance work!

You can use the links in the above paragraph to check when this is in your local timezone.
pauamma: Cartooney crab holding drink (Default)
[personal profile] pauamma
It's time for another question thread!

The rules:

- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)
[staff profile] denise
The datacenter where the Dreamhack box is hosted will be taking the machine offline for up to an hour on the morning of April 28, sometime between 1AM and 6AM EST, for datacenter maintenance.

I'll try to remember to post a reminder closer to the date, but if I don't, somebody either poke me or post the reminder!
kaberett: A sleeping koalasheep (Avatar: the Last Airbender), with the dreamwidth logo above. (dreamkoalasheep)
[personal profile] kaberett
... well I meant to get this code tour together before the code push went live, but I totally didn't.

AND THEN, right, this unruly rabble of devs, would you believe it, wrote more fixes post-push. RUDE.

Which is to say, this code tour is getting separated out into fixes that are live on the site, and fixes that will be going into the next push...

... and, of course, a warm welcome to [github.com profile] dteklavya, whose first patch (I think!) is in this code tour!

Already up and running! )

For next time! )

13 total issues resolved
Contributors: [github.com profile] azurelunatic, [github.com profile] cesy, [github.com profile] chrisboyle, [github.com profile] dteklavya, [github.com profile] kareila
kareila: Rosie the Riveter "We Can Do It!" with a DW swirl (dw)
[personal profile] kareila
Every few months, I run through [site community profile] changelog compiling a list of who has been contributing patches to our code repository, with the understanding that this is not a competition, or any sort of "high score" list. It's intended as a guide for casual developers, to discern not only our most prolific contributors, but also those who have contributed to the project most recently and therefore would be more likely to provide a timely, informed response to development questions. That is why the list is sorted by "Latest" instead of "Changes".

In general, one commit on Github equals one point in the "Changes" column, but fractional points are awarded for collaborative efforts — the most common example being a new S2 theme, where usually half credit is awarded to the theme author and the other half to the person who converts the theme into a code patch. Due to the nature of development, some changes are massive contributions of new code, and others are tiny tweaks; there is no correlation with the amount of effort involved. We are grateful to everyone who helps to improve Dreamwidth, in ways large or small.

I last compiled this list at the beginning of October. Since that time, we have welcomed four new contributors: [github.com profile] fastbean-au, [github.com profile] ljacob, [github.com profile] chrisboyle, and [github.com profile] srukle. Congratulations and thank you again!

  #  User                      Changes     Latest
  1. kareila                     946.5     Fri Apr 01 07:28:03 2016 UTC
  2. azurelunatic                    8     Mon Mar 28 05:54:30 2016 UTC
  3. srukle                          7     Wed Mar 23 16:44:54 2016 UTC
  4. kaberett                       36     Tue Mar 22 12:05:56 2016 UTC
  5. me_and                         29     Tue Mar 15 12:10:57 2016 UTC
  6. sgsabbage                      17     Wed Feb 24 20:45:39 2016 UTC
  7. cesy                        23.83     Sun Feb 21 12:20:46 2016 UTC
  8. sophie                         58     Sun Feb 14 18:19:32 2016 UTC
  9. hotlevel4                      50     Sun Jan 03 18:59:57 2016 UTC
 10. chrisboyle                      4     Sun Nov 08 01:43:26 2015 UTC

 11. ljacob                          1     Sat Nov 07 12:13:45 2015 UTC
 12. fastbean-au                     1     Tue Oct 27 09:13:57 2015 UTC
 13. ninetydegrees              697.93     Tue Oct 20 21:15:19 2015 UTC
 14. mark                        544.5     Sun Aug 30 03:12:20 2015 UTC
 15. pseudomonas                     3     Sat Aug 08 09:45:06 2015 UTC
 16. angelikitten                    1     Wed Aug 05 19:50:20 2015 UTC
 17. exor674                     349.5     Tue Aug 04 21:03:54 2015 UTC
 18. dteklavya                       3     Fri Jul 17 11:51:30 2015 UTC
 19. fu                         2167.5     Tue Jul 14 23:44:50 2015 UTC
 20. momijizukamori             222.66     Thu Jun 25 23:01:08 2015 UTC
The rest of the list... (154 total) )
kaberett: A sleeping koalasheep (Avatar: the Last Airbender), with the dreamwidth logo above. (dreamkoalasheep)
[personal profile] kaberett
TOURING COD. Quite a lot of cod, because this round of code tour contains most of the pull requests that were made during the contributor event at the end of February!

These will all be going live in the next code push.

Read more... )


21 total issues resolved
Contributors: [github.com profile] Sophira, [github.com profile] azurelunatic, [github.com profile] cesy, [github.com profile] kaberett, [github.com profile] kareila, [github.com profile] me-and, [github.com profile] sgsabbage, [github.com profile] srukle
kaberett: Overlaid Mars & Venus symbols, with Swiss Army knife tools at other positions around the central circle. (Default)
[personal profile] kaberett
My previous was INEPT, by which I mean "I am very sorry, I had failed to adequately get my head round familial obligations including celebrating a 98th birthday party"; consequently the dates are instead the 14th and 15th of May, and questions of whether to hold this round in a hackerspace resolve to "no, because I'll have spent a week in the depths of Cornwall" (half a mile down a grass lane outside the village, for serious, and while the neighbour's just paid to have cable laid down the lane my grandfather does not quite believe in the Internet, and whether there's mobile signal at all is entirely dependent on which way the wind is blowing).

So to reiterate, apologies for the misadvertisement, and the next contributor weekend will be the 14th and 15th of May.
kaberett: A sleeping koalasheep (Avatar: the Last Airbender), with the dreamwidth logo above. (dreamkoalasheep)
[personal profile] kaberett
Hi folk,

Per the poll, I will be hosting a Dreamwidth contributor event on the 7th & 8th 14th and 15th of May in London. (November 2015 event announce and summary; February 2016 announce and summary.)

It would be possible to hold the Saturday portion of the event in the cafe at Campus London, an event space in Shoreditch managed by Google -- or to hold it near Oakwood station on the Piccadilly line. The latter's more awkward to get to, but I'd be in a position to provide lots of food; the former is going to be a public (and possibly crowded/noisy) space.

If you'd be curious to try out Campus London as a venue, please let me know by Friday the 18th of March -- I'll need to set up an Eventbrite or similar, and I'll need to be able to provide Campus London with a list of attendees prior to the event, and also to come up with some copy about how hosting a Dreamwidth event will Benefit The Start-Up Community. (If [personal profile] me_and remains the only person expressing an active interest in this I am absolutely delegating the booking to him. :-p)

Cheers!
pauamma: Cartooney crab holding drink (Default)
[personal profile] pauamma
It's time for another question thread!

The rules:

- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
kaberett: A sleeping koalasheep (Avatar: the Last Airbender), with the dreamwidth logo above. (dreamkoalasheep)
[personal profile] kaberett
This was in fact written on the evening of the 28th, but could I resist doing a leap-day code tour? No, no I could not. All aboard!

Read more... )


10 total issues resolved
Contributors: [github.com profile] cesy, [github.com profile] hotlevel4, [github.com profile] kaberett, [github.com profile] kareila, [github.com profile] me-and, [github.com profile] sgsabbage, [github.com profile] srukle.

PS quick reminder that if you'd be interested in attending (in person or telecommuting) a Dreamwidth contributor event in May (at the last one we wrote a lot of patches, found a lot of problems, updated a lot of documentation -- both for developers and the main Dreamwidth FAQ -- and answered a lot of Support requests) please do fill out the poll!
swaldman: A cute fluffy sheep curled up dreaming of Dreamwidth. Labelled "Simon: Bodger". (dw-dev)
[personal profile] swaldman
Hi all,

Testing on my 'hack with a journal in the Abstractia base style, I notice what seems to be an inconsistency:

* If I hit "reply" on an entry, the quickreply box appears, and when I hit "post comment" the comment is posted through AJAXy magic, handled by LJ::Protocol::addcomment.

BUT

* If I hit "reply" on a comment, the quickreply box still appears, but when I hit "post comment" the comment is posted via a page load and talkpost_do.bml.

Is this what's meant to happen? Why the distinction? *how* the distinction? I am confused ;-)

kaberett: A sleeping koalasheep (Avatar: the Last Airbender), with the dreamwidth logo above. (dreamkoalasheep)
[personal profile] kaberett
I'll be hosting again for this one. How exactly I do that is open for discussion, so please do weigh in -- and please do fill out the poll if attending in person isn't an option but you think you'd like to telecommute again!

Poll #17322 London Dreamwidth contributor weekend - May
Open to: Registered Users, detailed results viewable to: All, participants: 9


Which weekends in May might you be able to attend an event?

View Answers

30th April/1st May
4 (44.4%)

7th/8th May
9 (100.0%)

14th/15th May
8 (88.9%)

21st/22nd May
6 (66.7%)

There is the option of finding a central hacker space to host the Saturday portion of the event. If you'll be attending in person, what location would you prefer for the Saturday portion?

View Answers

A hack/maker space in central London
1 (16.7%)

A private home in zone 5 (Piccadilly line)
1 (16.7%)

Don't mind
4 (66.7%)

Other, which I will explain in comments
0 (0.0%)

If the preferred weekend is the 14th/15th of May, would you like a Dreamwidth Eurovision party?

View Answers

Yes
5 (62.5%)

Don't mind
4 (50.0%)

Don't mind provided I don't have to join in
0 (0.0%)

No
0 (0.0%)

Something else, which I will explain in comments
0 (0.0%)

kaberett: A sleeping koalasheep (Avatar: the Last Airbender), with the dreamwidth logo above. (dreamkoalasheep)
[personal profile] kaberett
Attendees: nine-ish

Issues filed: 6

Pull requests made: 15 (and another several mostly-drafted to come)

Support: lots of issues tested, diagnosed, and responded to (mostly by [personal profile] cesy, who's gone up three places on the High Scores board!)

Documentation: one bug specification, two updated FAQs, and a new wiki page

Things baked: one batch of salted caramel brownie; one batch of cornbread

Furthest telecommute: the Australian contingent are still winning this one ([personal profile] swaldman showed up in person this time, so that's the longest physical commute but means he wasn't in the running for a prize for this category ;) )

Next event: sometime in May (poll to follow!)
cesy: "Cesy" - An old-fashioned quill and ink (Default)
[personal profile] cesy
There are certain pages that are unreadable in parts in Chrome on Android, including anything in format=light or more importantly site style. Mobile Chrome has a "feature" called font boost, where any paragraph over a certain length gets enlarged, leaving the rest of the site too small to read. This frequently applies, for example, to a journal post with comments. This is a problem. It applies both to any link from www.dreamwidth.org/mobile/read, and also to following a link from an email notification to a journal post where someone has chosen to display journal entries in site style, which is something I like to do quite often on my phone.

Is there any good way to improve this? Stackoverflow has various hacky CSS fixes, like setting the max-height for the page to something large, but ideally we'd want to limit it to Chrome on Android rather having unintended effects in other browsers.

Is this a valid bug to log, since it makes Dreamwidth pages unreadable on Chrome on Android, or should it go via suggestions since it's mitigating for Google's broken system?

Profile

dw_dev: The word "develop" using the Swirly D logo.  (Default)
Dreamwidth Open Source Development

May 2016

S M T W T F S
1234567
89101112 13 14
15 161718192021
222324 25262728
293031    

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 27th, 2016 08:17 am
Powered by Dreamwidth Studios