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

Use only BFF from UI #94

Merged
merged 8 commits into from
Aug 29, 2024
Merged

Use only BFF from UI #94

merged 8 commits into from
Aug 29, 2024

Conversation

b-rowan
Copy link
Contributor

@b-rowan b-rowan commented Aug 27, 2024

Refactors UI and BFF to not require any use of API from the UI. BFF is basically a copy of API for now (except for the GET methods).

Also some misc JS fixes, and an added router for uploading firmware. Uploading firmware is now combined into 1 endpoint in both the API and BFF.

Closes #81, Closes #91

@b-rowan b-rowan added the v0.2.0 label Aug 27, 2024
@b-rowan b-rowan force-pushed the dev_refactor_bff_api branch 4 times, most recently from b49e2c6 to 5f0ee2a Compare August 28, 2024 05:11
@UpstreamData UpstreamData force-pushed the dev_refactor_bff_api branch 3 times, most recently from 1be374d to 5231e10 Compare August 28, 2024 14:56
@tsagadar
Copy link
Collaborator

Commit f674a68 : either rewrite commit message (detail: no "." at the end of the first line) or ideally split in two (needs some git voodoo skills that pay off over time - or a good IDE).

@easybe
Copy link
Collaborator

easybe commented Aug 29, 2024

Commit f674a68 : either rewrite commit message (detail: no "." at the end of the first line) or ideally split in two (needs some git voodoo skills that pay off over time - or a good IDE).

Yes, that commit looks like a squash gone wrong. Better split it up if the 2 changes are unrelated.

This can be done with interactive rebase:

  1. git rebase -i origin/master
  2. Change first line to:
    e f674a68 # This is a combination of 2 commits. # This is the 1st commit message:
    
  3. Save & quit
  4. git reset HEAD^ (or only extract some file(s) and amend)
  5. Redo the two commits
  6. git rebase --continue

Concerning the commit message quality, there has been quite some progress 🙏. To take it one step further, I would appreciate if we could agree to follow the very common conventions outlined here, i.e.:

Summarize changes in around 50 characters (no period here)

More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.

Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequences of this
change? Here's the place to explain them.

Further paragraphs come after blank lines.

 - Bullet points are okay, too

 - Typically a hyphen or asterisk is used for the bullet, preceded
   by a single space, with blank lines in between, but conventions
   vary here

If you use an issue tracker, put references to them at the bottom,
like this:

Closes: #123

@UpstreamData UpstreamData force-pushed the dev_refactor_bff_api branch 6 times, most recently from ff9759f to 5c532e7 Compare August 29, 2024 14:52
@b-rowan
Copy link
Contributor Author

b-rowan commented Aug 29, 2024

Yes, that commit looks like a squash gone wrong. Better split it up if the 2 changes are unrelated.

Yeah, should be fixed now. I think they are related closely enough to be 1 commit (hence the failed squash).

@b-rowan b-rowan requested a review from tsagadar August 29, 2024 14:54
UpstreamData and others added 8 commits August 29, 2024 10:38
Update API schema and BFF schema to allow UI to only use BFF for software.
Update API schema and BFF schema to allow UI to only use BFF for rollouts.
Update API schema and BFF schema to allow UI to only use BFF for devices.
Move `updateSoftwareSelection` to BFF, and rename `post` to `post_request` to match other request formats.
Use `router.add_api_route` to create routes for the BFF endpoints which just directly call the API endpoints.
@b-rowan b-rowan merged commit 2857da0 into master Aug 29, 2024
2 checks passed
@b-rowan b-rowan deleted the dev_refactor_bff_api branch August 29, 2024 16:43
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.

Ensure UI only calls BFF endpoints API for CI integration
4 participants