-
Notifications
You must be signed in to change notification settings - Fork 3
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
ci(portal loop): Create exports from portal loop #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you create a new PR with only the logic and without the result? (feel free to keep this one open as a way to preview the result).
I don't believe a CI workflow is the best approach. The portal loop isn't a stable network, so you can easily miss transactions by not calling this workflow at the right moment, which will likely happen about 99.9% of the time. The portal loop already has a concept of local logs that are created on the machine precisely when needed, specifically just before an upgrade. This is likely what is already backed up on S3, which isn't what we want. We need a way to patch the logs, which is why we require this repository instead of s3. Edit: I understand now; you're combining the newly fetched genesis file with the new transactions. I believe this approach can work. We should verify its consistency, such as what happens when we run the script twice or when we run it twice with two different instances. Otherwise, looks good to me. |
I can do the PR, I just lost track of this since it is not clear to me what is the final expected outcome. The way it was thought for the portal loop is that we are saving only the deltas from last / most recent backup.
A way to make this more effective is to connect the job to the merge into |
Can you do the PR, please? |
The PR has been updated leaving only the relevant script (used into the workflow). We reviewed the flow to make it simple and clear:
Since any updated file should triggers a commit in the repo, we should actually achieve out of-the-box history and versioning of the backup reference. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 😎
Pinging @moul for a final review 🙏
copyBackupFiles | ||
echo "Stored new backup files for balances and txs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note, it's fine to replace both the balances and txs, because balances can't be changed without transactions
The idea behind this approach is to always have a git history of the portal loop transactions (that are equal to the ones on the machine), so we can change the history, and easily "replay" the portal loop with the modified genesis balances / txs |
Introduces a CI workflow that backup deltas of new transactions from portal loop and perform the required extractions from there