Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

batches: Remote Mount #7 - Executor#40931

Merged
Piszmog merged 249 commits into
mainfrom
rc/remote-mount-executor
Oct 6, 2022
Merged

batches: Remote Mount #7 - Executor#40931
Piszmog merged 249 commits into
mainfrom
rc/remote-mount-executor

Conversation

@Piszmog

@Piszmog Piszmog commented Aug 26, 2022

Copy link
Copy Markdown
Contributor

Part of #31792.

Previous part: #40924

The following changes have been made to the overall logic flow.

  1. When transforming a *btypes.BatchSpecWorkspaceExecutionJob to a apiclient.Job, the batch spec's workspace files metadata is stored in the job's VirtualMachineFiles field (previously VirtualMachineFiles was a map of strings, but has been updated to a struct to accommodate retrieving files from the files API)
  2. A new field has been added to apiclient.Job to specify where the workspace files will be written to (WorkspaceFilesDirectory). This directory is also being provided as a command/flag to batch exec (a separate PR will come for the src-cli side of things).
  3. When handling the apiclient.Job, the VirtualMachineFiles that do not contain the embedded value of the file (instead have a Bucket and Key) are retrieved from the files API (.executors/files/batches/{spec}/{file}). These files are written to to the location specified in WorkspaceFilesDirectory.
    • Changes have been made to the apiclient package. The queue Client has been moved into its own package a new package (files) has been added to handle the files API.
    • BaseClient has been refactor to be more generic for both queue and files clients
  4. Finally, src batch exec is called with the VM full prepared.

Test plan

Added Go Unit Tests

Piszmog added 30 commits August 24, 2022 08:31
This reverts commit 8d72575.
# Conflicts:
#	internal/database/migration/shared/upgradedata/stitched-migration-graph.json
Base automatically changed from rc/remote-mount-cache to main September 27, 2022 16:38
@Piszmog Piszmog changed the title batches: Remote Mount #5 - Executor batches: Remote Mount #6 - Executor Sep 27, 2022
@Piszmog Piszmog changed the title batches: Remote Mount #6 - Executor batches: Remote Mount #7 - Executor Sep 27, 2022
@Piszmog

Piszmog commented Sep 27, 2022

Copy link
Copy Markdown
Contributor Author

Note to self so I do not have to dig thru comments/commits.

@Piszmog

Piszmog commented Sep 28, 2022

Copy link
Copy Markdown
Contributor Author

@eseliger I believe I added/updated the monitoring and pushed it into this PR.

Is this correct way to do this? Do I need to do anything with Grafana itself or is this sufficient?

@eseliger eseliger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last set of (very minor) comments, let's go :shipit:

Comment thread enterprise/internal/executor/client_types.go Outdated
Comment thread enterprise/internal/executor/client_types.go Outdated
Comment thread enterprise/cmd/executor/internal/worker/workspace/files.go Outdated
Comment thread enterprise/cmd/executor/internal/worker/workspace/files.go Outdated
Comment thread enterprise/cmd/executor/internal/worker/workspace/files.go
Comment on lines +452 to +455
// src_apiworker_apiclient_queue_total
// src_apiworker_apiclient_queue_duration_seconds_bucket
// src_apiworker_apiclient_queue_errors_total
func (codeIntelligence) NewExecutorAPIQueueClientGroup(containerName string) monitoring.Group {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will "wipe" the history of these graphs, as the new name of the metrics will only be available from now on, hiding all previously collected data. I don't think this is a terribly big problem for this particular graph, but wanted to call it out, for future monitoring work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anyway to preserve the data when migrating metrics?

@Piszmog Piszmog enabled auto-merge (squash) October 6, 2022 18:09
@Piszmog Piszmog merged commit acd3f7d into main Oct 6, 2022
@Piszmog Piszmog deleted the rc/remote-mount-executor branch October 6, 2022 18:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants