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

Updates from permit internal fork #546

Merged
merged 47 commits into from
Mar 5, 2024
Merged

Conversation

roekatz
Copy link
Collaborator

@roekatz roekatz commented Feb 8, 2024

No description provided.

Copy link

netlify bot commented Feb 8, 2024

Deploy Preview for opal-docs canceled.

Name Link
🔨 Latest commit a2437d3
🔍 Latest deploy log https://app.netlify.com/sites/opal-docs/deploys/65e5eb8468fa520008771521

@roekatz roekatz force-pushed the permit/changes-from-internal-fork branch from d2fa7ef to 7e9b778 Compare February 14, 2024 10:52
@roekatz roekatz marked this pull request as ready for review February 14, 2024 14:46
@roekatz roekatz requested a review from asafc February 14, 2024 14:47
@roekatz roekatz force-pushed the permit/changes-from-internal-fork branch 9 times, most recently from 5487f13 to 04cf733 Compare February 15, 2024 14:20
@roekatz roekatz force-pushed the permit/changes-from-internal-fork branch from 04cf733 to 475c36c Compare February 22, 2024 13:13
Copy link
Contributor

@asafc asafc left a comment

Choose a reason for hiding this comment

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

@roekatz i reviewed the changes and they are overall ok - however - i did a comparison to the private fork and there are a bunch of changes that require deeper review and justification.

let's sync on that when you are available.

I left detailed comments in this ticket:
https://linear.app/permit/issue/PER-9276/opal-public-candidate-to-opal-private-cr-fixes

Copy link
Contributor

@asafc asafc left a comment

Choose a reason for hiding this comment

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

Exciting stuff!

roekatz and others added 25 commits March 4, 2024 14:52
The introduction of shards created a bug, because we might skip force fetching a url already fetched for another scope, when the scopes are not under the same shard (aka local clone)
The temp file is used to achieve atomic replacement of the older backup (using os.rename).
But when using a fixed name for the temp file, different replicas sharing the volume could partially override it before the rename; thus making it possible to end up with a partial backup file
Should create different local branches to track the last reported state for each scope separated
Fix the local branch name (that tracks the remote branch for each scope) to f"scopes/{scope_id}".
When the format f"{branch}/scope_{scope_id}" was used, the branch name would be invalid when `branch == "master"`.
(can't create branch "master/..." if "master" already exists).
Should check if f"scopes/{self._scope_id}" is valid reference name, otherwise it always fails and we always encode it as hex
This causes a race when using the last stored bundle hash to fetch policy from server,
Eventually client could try to store the same bundle twice (current hash is updated after the update is stored, but is checked before it's fetched)
Queue.get raised an error because queue creationg and queue handling (.get) occurred on different tasks
@roekatz roekatz force-pushed the permit/changes-from-internal-fork branch from 93c49ab to 76fd0bf Compare March 4, 2024 12:53
@roekatz roekatz merged commit 5dd9752 into master Mar 5, 2024
9 of 10 checks passed
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.

4 participants