►
From YouTube: 2023-02-09 Release Group pair programming
Description
Andrew Fontain and Andrei Zubov from the release team were going through some first steps of implementing a feature for the new environment details page: https://gitlab.com/gitlab-org/gitlab/-/issues/388384
This video highlights the initial set-up, managing feature toggles for local dev environment, using GraphQL api and addressing EnterpriseEdition specific features in development.
A
Hello,
everyone.
This
is
yet
another
pair
programming
session
from
the
release
group
and
today
it's
Andrew
Fontaine
and
me
Andrew,
zubov,
the
front-end
developers
and
we
are
going
to
dive
a
little
bit
deeper
into
the
implementation
of
the
following
picture.
It
is
implementation
of
deployment,
approval
action
for
the
environment
Details
page,
so
we
are
currently
implementing
the
or
rather
moving
the
implementation
of
the
existing
page
from
the
Ruby
unrails
Hamel
implementation
to
ugs
implementation
of
the
same
page,
and
the
page
in
question
is
the
following
ones.
A
So
this
is
the
old
version
of
the
page,
and
you
will
see
over
the
course
of
our
session
tonight
the
new
version
of
the
page
and
also
how
to
work
with
feature
toggles
and
so
on.
A
C
C
Yes,
let's,
let's
turn
the
flag
on.
A
But
before
we
do
that,
maybe
you
could
also
help
me
a
little
bit
to
set
up
the
test
data
right,
so
I
would
like
to
actually
see
somewhere
in
the
environments
the
the
button
that
we
are
going
to
implement.
So
we
make
through
that
we
get
the
right
thing
right.
A
So,
according
to
this
documentation
that
anyone
can
also
see
in
the
docs
gitlab
or
protected
environments,
we
should
be
able
to
set
it
up
through
settings
in
and
the
ICD.
This
feature
is
only
available
for
Enterprise,
Edition
and
I.
Have
it
set
up
locally,
and
we
also
have
the
instruction
in
the
developing
gate
light,
how
to
do
it
locally
for
your
development
setup.
A
So
we
can
expand
it
and
yeah
I
actually
assigned
the
protected
environment
or
production
over
here,
but
I'm
not
sure.
If
I
need
to
do
anything
else,.
C
C
Yes,
we
go
to
cicd,
oh
actually,
that's
not.
There's
there's
one
more
thing:
we
have
to
do
actually
you're
right.
We
have
to
go
to
the
yeah
mobile
file
or
I.
Have
this
set
the
the
job
to
have
a
manual
period.
A
B
C
I
think
the
the
yaml
file
is
simple,
so
it'll
create
it
would
create
the
job
anyways.
So
now,
if
we
go
to
the
main
environments
page
and
we
extend
production,
there
should
be
a
line
waiting,
Forest
excellent
and
if
we
could
yeah
the
deployments
page
or
the
environment
Details
page,
this
is
the
pipelines
page
very
similar.
Looking
I
know.
C
Also
see
yes,
there's
one
from
the
MR
and
from
the
merge
perfect.
They
have
the
little
thumbs
up
at
our
right.
B
A
Amazing,
then,
what
shall
we
turn
the
feature
flag
on
to
see
the
new
version
of
the
page
and
start
our
implementation
yeah?
Let's
do
it
great
so
in
order
to
turn
the
feature
flag
on,
and
we
also
have
it
documented,
but
to
save
you
some
time
you
just
use
the
rails
console
which
you
can
access
with
this
rails
here
and
then
it's
basically
as
simple
as
feature
enable,
and
then
you
put
the
name
of
the
feature
flag.
You
are
interested
in.
In
our
case,
it's
no
Iron
Man.
A
So
that
is
enabled
so
very
soon
you
should
actually
see
yeah.
This
is
the
new
version
of
the
page,
and
these
are
our
new
tool,
deployment
pipelines
which
are
in
this
waiting
status.
A
Amazing,
so
I
guess
we
need
to
fetch
the
data
for
this
guy
to
even
understand
that
this
environment
has
some
approval
spending
right.
B
A
So
this
data
is
fetched
with
the
graphical
and
we
use
we
use
this
query
over
here,
which
is
called
environment
details
query.
A
It
is
pretty
long
with
a
lot
of
stuff
there,
which
we
probably
later
will
split
in
some
fragments,
but
right
now
it's
like
that.
So
how
do
we
get
the
approval
information.
C
So,
on
the
in
yes,
the
approval
summary.
Yes,
we
want
to
fetch
the
approval
summary.
C
Yeah
and
we'll
watch
we'll
want
a
status
we'll
want
the
total
pending
approval,
count
and
we'll
want
the
total
required
approvals.
A
A
C
A
This
guy
actually
prevented
all
the
other
approvals
from
going
or
like
deployments
now.
If
I
just
commented
out,
then
oh
no,
no,
but
this
is
from
user
permissions.
A
C
This
week,
the
permissions
thing
the
permissions
is
good.
It's
strange,
yeah.
A
Actually,
I
always
keep
bumping
into
something
like
that
for
this
query
in
various
cases
had
to
work
around
it,
for
example
like
or
pagination
I
couldn't
request.
A
B
A
B
C
A
Is
it
like
probably
blocked.
A
C
C
That's
interesting
because
those
numbers
don't
make
sense.
B
C
I
think
there
might
be
there
might
be
something
else
we
can.
We
can
try
and
fetch
on
the
approval
status,
summaries.
C
C
In
an
interesting
point,
right
now
in
the
life
of
deployment
approvals,
where
we
are
kind
of
trying
to
transition
how
it
works
from.
C
All
right,
it's
hard
to
think
just
having
like
a
global
set
versus
having
many
rules
and
I
wonder
if
that's
kind
of
what's
going
on.
C
C
Me
so
if
you
open
up,
that's
not
it
resolvers
resolvers
approval,
no
just.
C
I
don't
know
I'm
still
I'm
still
looking
yeah
the
fuel
pump,
resolvers
deployment,
resolvers
deployment,
resolver.
C
Basically,
it
just
fetches
all
the
deployments
for
a
given.
Yes,
no
environments.
C
C
B
C
C
A
C
To
at
least
get
this
working,
and
perhaps
another
I
know,
there's
something
to
discuss
with
the
back
end
team
yep,
but
we
do
have
a.
We
do,
have
a
query.
For
this
part
at
least
we
just
kind
of
fun.
So
if
you
go
to
yeah,
this
is
the
like
fetch
all
the
approval,
summary
and
everything
you
need
for.
C
What's
termed
multiple
approval
rules,
what
we
configured
is
called
undefiers
called
the
unified
approval
rules,
the
idea
being
that
anybody
who's
allowed
to
deploy
to
an
environment
can
also
approve
that
deployment.
Aside
from
the
Creator
multiple
approval
rules,
Works
more
like
how
Mr
approval
approvals
work,
where
you
can,
you
can
set
a
required
approvals
from
different
groups
and
maintainers
and
specific
users,
and
that
kind
of
thing.
C
So
to
do
that,
we
need
to
bust
out
the
API.
Do
you
have
Postman
or.
C
Something
something
like
that
set
up
yep!
Oh!
This
is
fancy
okay,
so
you're
gonna
post!
Well,
we
have
to
first
we'll
go
back
to
the
we'll
go
back
to
this.
No
I
think
we
can
post
this
while
at
next.
Actually
so
you're
gonna
put
to.
B
C
And
then
in
the
body
we
basically
just
need
to
send.
We
need
to
set
the
required
approval
count
to
zero,
but
I'm
going
to
pull
up
the
API
documentation
here.
C
B
C
B
C
That's
basically
approval
underscore
rules,
okay,
and
we
only
need
to
put
in
one
entry
and
that
one
entry
will
be
our
root
user.
So
it's
just
an
object
with
the
user
underscore
ID
set
to
zero.
B
C
Then,
if
you
copy
your
token
over
and
or
that
office
should.
B
C
Does
does
this
add-on
have
a
way
of
like
sharing
requests
between
people
yeah.
A
Like
pretty
on
fire
with
features
with
Postman,
oh.
C
B
C
C
B
A
C
C
There
we
go
so
now
we
have
set
the
required
approval,
count
to
zero,
which
disables
the
unified
approval
rules
and
have
created
instead,
one
of
potentially
many
multiple
approval
rules
that
requires
that
the
user
has
to
approve
any
deployments.
So
now
we
have
to
run
another
pipeline,
so
we
can
get
deployments
that
use
these
rules,
but
that's
easy.
We
just
go
to
cicd
Pipelines.
C
This
isn't
complicated
at
all,
and
we
just
no
you
just
click
run
pipeline.
C
Oh
my
God,
this
is
the
this
is
what
I've
been
working
on
for
ever.
It
feels
like
now
is
moving
that
settings
form
over
to
the
approval
things
I
guess.
Maybe
you
could
have
turned
that
slide
on
and
use
the
horn,
but
all
right.
So
now,
if
we
go
back
to
graphic
though-
and
we
run
our,
we
run
our
lovely
query
again,
we
see
we
have
an
approval
summary
with
stuff.
C
Yeah,
so
that
is
a
note,
is
that
we
should
go
back
to
the
back
end
team
to
give
us
some
sort
of
access
to
the
unified
approval
rules.
All.
C
A
A
C
C
So
now,
for
the
other
fun
EE
ish
bits
of
coding,
we
in
order
to
import
the
approval
component
into
your
into
the
non-ee
portion
of
code.
A
C
C
This
one,
this
is
the
okay
cool,
the
the
way
in
which
I
usually
try
and
do
these
is.
Is
that
like
it
might
make
more
sense
for
this
component
to
be
a
little
bit
more
deconstructed,
but
at
the
same
time
you
want
kind
of
one
entry
points
into
the
Enterprise.
Only
so
I
couldn't
just
an
effort
to
keep
like
the
mess
in
the
community,
Edition
small.
C
C
C
Ee
underscore
component
is
a
path
helper.
That's
set
up
in
it's
like
a
webpack
Alias
that
we
have
set
up
that
if
we're
not
running
in
Enterprise,
only
mode
or
Enterprise,
Edition
mode,
that'll
be
ee,
slash,
environments,
slash
components,
slash
environment,
underscore
approval.ly,
the
same
idea
yeah,
but
it
wants.
It
should
be
ee
underscore
component.
Actually,
sorry
I
think.
Let
me
check.
C
Yeah
yeah,
so
the.
A
B
C
C
We'll
name
our
component
environment
approval
as
usual,
but
instead
of
being
able
to
use
shorthand
the
set
it
to
a
a
Lambda
that
or
an
arrow
function
that
calls
the
import
code.
C
A
A
C
But
environment
approval
component
isn't
a
function
right.
It's
just
the
import
call.
C
A
C
Yeah,
there's
a
in
the
in
sorry
in
the
import
screen
all
right.
The
difference.
C
No,
no
s
on
component.
Okay,.
C
Works
yeah
the
this
one,
if
we're
not
in
Enterprise
Zone,
for
not
in
the
Enterprise
Edition
it
like
returns
an
empty
component,
basically.
B
C
A
C
A
A
Okay,
cool
then
I
just
put
here
as
a
reference
as
well,
something
like.
C
Damn
it
I
think
the
only
tricky
one
to
get
is
approval
rules,
but
we
can
just
set
that
to
right.
Yes,
it
isn't
true,
but
like
has
approval,
rules
is
the
like
switch,
is
the
Boolean
that
decides
whether
or
not
we
have
multiple
approval
rules,
and
if
it's
true
it
does
a
graphql
query
to
fetch
the
approval
summary
and
if
it's
false,
it
relies
on
the
required
approval.
Count
to
be
there.
A
So
then,
but
let's
adjust
I
guess
are
queried,
so
we
we
definitely
have
at
least
most
of
those
right
and
then
try
to
pass
it
in.
C
C
C
A
B
A
A
C
C
B
C
C
B
C
Right
now,
I
think
so
is
approvals.
C
It
works
somehow,
then,
what's
more
important.
I
think
is
that
if
you
pass
in
has
approval,
if,
as
long
as
has
approval,
rules
is
true.
C
B
C
A
C
B
C
Yeah,
the
second
one
there
so
you
can
see
we
Define
has
approval
rules
as
deployment
environment.
That
has
approval
rules,
that's
helpful.
So
if
we
open
up
the
environment
model.
C
The
ee
version,
of
course
this
is
the
second
one
there
I
know
this
is
the
entity.
We
need
the
model.
B
C
C
If
we
look
at
the
approval
summary
query
like
if
we
look
at
the
graphical
results,
okay,
we
can
probably
see
if,
like
total,
pending
approval,
count
and
total
required
approvals
is
greater
than
zero
or
something
interesting
or
yeah.
Because
we
can't
say
we
can't
check
the
status
because
the
status
defaults
to
approve-
and
we
want
to
be
able
to
show
the
history.
A
C
C
C
I'm
here
it's
on
your
right,
so
we
there's
the.
Where
are
you
Apollo
yeah?
So
we
execute
the
query,
but
we
just
we
just
see
if
it
has
the
approval
rules
and
then,
if
it
doesn't,
then
we
don't
execute
the
queen,
we
can
probably
execute.
We
could
probably
change
this
logic
slightly
to
query
for
it
anyways
and
then
be
a
little
smarter
about
showing
unified
versus
multiple
versus
nothing
at
all.
That's
correct,
thank
you
and
then
you
don't
need
that
parameter
at
all.
B
A
A
Okay,
here
you
mean,
can
I
just
comment.
The
whole
thing.
B
B
A
Cool,
so
everyone,
as
you
can
see,
some
features
are
really
hard
to
even
start
developing.
That's
what
we
have
to
deal
with
now
and
then,
but
nevertheless
it
is
fun
and
once
we
get
it
working,
it's
gonna
be
even
more
awesome.
A
The
other
thing
is
I.
Think
I
will
attach
this
video
to
an
issue
that
basically
prompts
for
creating
some
default
setup
for
environments
and
deployments
seating
kind
of
to
illustrate
that
we
definitely
need
it,
because
we
spent
literally
like
30
minutes
to
setting
up
the
environments
cool
so
guys
have
a
great
time
and
join
us
later
on
some
other
air
programming
sessions.