Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
orchestra-v3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alessandro Di Federico
orchestra-v3
Commits
c15d274e
Commit
c15d274e
authored
4 years ago
by
Filippo Cremonese
Browse files
Options
Downloads
Patches
Plain Diff
Add --no-deps option to configure and install
parent
98a3ba50
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
orchestra/cmds/configure.py
+2
-1
2 additions, 1 deletion
orchestra/cmds/configure.py
orchestra/cmds/install.py
+2
-1
2 additions, 1 deletion
orchestra/cmds/install.py
orchestra/executor.py
+6
-3
6 additions, 3 deletions
orchestra/executor.py
with
10 additions
and
5 deletions
orchestra/cmds/configure.py
+
2
−
1
View file @
c15d274e
...
...
@@ -8,6 +8,7 @@ def install_subcommand(sub_argparser):
cmd_parser
=
sub_argparser
.
add_parser
(
"
configure
"
,
handler
=
handle_configure
,
help
=
"
Run configure script
"
)
cmd_parser
.
add_argument
(
"
component
"
)
cmd_parser
.
add_argument
(
"
--no-force
"
,
action
=
"
store_true
"
,
help
=
"
Don
'
t force execution of the root action
"
)
cmd_parser
.
add_argument
(
"
--no-deps
"
,
action
=
"
store_true
"
,
help
=
"
Only execute the requested action
"
)
def
handle_configure
(
args
,
config
:
Configuration
):
...
...
@@ -19,4 +20,4 @@ def handle_configure(args, config: Configuration):
exit
(
1
)
executor
=
Executor
(
args
)
executor
.
run
(
build
.
configure
,
no_force
=
args
.
no_force
)
executor
.
run
(
build
.
configure
,
no_force
=
args
.
no_force
,
no_deps
=
args
.
no_deps
)
This diff is collapsed.
Click to expand it.
orchestra/cmds/install.py
+
2
−
1
View file @
c15d274e
...
...
@@ -7,6 +7,7 @@ from ..model.configuration import Configuration
def
install_subcommand
(
sub_argparser
):
cmd_parser
=
sub_argparser
.
add_parser
(
"
install
"
,
handler
=
handle_install
,
help
=
"
Build and install a component
"
)
cmd_parser
.
add_argument
(
"
component
"
)
cmd_parser
.
add_argument
(
"
--no-deps
"
,
action
=
"
store_true
"
,
help
=
"
Only execute the requested action
"
)
cmd_parser
.
add_argument
(
"
--no-force
"
,
action
=
"
store_true
"
,
help
=
"
Don
'
t force execution of the root action
"
)
cmd_parser
.
add_argument
(
"
--no-merge
"
,
action
=
"
store_true
"
,
help
=
"
Do not merge files into orchestra root
"
)
cmd_parser
.
add_argument
(
"
--create-binary-archives
"
,
action
=
"
store_true
"
,
help
=
"
Create binary archives
"
)
...
...
@@ -22,4 +23,4 @@ def handle_install(args, config: Configuration):
exit
(
1
)
executor
=
Executor
(
args
)
executor
.
run
(
build
.
install
,
no_force
=
args
.
no_force
)
executor
.
run
(
build
.
install
,
no_force
=
args
.
no_force
,
no_deps
=
args
.
no_deps
)
This diff is collapsed.
Click to expand it.
orchestra/executor.py
+
6
−
3
View file @
c15d274e
...
...
@@ -17,8 +17,8 @@ class Executor:
self
.
_failed_actions
:
List
[
Action
]
=
[]
self
.
_pool
=
futures
.
ThreadPoolExecutor
(
max_workers
=
threads
,
thread_name_prefix
=
"
Builder
"
)
def
run
(
self
,
action
,
no_force
=
False
):
self
.
_collect_actions
(
action
,
force
=
not
no_force
)
def
run
(
self
,
action
,
no_force
=
False
,
no_deps
=
False
):
self
.
_collect_actions
(
action
,
force
=
not
no_force
,
no_deps
=
no_deps
)
self
.
_pending_actions
.
sort
(
key
=
lambda
a
:
a
.
qualified_name
)
if
not
self
.
_pending_actions
:
...
...
@@ -71,12 +71,15 @@ class Executor:
status_bar
.
status_format
=
msg
status_bar
.
close
()
def
_collect_actions
(
self
,
action
:
Action
,
force
=
False
):
def
_collect_actions
(
self
,
action
:
Action
,
force
=
False
,
no_deps
=
False
):
if
not
force
and
action
.
is_satisfied
(
recursively
=
True
):
return
if
action
not
in
self
.
_pending_actions
:
self
.
_pending_actions
.
append
(
action
)
if
no_deps
:
return
for
dep
in
action
.
dependencies
:
self
.
_collect_actions
(
dep
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment