Skip to content

Set default package status to none if deployment exists #2894

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

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

sanketsudake
Copy link
Member

Description

If a package has deployment already, we should set the package status to none instead of pending. If we have a package that has source, we set the status to pending. If both source and deployment are empty, the package is marked as failure.

Which issue(s) this PR fixes:

Fixes #

Testing

Checklist:

  • I ran tests as well as code linting locally to verify my changes.
  • I have done manual verification of my changes, changes working as expected.
  • I have added new tests to cover my changes.
  • My changes follow contributing guidelines of Fission.
  • I have signed all of my commits.

If package has deployment already, we should set package status to none instead of pending.
If we have package has source, we set status to pending.
If both source and deployment are empty, package marked as failure.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Copy link

codecov bot commented Jan 1, 2024

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (12f8017) 46.68% compared to head (f1e2e99) 46.66%.

Files Patch % Lines
pkg/apis/core/v1/package_webhook.go 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2894      +/-   ##
==========================================
- Coverage   46.68%   46.66%   -0.02%     
==========================================
  Files         215      215              
  Lines       22551    22559       +8     
==========================================
  Hits        10527    10527              
- Misses      10668    10676       +8     
  Partials     1356     1356              
Flag Coverage Δ
unittests 46.66% <0.00%> (-0.02%) ⬇️

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.

@sanketsudake sanketsudake merged commit 82b2848 into main Jan 5, 2024
@sanketsudake
Copy link
Member Author

repro.yaml
success.yaml

@sanketsudake sanketsudake deleted the default-build-status branch August 17, 2024 13:26
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