Skip to content

[Deployment revisited][Staging][WIP] Fix create config #4724

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

Open
wants to merge 39 commits into
base: master
Choose a base branch
from

Conversation

vitorguidi
Copy link
Collaborator

@vitorguidi vitorguidi commented Mar 14, 2025

Create config has gotten stale over time. A few encountered issues:

  • Redis is being created both by terraform and deployment manager, which leads to butler deploy failing after the bootstrap because the resource already exists. Now it will only be created by terraform
  • [TODO] Now that redis is terraform responsibility, it should also create the serverless connector in the same VPC. This was done in _update_redis
  • Redis must be created BEFORE deploying appengine, because there is a dependency on the REDIS_HOST env var. deploy_terraform and deploy_k8s were moved to before deploy_appengine
  • The command line browser used in the CLI fails to authenticate in the oauth flow due to javascript not being available. use_browser was set to false, so the operator manually accesses the provided link
  • The K8S_PROJECT env var is not bootstrapped in create config, so deploy_k8s fails
  • WindowRateLimitTask index is absent in src/appengine.yaml, so fuzz task fails
  • Secrets api is disabled, and the GCS signer secret is absent (manually created) > need to create a service account and paste the json token as a secret
  • Batch pools are reference but not created, which breaks schedule_utask_main (and possibly schedule_fuzz_task)
  • The redis serverless connector is created in the default VPC, but appengine/redis themselves are on the main one, which makes redis accesses timeout
  • Batch definitions are out of date with schedule-fuzz and schedule-utask-main: fields in batch.yaml differ between createa config and the script that uses them
  • Preprocess, utask_man and postprocess queues were missing in the bootstrapping config

This PR addresses the above issues

Part of #4728

@vitorguidi vitorguidi changed the title [WIP] Fix create config [Deployment revisited][Staging][WIP] Fix create config Mar 18, 2025
@vitorguidi vitorguidi force-pushed the chore/fix-create-config branch from 2e3f96c to d970379 Compare March 28, 2025 17:23
vitorguidi and others added 12 commits April 3, 2025 19:57
It implements structured logs for task context. It adds the following
labels for logs on task context:
- Task Id (the UUID one)
- Task name
- Stage (preprocess, main, postprocess)

---------

Signed-off-by: Javan Lacerda <[email protected]>
It moves the `release` and `docker_image` default labels to into the
json formatter. before it, this labels were omitted.

Signed-off-by: Javan Lacerda <[email protected]>
It creates the structured log for progression tasks, defines de behavior
to extract the information from the test case, and add this context
behavior for progression preprocess, main and postprocess.

---------

Signed-off-by: Javan Lacerda <[email protected]>
…task_id (#4744)

It adds `task argument` and `task job name` as properties of task
structured log.

It also removes the deprecated `task_id` that follows a csv pattern.

Signed-off-by: Javan Lacerda <[email protected]>
…4748)

Latest changes to add the fuzz target to the testcase-based structured
logs was failing when retrieving the fuzz target as a key ID:
[error](https://pantheon.corp.google.com/errors/detail/CNuqgM-PtKvgaA;locations=global;time=P30D?project=google.com:clusterfuzz&utm_source=error-reporting-notification&utm_medium=email&utm_content=new-error&e=-13802955&mods=logs_tg_prod&inv=1&invt=Abtmmg).
This PR attempts to fix it by using the "binary" field from the
FuzzTarget entity, which is also used in the ClusterFuzz frontend to
represent the fuzz target.
It adds a catch for exceptions that are raised during the contexts, and
log it to have this log with the structured logs.

---------

Signed-off-by: Javan Lacerda <[email protected]>
Adding structured logs to regression task using the testcase-based
context. For regression postprocess, it was necessary to add code to
retrieve the testcase early on, in order to pass it to the context
manager.
(Also, fixing some style in the logs code).
…ny to DB (#4757)

After adding structured logs to testcase-based tasks
(#4736), a new error group
started showing up due to insufficient permissions/no current context
for accessing datastore. This is probably due to querying for the
testcase's fuzz target during `utask_main` execution in logs.

This tries to solve it by adding the fuzz target as an argument for the
logs context, since we can retrieve it from the datastore entity in
trusted part and from the protobuf during the untrusted part of the
task.

---------

Signed-off-by: Vinicius da Costa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants