-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug facilities (part 1) #406
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Short function that's only used once and that takes a relatively big number of parameters (potentially more). Inline it instead. Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
1f7d39e
to
a2f0412
Compare
Maintaining a list of parameters loaded from context parameters with the same name is redundant, doesn't make the code clearer and requires maintenance. Access the parameters directly from the dict instead, Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
Add a new command-line option to trigger dry_run events. These will generate checkout nodes with debug parameters to bypass subsequent pipeline stages and fake a result. This may be useful for debugging purposes, for instance, to check the triggering of other pipeline services and test code generation and application logic piece by piece without relying on a remote staging instance. Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
The script relies on a new docker-compose-debug.yaml file, which spawns from the initial docker-compose.yaml, but it only specifies the command to run for the monitor. The rest of the services don't run any specific commands. The purpose is to make it possible to run each service separately with more flexibility, allowing different commands in each run, for instance. debug_run.sh is meant to be used to start the monitor along with the rest of the service images, and then run services individually with custom commands as needed. This may be useful during development and debugging. Example: - Start the service images and run the monitor in one terminal: ./debug_run.sh - (In another terminal) Run the scheduler service: ./debug_run.sh scheduler loop --runtimes=shell - (In another terminal) Run the tarball service: ./debug_run.sh tarball run Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
3755b86
to
8aaa256
Compare
Lets test it |
Causing crash in tarball service:
|
If the checkout node includes a "dry_run" debug option, bypass the tarball actions and update the node using its debug info, making it 'available' for other services. Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
If the input node specifies a "dry_run" result in its debug parameters, skip the building and uploading stages and return the fake result. Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
8aaa256
to
8c6eefb
Compare
@nuclearcat I uploaded a fix (there was a line missing) |
do we still need this PR? |
No one's using this, so go ahead. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requirements:
Add support for bypassing (dry-running) the initial pipeline stages and add a launcher script (debug_run.sh) to make it easier to run pipeline services individually in a local setup. See the commit messages and the script documentation for more info.
Running the trigger service with
--dry-run <result>
will generate checkout nodes with "dry_run" as a debug parameter and a forced result so that certain subsequent stages will simply run the logic and code generation and bypass actions that require external factors. This is meant as a way to exercise the pipeline stages locally without relying on a full staging instance.