Skip to content

Preserve null package cleanup cron expression - #1408

Open
omribz156 wants to merge 1 commit into
jfrog:masterfrom
omribz156:codex/package-cleanup-cron-expression
Open

Preserve null package cleanup cron expression#1408
omribz156 wants to merge 1 commit into
jfrog:masterfrom
omribz156:codex/package-cleanup-cron-expression

Conversation

@omribz156

@omribz156 omribz156 commented May 27, 2026

Copy link
Copy Markdown

Summary

  • Preserve omitted/null cron_expression when Artifactory returns an empty string for package cleanup policies.
  • Keep explicitly configured empty strings and non-empty cron expressions unchanged.
  • Add focused model coverage for null, empty, and non-empty cron expression refresh behavior.

Fixes #1406.

Verification

  • go test ./pkg/artifactory/resource/configuration -run 'TestPackageCleanupPolicyFromAPIModel' -count=1
  • go test ./pkg/artifactory/resource/configuration -run '^$' -count=1
  • go test ./pkg/artifactory/provider -run TestProviderSDKV2 -count=1
  • git diff --check

Implemented with Codex assistance; I kept the patch focused and manually reviewed the final diff.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where an empty Artifactory cron expression could cause inconsistencies after applying changes.
    • Omitted cron expressions are now consistently preserved as null.

@omribz156
omribz156 requested a review from vasukinjfrog as a code owner May 27, 2026 08:00
srinivasgowda097 added a commit that referenced this pull request Jun 16, 2026
Preserve null package cleanup cron expression(#1408)
@soumyas-dev

Copy link
Copy Markdown
Collaborator

Hi @omribz156 ,

Thank you for your contribution.

Our CI pipeline issues have been resolved, and we are now accepting contributions again. If you are still interested in submitting this change, please rebase your branch on master and update the CHANGELOG. We look forward to reviewing your pull request.

@omribz156

Copy link
Copy Markdown
Author

Rebased on current master and retained the CHANGELOG entry. The source behavior is already present on master, so this PR now contains only that release note. Please let me know whether you prefer to merge the changelog-only follow-up or close it as already implemented.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cae231d0-ee83-4eff-bf35-3ab51e805bd0

📥 Commits

Reviewing files that changed from the base of the PR and between dcb2bea and a60c29c.

📒 Files selected for processing (1)
  • CHANGELOG.md

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changelog adds a 12.11.5 entry for preserving omitted cron_expression values as null when Artifactory returns an empty string.

Changes

Cron expression consistency

Layer / File(s) Summary
Document cron expression preservation
CHANGELOG.md
The changelog records the artifactory_package_cleanup_policy fix for preserving omitted cron_expression values as null.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to a60c2

The change preserves omitted package-cleanup cron expressions while retaining explicit values, with no actionable merge-blocking risk remaining after normal checks and review.

Suggested reviewers: chukka, oumkale, shahiinn

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The linked issue requires a provider fix for omitted or null cron_expression values. The provided change summary shows only a changelog entry and no implementation or tests. Include the model refresh fix that preserves null for omitted cron_expression values, while retaining explicit empty and non-empty values. Add the stated focused tests.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes preserving null package cleanup cron expressions.
Out of Scope Changes check ✅ Passed The documented changelog entry directly relates to the linked cron_expression bug. No unrelated changes are shown.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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.

produced an unexpected new value: .cron_expression: was null, but now cty.StringVal("")

2 participants