Re: [Wikitech-l] Declaring methods final in classes

2019-08-30 Thread Krinkle
On Thu, Aug 29, 2019 at 1:46 PM Aryeh Gregor  wrote:

> On Thu, Aug 29, 2019 at 1:02 AM Krinkle  wrote:
> > What did you want to assert in this test?
>
> In a proper unit test, I want to completely replace all non-value
> classes with mocks, so that they don't call the actual class' code.
> This way I can test the class under test without making assumptions
> about other classes' behavior.
>
>
Using createMock() for an interface or class makes sense to me mostly for
external dummies that are requires for some reason (an anti-pattern that I
think should be avoided. If such a dependency is truly optional and of the
fire-and-forget type, it should have a no-op implementation that is used by
default, like we do with Loggers.

For anything else, it doesn't really work in my experience because PHPUnit
won't actually provide a valid implementation of the interface. It returns
null for anything, which is usually not a valid implementation of the
contract the class under test depends on. As a result, you end up with
hundreds of lines of phpunit-mockery to basically reimplement the
dependency's general functionality from scratch, every time. I have seen
this too many times and fail to see the added value for all that complexity
and maintenance, compared to simply letting the actual class do its work.
Practically speaking, what kind of problem would that test methodology
catch? I believe others may have a valid answer to this, but I haven't yet
seen it. Perhaps it's a source of problems I tend to prevent by other
means. There's more than one way to catch most problems :)

You can draw from that that my definition of "unit" and "integration" are
probably different from yours. To me a unit is a single class, but I think
it's fine to be given other class objects. I see each unit an isolated
subtree, a controlled environment where all dependencies are known,
explicitly specified, injected, and have no side-effects after the test is
done apart from within the objects you created for that test.

-- Timo
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Wikimedia production excellence (July 2019)

2019-08-30 Thread Krinkle
 Read on Phabricator at
https://phabricator.wikimedia.org/phame/post/view/164
---

How’re we doing on that strive for operational excellence? Read this first
anniversary edition to find out!

  Month in numbers

- 5 documented incidents. [1]
- 53 new Wikimedia-prod-error reports. [2]
- 44 closed Wikimedia-prod-error reports. [3]
- 218 currently open Wikimedia-prod-error reports in total. [4]

The number of recorded incidents over the past month, at five, is equal to
the median number of incidents per month (2016-2019). – Explore the data at
https://codepen.io/Krinkle/full/wbYMZK

To read more about these incidents, their investigations, and pending
actionables; check
https://wikitech.wikimedia.org/wiki/Incident_documentation#2019

---

 *️⃣One year of Excellent adventures!

Exactly one year ago [5] this periodical started to provide regular
insights on production stability. The idea was to shorten the feedback
cycle between deployment of code that leads to fatal errors and the
discovery of those errors. This allows more people to find reports earlier,
which (hopefully) prevents them from sneaking into a growing pile of
“normal” errors.

576 reports were created between 15 July 2018 and 31 July 2019 (tagged
Wikimedia-prod-error). 425 reports got closed over that same time period.

---

   Outstanding reports

Take a look at the workboard and look for tasks that might need your help.
The workboard lists error reports, grouped by the month in which they were
first observed.

→  https://phabricator.wikimedia.org/tag/wikimedia-production-error/

Or help someone who already started with their patch:
→  https://phabricator.wikimedia.org/maniphest/query/pzVPXPeMfRIz/#R

Breakdown of recent months (past two weeks not included):

  - November: 1 report left (unchanged). ⚠️
  - December: 3 reports left (unchanged). ⚠️
  - January: 1 report left (unchanged).
  - February: 2 reports left (unchanged).
  - March: 4 reports left (unchanged).
  - April: 10 of 14 reports left (unchanged).
  - May: 2 reports got fixed! (4 of 10 reports left). ✨
  - June: 2 reports got fixed! (9 of 11 reports left). ✨️
  - July: 18 new reports from last month remain unsolved.

---

  Thanks!

Thank you to Aaron Schulz, Ariel Glenn, Brad Jorsch, CScott, Daimona, David
Barratt, David Causse, EBernhardson, Gergő Tisza, James Forrester, Jeena
Huneidi, MarcoAurelio, Roan Kattouw, Stephane Bisson, Tchanders, Tim
Starling, Urbanecm; and everyone else who helped by finding, investigating,
or resolving error reports in Wikimedia production. Thanks!

Until next time,

– Timo Tijhof

---

Footnotes:

[1] Incidents. –
https://wikitech.wikimedia.org/wiki/Special:PrefixIndex?prefix=Incident+documentation%2F201907=0=1=1

[2] Tasks created. –
https://phabricator.wikimedia.org/maniphest/query/9m.NNvBAvuHF/#R

[3] Tasks closed. –
https://phabricator.wikimedia.org/maniphest/query/6sekLiUhHCmq/#R

[4] Open tasks.
https://phabricator.wikimedia.org/maniphest/query/47MGY8BUDvRD/#R

[5] The initial e-mail. –
https://lists.wikimedia.org/pipermail/wikitech-l/2018-July/090363.html
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] m1 (etherpad, bacula, librenms, rt, racktables) db primary master switchover: 10th Sept 16:00 UTC

2019-08-30 Thread Pine W
Hi Manuel,

I'm not familiar with User-Notice tags, but I'll trust your judgment.
Perhaps you could also mention the planned outage of Etherpad in Tech News.

It sounds like this will be a low impact outage, but there is a small
chance that someone will be taking notes on Etherpad during a meeting that
is important to them and they will experience a few seconds of information
loss during the time that Etherpad is read only due to the inability to
write new information while the meeting is ongoing.

Pine
( https://meta.wikimedia.org/wiki/User:Pine )


On Thu, Aug 29, 2019, 06:55 Manuel Arostegui 
wrote:

> On Thu, Aug 29, 2019 at 3:50 PM Pine W  wrote:
>
> > Yes, I tink that a banner would be preferable, but i think that a notice
> on
> > the homepage would be a reasonable backup option.
> >
> >
> Thanks - Unfortunately I don't know if that is possible on Etherpad, I
> don't have the knowledge to do so.
> Maybe I can put an User-Notice tag on the phabricator task, so more people
> would be aware of that brief interruption?
> Again, we are expecting 5-10 seconds of read-only time.
>
> Thanks,
> Manuel.
>
>
> > Pine
> > ( https://meta.wikimedia.org/wiki/User:Pine )
> >
> > On Thu, Aug 29, 2019, 06:28 Manuel Arostegui 
> > wrote:
> >
> > > On Thu, Aug 29, 2019 at 3:05 PM Pine W  wrote:
> > >
> > > > Hello,
> > > >
> > > > Does this mean that https://etherpad.wikimedia.org/ will be
> > temporarily
> > > > read only? That site seems to be somewhat popular for taking notes
> > during
> > > > meetings. If that site will be affected then I recommend that you put
> > up
> > > a
> > > > site notice there, possibly a multilingual one depending on how much
> > use
> > > > the site gets for non-English content.
> > > > Pine
> > > > ( https://meta.wikimedia.org/wiki/User:Pine )
> > > >
> > > >
> > > >
> > > Hello Pine,
> > >
> > > Yes, etherpad will be read-only for a few seconds (5-10 seconds)
> > > I don't know if it is possible to put a banner on Etherpad itself, is
> > that
> > > what you mean?
> > >
> > > Thanks
> > > Manuel.
> > >
> > >
> > >
> > > >
> > > > On Thu, Aug 29, 2019, 04:01 Manuel Arostegui <
> maroste...@wikimedia.org
> > >
> > > > wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > The current primary master for m1 (db1063), which is mostly for
> > > internal
> > > > > services + etherpad isn't in a great healthy status: it is an old
> > host,
> > > > > which needs to be decommissioned and which is having disks failing
> > > pretty
> > > > > much every week (plus disks on predictive failure).
> > > > >
> > > > > We have decided to fail it over one of the newer hosts, db1135:
> > > > > https://phabricator.wikimedia.org/T231403
> > > > >
> > > > > We have scheduled this switchover for: Tuesday 10th September at
> > 16:00
> > > > UTC
> > > > >
> > > > > This failover should be rather quick and would only take a few
> > seconds
> > > > > (while we re-load the haproxy) - during those few seconds, the
> > > following
> > > > > services will be on read-only:
> > > > >
> > > > > bacula
> > > > > etherpadlite
> > > > > librenms
> > > > > puppet
> > > > > racktables
> > > > > rt
> > > > >
> > > > > Communication will happen at #wikimedia-operations
> > > > > If you are around at that time and want to help with the
> monitoring,
> > > > please
> > > > > join us!
> > > > >
> > > > > Thanks
> > > > > ___
> > > > > Wikitech-l mailing list
> > > > > Wikitech-l@lists.wikimedia.org
> > > > > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> > > > ___
> > > > Wikitech-l mailing list
> > > > Wikitech-l@lists.wikimedia.org
> > > > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> > > ___
> > > Wikitech-l mailing list
> > > Wikitech-l@lists.wikimedia.org
> > > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> > ___
> > Wikitech-l mailing list
> > Wikitech-l@lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Code of Conduct committee meeting at Wikimania

2019-08-30 Thread Pine W
+1 on the thanks for the update.

I have some ideas regarding modifications that I would like to propose to
the CoC but I am already stretched among too many tasks, so I am holding
these proposals. I do not want anarchy in technical spaces, and in general
I think that having some version of a code of conduct is good.

I am not sure whether Fae is referring to the chronological age of the
Committee as an organization or to the ages of its human members, though I
think that Fae is referring to the former. Regarding the latter, I'll make
a few comments. I am not very concerned regarding the chronological age of
committee members provided that they have reached the age of majority in
their relevant countries. I am more interested in language skills, publicly
reviewable experience and training in dispute resolution, understanding of
Wikimedia technical processes, emotional temperaments, listening skills,
reading comprehension, writing skills, research skills, demonstrated
willingness to make unpopular decisions (unpopular with WMF and/or
unpopular with a significant minority of community members), and degrees of
affiliation with WMF and the community.

Onward,

Pine
( https://meta.wikimedia.org/wiki/User:Pine )


On Thu, Aug 29, 2019, 14:04 Fæ  wrote:

> Thanks for the update. It's great to see the CoC processes improving
> transparency and potentially accountability to the community.
>
> It's worth noting how old the discussions are, with comments dating
> back more than a year ago, especially in the context of how relatively
> young the committee and the CoC is. Perhaps the members can discuss
> with each other how improvements can be implemented and iterated more
> manageably?
>
> Thanks,
> Fae
>
> On Thu, 29 Aug 2019 at 21:25, Amir Sarabadani  wrote:
> >
> > Hello,
> > The CoC committee had a meeting with four members out of five (Lucie,
> Tony,
> > Tonina, and Amir were at Wikimania and MusikAnimal wasn't present). These
> > notes are the public outcomes of the meeting.
> >
> > * The committee chose Amir as the chair (Amir requested to be the table
> but
> > it got rejected)
> > * The committee is currently composing the anonymized report of its cases
> > and will be published soon.
> > * The committee soon will decide on the two amendments currently under
> > discussion. Feel free to comment on these two:
> > ** Public logging of bans:
> > https://www.mediawiki.org/wiki/Topic:Uikcu1emvmw6e4z8
> > ** Modifications on the appeal process:
> > https://www.mediawiki.org/wiki/Topic:Uay0vz6no8ayac3m
> > * The committee is willing to introduce a new internal role which for
> lack
> > of better term, we call it secretary for now. The role's main
> > responsibility is to help the committee on organizational bookkeeping.
> Like
> > reports, documentation of cases, etc.
> > * At the end, the committee wants to remind people that its role is
> > reactionary and we won't interfere when there's no report. If you see a
> > behaviour you find unacceptable, stand up and send us a report and don't
> > wait for the committee to jump in.
> >
> > Regards,
> > Amir on behalf of the committee
> > ___
> > Wikitech-l mailing list
> > Wikitech-l@lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
>
>
> --
> fae...@gmail.com https://commons.wikimedia.org/wiki/User:Fae
> Personal and confidential, please do not circulate or re-quote.
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l