@@ -15,7 +15,6 @@ import (
1515
1616 "github.com/hibiken/asynq"
1717 "github.com/redis/go-redis/v9"
18- "gopkg.in/yaml.v3"
1918
2019 "github.com/oasisprotocol/rofl-app-backend/config"
2120 "github.com/oasisprotocol/rofl-app-backend/tasks"
@@ -429,14 +428,6 @@ func (p *roflProcessor) processVerifyDeploymentsTask(ctx context.Context, taskID
429428 }
430429 result .CommitSHA = strings .TrimSpace (commitSHAStdout )
431430
432- // Remove the builder field from rofl.yaml if it exists.
433- // This is necessary because the verify command should not use a custom builder.
434- if err := removeBuilderFromManifest (filepath .Join (repoDir , "rofl.yaml" )); err != nil {
435- p .logger .Error ("failed to remove builder from rofl.yaml" , "error" , err )
436- result .Err = fmt .Sprintf ("failed to remove builder from rofl.yaml: %v" , err )
437- return result
438- }
439-
440431 verifyResult , err := p .cli .Run (ctx , oasiscli.RunInput {
441432 Command : oasiscli .CommandVerifyDeployment ,
442433 WorkDir : repoDir ,
@@ -530,39 +521,6 @@ func runCommand(ctx context.Context, dir, name string, args ...string) (string,
530521 return stdoutBuf .String (), stderrBuf .String (), err
531522}
532523
533- // removeBuilderFromManifest removes the builder field from the rofl.yaml manifest file.
534- // This is necessary when verifying deployments to ensure we use the default builder.
535- func removeBuilderFromManifest (manifestPath string ) error {
536- // Read the manifest file.
537- data , err := os .ReadFile (manifestPath ) //nolint:gosec // We control the file path.
538- if err != nil {
539- return fmt .Errorf ("failed to read manifest: %w" , err )
540- }
541-
542- // Parse the YAML.
543- var manifest map [string ]interface {}
544- if err := yaml .Unmarshal (data , & manifest ); err != nil {
545- return fmt .Errorf ("failed to unmarshal manifest: %w" , err )
546- }
547-
548- // Remove the builder field if it exists.
549- if _ , exists := manifest ["builder" ]; exists {
550- delete (manifest , "builder" )
551-
552- // Write the updated manifest back to the file.
553- updatedData , err := yaml .Marshal (manifest )
554- if err != nil {
555- return fmt .Errorf ("failed to marshal manifest: %w" , err )
556- }
557-
558- if err := os .WriteFile (manifestPath , updatedData , 0o600 ); err != nil {
559- return fmt .Errorf ("failed to write manifest: %w" , err )
560- }
561- }
562-
563- return nil
564- }
565-
566524var _ asynq.Logger = (* asynqLogger )(nil )
567525
568526// asynqLogger is an slog wrapper for the asynq.Logger interface.
0 commit comments