►
From YouTube: Dependency Container Behaviors 2020-06-08
Description
comparing `dependencies` container behaviors, between `master` and `alternative-wait-for-deps` of CNG
https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/433
A
A
This
is
impacted
by
things
that
are
coming
in
the
coming
milestone
and
also
will
be
beneficial
not
only
for
our
own
users
but
our
own
production,
and
this
is
where
this
all
stems
from.
The
general
work
is
to
try
and
replace
the
use
of
break
to
check
all
the
various
dependencies.
The
database,
the
Redis
instance
that
migrations
are
all
up
to
date,
where
possible,
using
Ruby,
but
not
all
of
breaking
rails.
Most
of
our
rake
tasks
actually
bring
up.
All
of
this
information.
A
So
the
idea
is
I'm
going
to
take
the
master
version
of
the
charts
I'm
going
to
install
the
current
CD
master
and
then
check
the
amount
of
time
and
resources
it
took
to
actually
spawn
the
dependencies
container
and
the
containers
thereafter
I'm
going
to
go
ahead
and
do
it
help
upgrade
with
the
containers
that
have
the
changes
I've
recently
made
it
play
and
hopefully
seeing
a
noticeable
viable
path
forward
with
the
work
that
we're
doing
so
far.
This
is
all
pretty
much
exploratory,
but
kind
I
want
to
walk
through
it
all.
A
That
do
its
work,
while
that
fires
up
real
quick
I'll
give
a
quick
rundown
on
what
the
biggest
changes
here
are.
So
the
first
thing
is
the
wait
for
depth
scripts.
Currently,
the
way
every
container
is
made,
it's
actually
calling
to
get
lie,
break
loading
all
the
rake,
all
the
database
adapters,
everything
related
to
it
and
then
attempting
to
go
hey
database.
1
are
you
there
do
you
have
a
version
at
all
and
what
is
it
we're
still
doing
a
similar
behavior
in
that
we're
calling.
A
Go
find
out
what
the
database
is
and
knowing
either
we
can
connect
to
it
or
not,
and
then
we
might
get
a
version
back.
So
in
that
regard,
we're
doing
the
same
thing,
but
instead
of
doing
a
full-blown
rate
call
instead
we're
coming
over
this
currently
poorly
named
rails,
DB
check
and
we're
doing
nothing
more
than
loading.
The
absolute
minimum
amount
of
Ruby
that's
required
using
just
require
bundler
setup.
A
A
A
This
leaves
it
agnostic,
which
one
is
trying
to
check,
and
then
we
actually
use
active
records
base
just
to
establish
the
connection
connect
right
to
it
because
we're
handing
of
the
configuration
we
already
know
and
then
actually
asking
the
active
record
migrator
for
its
current
status.
That
works,
whether
you're
using
the
structure,
dot,
sequel
or
the
classic
migrations.
A
Right
now
down
the
wait
for
depths,
assuming
that
the
check
schema
version
returns
a
pass,
this
is
back
so
zero
is
a
pass.
It
will
then
turn
around
and
actually
check
the
Redis
connectivity.
Yes,
it
feels
like
a
two-stage
and
if
you
have
a
Redis
problem,
you'll
end
up
checking
the
database
and
then
checking
Redis
in
that
word.
At
the
moment
this
is
strictly
a.
This
is
the
shortest
way
to
ensure
that
we
actually
have
all
of
the
dependencies
working
while
the
two
dependency
checks
are
technically
operating
separately
right
now.
A
Otherwise,
it's
a
wrapper
script
as
it
has
been,
so
we
need
to
be
able
to
pass
through
another,
whatever
the
execution
actually
is,
which
is
one
of
the
reasons
this
hasn't
been
rewritten
entirely
in
Ruby.
Is
we
need
to
use
the
shell
exec
function
where
we
actually
replace
the
current
process
with
the
new
child
process
which,
as
far
as
I
knew
Ruby,
doesn't
have
a
methodology
for.
A
A
Okay,
so
we
have
everything
actually
up
and
running.
At
this
point,
we
have
a
pretty
much
like
pre-made
query
to
find
out
how
many
seconds
it
actually
took
for
the
dependencies
pod
to
come
up
based
on.
When
did
it
actually
start
the
process,
and
when
did
it
finish
that
process
so
I'm
actually
going
to
check
the
web
services
pons
versus
sidekick?
In
this
case,.
A
Because
we
have
more
than
one
so
here
we
have
one
took
10
ish
seconds
and
one
took
12-issue
seconds,
I,
say
ish,
because
I
can't
get
any
smaller
resolution
on
what's
actually
happening
here.
So
the
easiest
way
for
me
to
replicate
exactly
how
much
time
did
this
actually
take
is
to
actually
to
pop
into
a
given
pod
and
actually
run
the
wait
for
depth
script.
A
Someone
actually
took
a
little
longer
that
time
round,
as
you
can
see
here-
the
real
versus
user
here,
yeah,
12
and
1/2
plus
seconds
to
actually
run
the
wait
for
depth
and
even
though
I'm
in
a
fast
growing
container,
which
means
it
has.
You
know
all
the
containers
at
this
point
have
food
snap
and
everything
else.
A
A
Okay,
so
we
went
over
what
the
rails
DB
check
is,
and
it's
pretty
much
quick
and
dirty
is,
did
I
have
a
connection
message.
Connection
error.
If
so,
actually
tell
us
what
the
error
was,
because
if
you
use
P
sequel
and
you
you
get
a
failure,
you
don't
get
told
what
the
error
message
is
at
the
command
line
so
really
problematic.
It's
the
one
bonus
to
actually
doing
this
as
a
part
of
Louie.
Instead,
it's
we
can
actually
find
out
exactly
what
the
error
codes
coming
backward
from
the
connector.
A
Assuming
that
passes,
we
know
we
have
the
return.
Value
is
actually
the
migration
status,
and
then
we
go
back
into
where
our
existing
pattern
of
doesn't
match
to
what
we
have
coby's
wise.
Can
we
move
forward
if
the
database
is
newer
than
our
code
base?
So
we
not
haven't
we
go
into
real
to
this
Redis
paint
instead
of
having
rails
just
check
everything.
A
That
is
actually
consuming
the
rescue,
dot,
yml
and
installing
should
say
pulling
everything
out
of
that
doing,
necessary
transformation
to
that
format
and
then
actually
checking
all
of
those
rescue
format
files
simultaneously
by
doing
it
through
threading.
So
the
first
thing
we
do
is
actually
pop
into
that
config
directory
and
pull
all
of
the
rescue
format
files,
so
rescue
dot.
M
owns
the
primary
Redis
Redis
dot
dot.
Star
are
all
the
various
split
cues
that
we
have,
whether
that's
the
cache
or
the
bench.
A
A
The
output
it.
Basically,
these
are
actually
the
files
we're
about
to
check
and
then
goes
in
and
uses
the
files
map
to
actually
run
the
threats
and
then
pull
the
result
back
from
those
threads,
those
so
that
we're
not
doing
load
all
the
files
and
then
pass
the
object
around
we're
loading
the
file
after
we're
in
the
thread
and
then
performing
the
check.
A
This
config
deep,
symbolized
Keys
is
actually
a
rails
item.
This
isn't
native
to
Ruby
itself,
so
I
did
have
to
pull
in
a
chunk
of
active
support
specifically
to
get
this
functionality,
and
the
reason
for
this
is
the
Reta.
Sardi
module
will
actually
happily
consume
a
rescue
config
for
everything
except
sentinel
support.
So
if
you
want
sentinel
to
actually
work
with
the
way
our
format
is,
when
we
write
it
out,
you
actually
have
to
go
back
and
symbolize
those
keys,
basically
meaning
instead
of
having
a
string
that
is
all
off
at
numerix.
A
You
actually
have
to
put
a
colon
in
front
of
it
for
ruby
standards,
so
that
basically
says
go
through
all
of
my
structures:
take
any
keys
and
make
a
matching
one
that
has
the
colon
in
front
so
symbolizing
it
in
this
particular
case
from
doing
that,
we
get
instant,
rena
support
or
read
us
with
sentinel
support,
and
I've
confirmed
that
it
works
with
and
without
SSL.
And
then
it's
very
simple
in
this
particular
regard
is
attempt
to
just
ping
the
server
which,
if
you're,
using
a
straight
server,
that
means
it
literally
just
connects
pings.
A
It
expects
to
get
poem
back
if
that
fails.
For
any
reason,
we
catch
that
error
omit
what
that
was
and
say
that
this
particular
server
from
this
file
failed
and
then,
if
it
goes
through,
obviously
it'd
be
nice
to
the
server
and
disconnect
like
a
good
person
and
say
that
this
one
actually
passed.
This
is
for
the
sake
of
logging,
the
output.
No,
this
is
not
in
any
kind
of
structured
form.
We
can
revise
that
in
the
future.
A
The
important
part
is,
we
know
exactly
what
happened
and
which
server
the
error
message
might
have
come
from
now.
The
format
that
you're
seeing
here
of
connected
to
URL
from
file
is
which
is
a
from
file
through
host.
This
is
specifically
because
of
sentinel,
because
you
can
have
URL
that
is
Redis
colon,
slash,
slash
my
master
and
coming
from
rescue
dot
yml,
and
you
don't
actually
know
what
that
was,
because
the
URL
tells
you
what
the
agreed-upon
master
name
is
for
all
of
the
sentinels.
A
So
by
having
a
through
Redis
client
host,
we
can
actually
get
back
exactly
which
reddit
server
it
was
communicating
with
when
it
failed
to
connect
to
it.
Just
in
the
off
chance
that
you've
got
one
node
that
gets
flaky
on
you
and
it
runs
again.
Sentinels
return
a
different
master
and
that
we're
happy
again.
A
Make
use
of
the
git
lab
version
flag?
That's
for
development,
exactly
like
this,
not
for
production
use
in
case
anybody
ever
watches
this
in
the
future.
Don't
use
this
induction,
so
I'm
gonna
install
the
exact
same
configuration
I
just
did
by
telling
it
hey,
pull
the
existing
values
from
this
deployment
and
pass
it
into
my
current
settings,
but
also
add
in
get
lab
version
to
match
my
branch
name.
So
that'll
actually
tell
to
pull
the
CNG
containers
that
match
this.
A
A
A
A
And
we
got
the
new
output,
as
I
said,
is
we're
checking
a
Redis?
These
are
the
two
files
that
we're
going
to
check
and
then
it
goes
and
checks
those
in
parallel
in
the
event
that
you
have
five
of
these,
it's
entirely
possible
that
the
list
would
come
out
of
order.
Hence
why
the
output
format
looks
the
way
it
does
so.
The
first
run
took
about
3.7.
A
A
B
A
A
A
Right
I
can
actually,
fortunately,
disable
boot
snap
and
then
show
you
that
fact.
So
if
I
do.
A
A
So
I
mean
we
need
to
stop
and
think
take
this
into
account
that
in
combination
with
boot
snap,
this
is
pink
boots.
Nut
makes
it
a
significant
chunk
better
and
then
these
iterations,
when
they
are
finally
ready
to
go
in
because
there's
a
lot
of
things
that
have
to
be
taken
into
account,
we'll
have
a
drastic
impact.
A
There
we
go
that's
the
fastest
one,
we're
gonna
get
is
the
ten
point
four
seconds
and
that's
doing
essentially
the
same
job
as
the
the
wait
for
depth.
Scrip
does
now
that
it's
calling
two
separate,
rubies
and
I
mean
at
the
moment
I'm
still
firing
up
two
instances
of
Ruby.
So
when
we
get
to
the
point
where
I
can
try
to
integrate
those
two
pieces
together,
as
DJ's
pointed
out,
there
is
actually
a
method
to
get
kernel
exact.
A
That's
fewer
I/o
aids,
that's
fewer
cycle
times.
That's
fewer
stack
allocations,
the
more
we
can
get
done
faster,
so
I,
don't
think
we're
ever
going
to
get
below
a
certain
minimum
speed.
I
know
that
if
I
do
raw
commands
that
like
read
a
CLI
ping,
which
does
not
work
with
sentinel
by
the
way
that
you
can
get
back
to
fire
off
in
about
a
quarter
of
a
second
with
full
startup,
10x,
round-trip
response
and
PC
will
play
it.
A
Well,
in
terms
of
GG's
account
regards
threads
dot.
Joint
yeah
I
probably
could
do
that.
This
is
very
much
a
kind
of
quick
and
dirty
and
I've
never
actually
done.
Threading
and
Ruby
before
so.
I
had
a
dump
joint,
but
then
I
got
some
like
wonky
patterns
out
of
it.
I
didn't
look
into
it
too
deeply,
mostly
because
they
generally
responded.
Pretty
quick,
so
I
have
to
try
it
a
little
higher
latency
environment
see
what
happens.
A
So
one
of
the
things
this
does
not
take
into
account-
and
this
is
where
the
complication
comes
into
play-
is
that
in
thirteen
point
one
so
this
milestone,
and
what
I'm
working
on
this
week
is
the
implementation
of
load
balancing
for
the
database.
Now
the
reason
this
is
complicated
and
the
reason
I
have
it.
As
a
note
here
in
the
demo
notes,
is
that
the
load
balancing
is
not
made
of
two
release,
not
ADA,
to
active
record,
it's
actually
a
middleware
that
we
have
put
in
place
by
our
own
code.
A
The
less
I
pull
in
the
faster
it
runs
and
if
I
can
skip
asking
for
that
section
of
modules
based
on
whether
or
not
the
configuration
says
that
we're
using
a
load
balancing
that'll,
give
us
some
performance
behavior
for
the
people
that
are
not
the
biggest
trick
is
again
the
fewer
things
we
load,
the
better
we're
going
to
get
so.
The
question
is
being
a
middleware:
how
do
we
do
that
without
loading
all
of
rails,
to
get
that
middleware
shim
set?
A
That's
all
I
really
have
to
show
today
is
that
that
actually
does
work
and
that
it
happens
significantly
faster
than
you
can
get
break
to
fire
up.
There
is
a
way
to
get
rate
to
fire
faster
by
the
way,
which
is
to
tell
it
not
to
use.
The
database,
however,
can't
do
that
here.
So
there's
not
a
lot.
We
can
get
around
them.
B
Like
the
I,
like
the
approach
you're
taking
there
Jason,
especially
well,
it
looked
like
for
Redis
we
needed
to
pull
in
the
Ruby
as
well.
In
order
to
get
that
sentinel
stuff
working
like
you
said,
the
Redis
ping
wasn't
working
without
it,
so
it
seems
seem
necessary
there,
but
especially
for
the
database
side
of
it
and
calling
current
version.
B
Certainly
we
we
could
like
we
could
just
use
sequel
as
we
know
these
tables
and
stuff
like
that,
and
it's
less
the
sequel.
That's
the
problem
and
more
the
other
potential
config
items
that
people
have
managed
to
get
into
their
database
dot
yeah
mo
that
make
a
little
bit
more
fragile
if
we
had
had
to
interpret
those
settings
versus
just
using
what
you've
done
here
with
active
record.
B
A
B
You
to
change,
you
did
here
for
the
for
the
database.
It's
interesting.
We
last
release
in
13.0
we
had
on
the
omnibus
side,
we
had
discussion
around
checking
the
database
version,
but
we
didn't
we
end
up
not
doing
it
for
$13
in
omnibus
instead
put
a
check
just
into
the
rails.
Codebase
are
the
reason
we
didn't
put
into
omnibuses,
because
we
didn't
have
a
clear
idea
of
what
this
code
would
look
like
in
order
to
read
the
database
demo
and
we
didn't.
It
was
kind
of
the
same
thing.
B
A
Technically,
we
can
make
it
a
rake
task,
but
when
we
do
that
this
is
this
shows
one
area
of
ruby
and
rake
that
I'm
not
100%
sure
on.
When
we
do
that,
we
have
to
be
super
careful
about
the
number
of
things
that
we
actually
touch
right.
This
is
this
is
an
example
of
this
is
how
much
time
you
could
save
even
spinning
up
two
separate
instances
at
Ruby
by
just
not
touching
all
of
that
stuff.
A
So
if
there
is
a
safe
way
to
get
raped
to
fire
up
and
reduce
the
number
of
things
that
loads
explicitly,
so
that
it's
only
loading
enough
to
gather
the
configuration
it
needs
and
actually
execute
the
query,
it
needs
and
not
touch
everything
else.
Then
that
could
be
a
way
forward
and
this
could
be
moved
directly
into
the
codebase.
A
But
then
we
we're
into
that
touch
base
on,
should
the
application
start
or
refuse
to
start
if
it
can't
reach
Redis,
because
right
now
the
application
is
quite
happy
enough
to
just
start
up
without
Redis
there,
not
a
brilliant
idea.
It
does
get
weird
until
Redis
shows
up,
but
it
it
will
just
happily
start
up
because
it
will
retry
until
it
gets
it.
A
You
might
get
a
few
five
hundreds
until
that
occurs,
but
it
won't
just
outright
die,
whereas
if
the
application
is
starting
up-
and
you
don't
have
a
database
yeah,
no
that's
a
bad
day
because
he
can't
look
at
settings
all
the
initializers.
Well,
not
all
the
initialized,
but
a
significant
portion
of
the
initializers
do
something
with
the
database
and
data
loading.
A
All
right
well
we're
in
five
past
the
half-hour,
and
we
do
have
another
item
coming
up
on
the
calendar.
If
we
don't
have
any
other
questions
or
comments,
I'll
go
ahead
and
wrap
the
demo
up
for
the
day.
Anybody
interested
the
notes
are
attached
to
the
calendar
item.
Otherwise
we
do
have
them
cross-linked
and
we'll
have
this
up
on
unfiltered.
I
have
a
good
one.
Thanks,
Jason.