Skip to content

Set default empty object to with field#5943

Merged
ffjlabo merged 1 commit into
masterfrom
add-default-empty-object
Jun 12, 2025
Merged

Set default empty object to with field#5943
ffjlabo merged 1 commit into
masterfrom
add-default-empty-object

Conversation

@ffjlabo
Copy link
Copy Markdown
Member

@ffjlabo ffjlabo commented Jun 12, 2025

What this PR does:

as title

Why we need it:

Currently, the pipeline with stages that don't have a field is failed because it is failing to parse the empty stage config.
(K8S_PRIMARY_ROLLOUT is failed in the example below)

apiVersion: pipecd.dev/v1beta1
kind: Application
spec:
  name: canary
  labels:
    env: example
    team: product
  pipeline:
    stages:
      # Deploy the workloads of CANARY variant. In this case, the number of
      # workload replicas of CANARY variant is 10% of the replicas number of PRIMARY variant.
      - name: K8S_CANARY_ROLLOUT
        with:
          replicas: 10%
      # Wait 10 seconds before going to the next stage.
      - name: WAIT
        with:
          duration: 10s
      # Update the workload of PRIMARY variant to the new version.
      - name: K8S_PRIMARY_ROLLOUT
      # Destroy all workloads of CANARY variant.
      - name: K8S_CANARY_CLEAN

Which issue(s) this PR fixes:

Part of #5530

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.46%. Comparing base (d73300d) to head (7c04d12).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5943      +/-   ##
==========================================
- Coverage   28.47%   28.46%   -0.01%     
==========================================
  Files         520      520              
  Lines       56415    56402      -13     
==========================================
- Hits        16063    16056       -7     
+ Misses      39086    39080       -6     
  Partials     1266     1266              
Flag Coverage Δ
. 23.76% <ø> (+0.01%) ⬆️
.-pkg-app-pipedv1-plugin-example 0.00% <ø> (ø)
.-pkg-app-pipedv1-plugin-kubernetes 66.42% <ø> (ø)
.-pkg-app-pipedv1-plugin-kubernetes_multicluster 67.51% <ø> (ø)
.-pkg-app-pipedv1-plugin-wait 35.51% <ø> (ø)
.-pkg-plugin-sdk 48.86% <ø> (-0.37%) ⬇️
.-tool-actions-gh-release 19.23% <ø> (ø)
.-tool-actions-plan-preview 25.30% <ø> (ø)
.-tool-codegen-protoc-gen-auth 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com>
@ffjlabo ffjlabo force-pushed the add-default-empty-object branch from 2ac399f to 7c04d12 Compare June 12, 2025 01:39
@ffjlabo ffjlabo marked this pull request as ready for review June 12, 2025 01:44
@ffjlabo ffjlabo requested a review from a team as a code owner June 12, 2025 01:44
@ffjlabo ffjlabo enabled auto-merge (squash) June 12, 2025 01:44
Copy link
Copy Markdown
Member

@t-kikuc t-kikuc left a comment

Choose a reason for hiding this comment

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

nice

Copy link
Copy Markdown
Member

@Warashi Warashi left a comment

Choose a reason for hiding this comment

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

Nice 👍🏻

@ffjlabo ffjlabo merged commit 4e8569d into master Jun 12, 2025
39 of 40 checks passed
@ffjlabo ffjlabo deleted the add-default-empty-object branch June 12, 2025 01:57
@github-actions github-actions Bot mentioned this pull request Jul 14, 2025
@github-actions github-actions Bot mentioned this pull request Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants