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

GitHub Repo Contents API #19

Open
brainstorm opened this issue Aug 4, 2024 · 4 comments
Open

GitHub Repo Contents API #19

brainstorm opened this issue Aug 4, 2024 · 4 comments

Comments

@brainstorm
Copy link

Following up from #17 (comment)

@brainstorm brainstorm mentioned this issue Aug 4, 2024
@brainstorm
Copy link
Author

brainstorm commented Aug 4, 2024

The idea is cool 😎
But, i'm wondering how the sync could work. In instance, i have a GitHub repo with some files. Now, i'm connecting a device that may have a slightly (or completely) different file system. Which one is correct? Is this device even associated with the repository?
Same applies to regular host filesystem access, if/when it gets implemented.

Agree that it's tricky to implement without either loading complexity on either configuration or opinionated default conventions.

As a first draft on this idea I'd probably limit it to making sure that the board is blank and then assume that the GH repo is the authoritative source of truth (SSOT). Then provide "escape hatches" for those users that already have files on the board but want to use that feature at their own risk... although moving those files to a repo first and wiping the device is not too onerous anyway?

For conflict resolution, I'd also assume that the repo changes come first and the device changes are something to resolve on the editor (via a diff/change merge view).... not trivial in any case, I agree.

@vshymanskyy
Copy link
Owner

Yes, it gets even more complicated if you have multiple boards running the same firmware.
It could easily lead to multiple boards running different (but clean) revisions of the same repo.

😵‍💫

@brainstorm
Copy link
Author

brainstorm commented Aug 4, 2024

Yes, it gets even more complicated if you have multiple boards running the same firmware. It could easily lead to multiple boards running different (but clean) revisions of the same repo.

😵‍💫

In this case, wouldn't it be enough to save the HEAD git hash to disambiguate state? Or worst case, keeping the .git folder around that can later be removed when shipping to production?

@vshymanskyy
Copy link
Owner

No, keeping .git on the device is not gonna work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants