-
NOTICE: [h] tilgovi force-pushed auth-isolation from 8d3a813 to 9b908fd: https://github.com/hypothesis/h/commits/auth-isolation
-
NOTICE: h/auth-isolation 9b908fd Randall Leeds: Tighten up the identity and auth interaction...
-
GitHub168 has left the channel
-
nickstenn
tilgovi: i read the article on auth/authz/identity in pyramid -- really interesting
-
tilgovi
seemed smart to me
-
a few nice insights
-
I should annotate it
-
"knob on a knob"
-
nickstenn
i think i might need to reread it a few times...
-
scharf joined the channel
-
tilgovi
nickstenn: it's wonderful how it well it actually maps to what i'm doing on the frontend right now
-
i was pleasantly reminded when I brought it up for you
-
scharf has quit
-
Treora joined the channel
-
nickstenn
tilgovi: Treora and I are discussing this reindexing stuff
-
I agree with your latest comments
-
except for the recommendation that it go into run.py
-
tilgovi
the most recent suggestion with run.py?
-
no?
-
okay, a different script
-
nickstenn
run.py is supposed to be an example application, not the canonical way of running the thing
-
tilgovi
makes sense to use the .cfg, though?
-
nickstenn
so yes, use the .cfg for the current source
-
and a reindexer where you simply specify the destination and (optionally) an alias
-
tilgovi
old new --alias would have been okay, too
-
nickstenn
python reindex.py annotator-2014-10-03 --alias annotator
-
tilgovi
but i think I like this
-
nickstenn
tbh I'm okay with either
-
Treora
by the way, I think I did not use the .cfg because it's quite flask-specific.
-
tilgovi
m
-
so you're right
-
Treora
but other than that it is indeed desirable that the information is read from the config file
-
tilgovi
although it does appear to just parse as python
-
so execfile for instance
-
but
-
ugh
-
nickstenn
okay, compromise
-
sod the config file
-
tilgovi
lol
-
old new --alias?
-
nickstenn
python reindex.py old new [--alias aliasname]
-
tilgovi
yeah
-
nickstenn
so very close to store#103
-
vannevar
-
nickstenn
but make the reindexer a script
-
tilgovi
thanks for your patience with this, Treora
-
I know I'm insane about this stuff
-
Treora
thanks for yours
-
nickstenn
if you get a chance to do that, Treora, fab
-
if not, I'll do it later
-
Treora
nickstenn: isn't that closer to #93?
-
nickstenn
store#93
-
vannevar
-
Treora
just the command line syntax is different: $ python reindex.py --reindex old new --alias new old
-
nickstenn
yes, you're right
-
but the CLI can be simplified substantially
-
make --host the option
-
tilgovi
yeah
-
oh
-
nickstenn
and new and old are positionals
-
Treora
though this way you can nicely separate the steps, do an alias without doing reindex for example
-
nickstenn
Treora: if you're that user, you can just use curl :)
-
this is about providing an easy path for people who don't understand ElasticSearch, right?
-
tilgovi
yah, this is the essential point
-
Treora
yes
-
tilgovi
it's the balance that I felt was off
-
trying to do too much
-
when at that point it's hard to decide what's best for the developer anymore
-
because trade-offs and things
-
Treora
indeed
-
nickstenn
the steady state, when 'annotator' is already an alias to a dated index, should look like:
-
python reindex.py --host localhost:9200 --alias annotator annotator annotator-$(date +"%Y-%m-%d")
-
tilgovi
uh
-
you have an extra "annotator" after --alias or no?
-
nickstenn
tilgovi: that's the <from>
-
tilgovi
oh
-
i see
-
my brain inserted an old/new before --alias
-
Treora
from annotator to annotator?
-
tilgovi
nah, that's from annotator to annotator-blahblah
-
with the --alias annotator
-
nickstenn
you reindex from an alias to a dated index, and then update the alias to point to the (new) dated index
-
Treora
yes ok this behaviour is good, there is just the issue when annotator was not an alias, but a real index
-
nickstenn
Treora: that's fine
-
tilgovi
then you don't specify --alias
-
nickstenn
you blow up
-
tilgovi
or you learn :-D
-
nickstenn
you can't create an alias on top of an index, and we can't make the tool pretend that we can :)
-
that's why I did try and clarify that that was the "steady state" usage
-
tilgovi
q how do you feel about running reindex before and after the alias update?
-
fine if you'd rather not
-
nickstenn
no, don't
-
Treora
why twice?
-
tilgovi
writes can happen between reindex finishing and the alias command
-
doing it twice catches those
-
it's what i always do
-
nickstenn
Treora: because the (reindex, update alias) sequence isn't atomic
-
but again
-
tilgovi
and neither are writes to es
-
nickstenn
this is for joe average user
-
tilgovi
yah
-
nickstenn
who doesn't have traffic so wild that they have this problem
-
tilgovi
:-P
-
so, us :-D
-
nickstenn
we can certainly document the limitations of the tool
-
but KISS/YAGNI, etc.
-
tilgovi
yepyepyep
-
nickstenn
Treora: have we confused you even more or is that clear now?
-
Treora
I have all the time tried to also make things work when we're not in steady state, that's why I came up with more complex scripts
-
GitHub193 joined the channel
-
NOTICE: [h] tilgovi force-pushed auth-isolation from 9b908fd to 7e8f786: https://github.com/hypothesis/h/commits/auth-isolation
-
NOTICE: h/auth-isolation 7e8f786 Randall Leeds: Tighten up the identity and auth interaction...
-
GitHub193 has left the channel
-
so one can delete the old index, and then create an alias
-
nickstenn
Treora: it still does work
-
python reindex.py annotator annotator-$date
-
and update your config file
-
Treora
yes that's a workaround
-
nickstenn
if you want to do fancy shit with indices, you should probably understand how indices work first
-
Treora
ok so then that workaround is acceptable.
-
that simplifies the whole thing a lot
-
nickstenn
definitely acceptable
-
firstdate joined the channel
-
scharf joined the channel
-
scharf has quit
-
Treora
nickstenn: #93 is using your suggested command line syntax now
-
nickstenn
awesome, thank you Treora
-
Treora
I need to run
-
Perhaps some of the documentation of #103 could still be useful? If it's okay I'll leave the finishing touch to you
-
cheers
-
Treora has quit
-
savesoff_ has quit
-
savesoffomak joined the channel
-
Sebastien-L has quit
-
savesoffomak has quit
-
scharf joined the channel
-
firstdate has quit
-
scharf has quit
-
csillag joined the channel
-
GitHub50 joined the channel
-
NOTICE: [h] tilgovi force-pushed auth-isolation from 7e8f786 to eacede6: https://github.com/hypothesis/h/commits/auth-isolation
-
NOTICE: h/auth-isolation b601178 Randall Leeds: Tighten up the identity and auth interaction...
-
NOTICE: h/auth-isolation 50a3dd1 Randall Leeds: Test the events emitted by the auth controller
-
NOTICE: h/auth-isolation 3658025 Randall Leeds: Move session service back to h module...
-
GitHub50 has left the channel
-
Sebastien-L joined the channel
-
nickstenn
tilgovi: I recently heard about this thing called sleep
-
it's pretty cool
-
tilgovi
yeah, i'm doing it now
-
nickstenn
:)