Skip to content

fix: duplicate workspace update entries #4513

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 6 commits into from
Oct 14, 2022

Conversation

Kira-Pilot
Copy link
Member

@Kira-Pilot Kira-Pilot commented Oct 12, 2022

resolves #4317

This was happening because we sent down two requests when we updated the workspace schedule form: 1) to /autostart, with an empty payload and 2) to /ttl with our updated auto-off. This was creating two audit logs, one without a diff.

This PR fixes the following

  • cleans up that errant, empty API call on the FE
  • makes sure the BE only creates log entries if there are actually diffs
  • filters out audit logs with 0 diffs on the FE so that users don't see these old, nonsense records

Before
Screen Shot 2022-10-12 at 9 37 32 AM

After:
Screen Shot 2022-10-12 at 9 37 11 AM

@Kira-Pilot Kira-Pilot requested a review from a team as a code owner October 12, 2022 14:19
@Kira-Pilot Kira-Pilot requested review from BrunoQuaresma and removed request for a team October 12, 2022 14:19
@github-actions
Copy link

github-actions bot commented Oct 12, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@Kira-Pilot
Copy link
Member Author

I have read the CLA Document and I hereby sign the CLA

@Kira-Pilot
Copy link
Member Author

recheck

@Kira-Pilot Kira-Pilot requested a review from coadler October 12, 2022 15:05
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

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

LGTM

@Kira-Pilot Kira-Pilot merged commit dd8ebf1 into main Oct 14, 2022
@Kira-Pilot Kira-Pilot deleted the workspace-update-logs-twice/kira-pilot branch October 14, 2022 18:39
@github-actions github-actions bot locked and limited conversation to collaborators Oct 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

audit: Two entries created for adding a auto-stop time of 1 hour
3 participants