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

Copy Component fails when selecting a newer SRG version and a control has been previously deleted in the source component #501

Closed
rlakey opened this issue Nov 30, 2022 · 1 comment · Fixed by #503
Labels
bug Something isn't working

Comments

@rlakey
Copy link
Contributor

rlakey commented Nov 30, 2022

To reproduce.

  • Create new component from the General Purpose OS SRG v2r3. This creates a component with 191 controls.
  • Duplicate one of the controls say 3 times
  • Delete one of the new contols
  • Attempt a "Copy Component" operation on the previous component and select General Purpose OS SRG v2r4

The UI will show the following error and the postgresql logs will show the errors below.

image

2022-11-30 19:19:57.498 GMT [379498] ERROR: duplicate key value violates unique constraint "rule_id_and_component_id"
2022-11-30 19:19:57.498 GMT [379498] DETAIL: Key (rule_id, component_id)=(000194, 250) already exists.

@rlakey rlakey added the bug Something isn't working label Nov 30, 2022
@rlakey
Copy link
Contributor Author

rlakey commented Nov 30, 2022

Some more interesting data points. When doing copy component and keeping the same SRG things work as expected. When doing copy component and selecting a newer SRG version and when no previously deleted rules exist a new component gets created but is NOT based on the new SRG version and new rules are added to the source component from the newer SRG version for all of its requirements.

Meaning given Component A based on GPOS v2r3...run a copy component and select GPOS v2r4. The outcome is...

  • Component A has 382 rules now instead of 191 with the new rules being from GPOS v2r4 and
  • a new Component B is created with 191 rules based on GPOS v2r3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant