Skip to content
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

Propose delete cache updated when package revision is deleted #163

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

liamfallon
Copy link
Member

The git repo code holds a cache of the package revisions that are in state "proposed-delete". Entries in this cache were not removed when the package revision was actually deleted. This bug was not noticed before because the periodic job fixed up the proposed-delete cache and it ran every minute. Now that the periodic job is running every 10 minutes, this bug became more obvious.

Before:

% porchctl -n porch-demo rpkg init network-function --repository=porch-test --workspace=myws
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b created

% porchctl -n porch-demo rpkg propose porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b proposed

% porchctl -n porch-demo rpkg approve porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b approved

% porchctl -n porch-demo rpkg propose-delete porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b proposed for deletion

% porchctl -n porch-demo rpkg delete porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b deleted

% porchctl -n porch-demo rpkg propose-delete porch-test-f41b63652745952371579b668bc42dda013003a1
porch-test-f41b63652745952371579b668bc42dda013003a1 proposed for deletion

% porchctl -n porch-demo rpkg delete porch-test-f41b63652745952371579b668bc42dda013003a1
porch-test-f41b63652745952371579b668bc42dda013003a1 deleted

% porchctl -n porch-demo rpkg init network-function --repository=porch-test --workspace=myws
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b created

% porchctl -n porch-demo rpkg propose porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b proposed

% porchctl -n porch-demo rpkg approve porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b approved

# The bug!
% porchctl -n porch-demo rpkg propose-delete porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b is already proposed for deletion

% porchctl -n porch-demo rpkg delete porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b deleted

# The bug!
% porchctl -n porch-demo rpkg propose-delete porch-test-f41b63652745952371579b668bc42dda013003a1
porch-test-f41b63652745952371579b668bc42dda013003a1 is already proposed for deletion

% porchctl -n porch-demo rpkg delete porch-test-f41b63652745952371579b668bc42dda013003a1
porch-test-f41b63652745952371579b668bc42dda013003a1 deleted

After:

% porchctl -n porch-demo rpkg init network-function --repository=porch-test --workspace=myws
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b created

% porchctl -n porch-demo rpkg propose porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b proposed

% porchctl -n porch-demo rpkg approve porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b approved

% porchctl -n porch-demo rpkg propose-delete porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b proposed for deletion

% porchctl -n porch-demo rpkg delete porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b deleted

% porchctl -n porch-demo rpkg propose-delete porch-test-f41b63652745952371579b668bc42dda013003a1
porch-test-f41b63652745952371579b668bc42dda013003a1 proposed for deletion

% porchctl -n porch-demo rpkg delete porch-test-f41b63652745952371579b668bc42dda013003a1
porch-test-f41b63652745952371579b668bc42dda013003a1 deleted

% porchctl -n porch-demo rpkg init network-function --repository=porch-test --workspace=myws
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b created

% porchctl -n porch-demo rpkg propose porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b proposed

% porchctl -n porch-demo rpkg approve porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b approved

# Bug fixed
% porchctl -n porch-demo rpkg propose-delete porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-f41b63652745952371579b668bc42dda013003a1 proposed for deletion

% porchctl -n porch-demo rpkg delete porch-test-ed65de69336c5d0d329867dd874a568460ffda0b
porch-test-ed65de69336c5d0d329867dd874a568460ffda0b deleted

# Bug fixed
% porchctl -n porch-demo rpkg propose-delete porch-test-f41b63652745952371579b668bc42dda013003a1
porch-test-f41b63652745952371579b668bc42dda013003a1 proposed for deletion

% porchctl -n porch-demo rpkg delete porch-test-f41b63652745952371579b668bc42dda013003a1
porch-test-f41b63652745952371579b668bc42dda013003a1 deleted

@nephio-prow nephio-prow bot requested review from kispaljr and s3wong December 17, 2024 14:25
@nephio-prow nephio-prow bot added the approved label Dec 17, 2024
@liamfallon
Copy link
Member Author

/assign @kispaljr @kushnaidu @JamesMcDermott

@kushnaidu
Copy link
Contributor

/approve

1 similar comment
@JamesMcDermott
Copy link
Contributor

/approve

Copy link
Contributor

nephio-prow bot commented Dec 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JamesMcDermott, kushnaidu, liamfallon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kispaljr
Copy link
Collaborator

/lgtm

@nephio-prow nephio-prow bot added the lgtm label Dec 17, 2024
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.

4 participants