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

feat: Allow installing PRs from DeveloperView #139

Merged
merged 48 commits into from
Mar 2, 2023
Merged

Conversation

GeckoEidechse
Copy link
Member

@GeckoEidechse GeckoEidechse commented Jan 19, 2023

Allows installing launcher and mod PRs from within FlightCore, essentially replacing https://github.com/GeckoEidechse/northstar_dev_testing_helper_tool/

TODO

Requires:

Hardcoded for launcher right now
@GeckoEidechse
Copy link
Member Author

Ok this is nearing completion now. Only thing missing is reducing duplicate code, around launcher vs mod, i.e. use an enum to discern the two and then have a single function to handle both.

@GeckoEidechse GeckoEidechse marked this pull request as ready for review February 12, 2023 22:44
Copy link
Contributor

@Alystrasz Alystrasz left a comment

Choose a reason for hiding this comment

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

Before reviewing in details, I have a few questions:

  • Why can't I install some PRs? ("Couldn't grab download link for PR 414" isn't an explicit error)
  • Can we prevent installing several times the same PR?
  • While installing mods PRs, instead of forcing users to go outside FlightCore to switch profile and actually test them, we should handle the profile switch ourselves, shall we?
  • Do you want me to improve UI a bit?

@GeckoEidechse
Copy link
Member Author

Before reviewing in details, I have a few questions:

  • Why can't I install some PRs? ("Couldn't grab download link for PR 414" isn't an explicit error)

I guess no downloadable CI build. Need to investigate further

  • Can we prevent installing several times the same PR?

We could but that would require tracking which PR is installed right now which would be a lot more additional logic that (in my opinion) would add rather little value. At least to me there's no point in preventing installing the same PR multiple times. ^^

  • While installing mods PRs, instead of forcing users to go outside FlightCore to switch profile and actually test them, we should handle the profile switch ourselves, shall we?

Would require fully supporting profiles first, which we don't do yet. Next best solution would be having a button to launch NorthstarLauncher.exe -profile=R2Northstar-PR-test-managed-folder but that would require rewriting some Northstar launching code which kinda felt outside of the scope of this PR ^^

Overall, same with the previous question, the goal of this PR is to achieve feature parity with https://github.com/GeckoEidechse/northstar_dev_testing_helper_tool so that I can deprecate that. The PR in it's current state has already achieved that minus search filter, which leads me to:

  • Do you want me to improve UI a bit?

If you don't mind <3

@GeckoEidechse
Copy link
Member Author

Do you want me to improve UI a bit?

For now I added a notification similar to #154 where a notification is displayed once installation starts and removed again upon completion and replaced with one that says installation has completed.

With that out of the way, I'd say this PR is ready to merge and I'd turn the last TODO into an issue to solve post-merge.

The reason for this being that the branch is starting to diverge more and more and it's already become annoying to resolve merge conflicts every time another PR gets merged.

Additionally this feature is already on par with https://github.com/GeckoEidechse/northstar_dev_testing_helper_tool/ and it's too useful to keep delaying it for polish IMO ^^

Alystrasz and others added 3 commits February 28, 2023 13:50
* refactor: export pull requests selector to dedicated component

* refactor: regroup launcher+mods collapses in one collapse component

* refactor: load pull requests when opening selector collapse item

* refactor: review progress loaders' style

* fix: don't fetch PRs if they've already been loaded

* feat: update collapse style

* refactor: remove fetch success notification

* refactor: both collapses can be opened at the same time

* fix: non-accordion collapse sends an object as event parameter
This ensures we can still grab older artifacts.

Max page is capped at 10 as going too high will cause us to hit API rate
limits.

Also refined error message accordingly.
@GeckoEidechse GeckoEidechse mentioned this pull request Mar 1, 2023
100 tasks
Copy link
Contributor

@Alystrasz Alystrasz left a comment

Choose a reason for hiding this comment

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

We should create a store module dedicated to PR installation (just like searchModule module) to keep code clean.
Otherwise, I confirm code looks great and c4fc200 fixed related issue; I'll be happy to merge once comments have been addressed :)

I order to clean up PullRequestSelector.vue

Other functions will follow in separate commits.

Currently TypeScript compilation fails on undefined type of `state`
@GeckoEidechse GeckoEidechse requested a review from Alystrasz March 2, 2023 19:44
Copy link
Contributor

@Alystrasz Alystrasz left a comment

Choose a reason for hiding this comment

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

Comments were addressed, code looks good and works well.
LGTM.

@Alystrasz Alystrasz added this pull request to the merge queue Mar 2, 2023
Merged via the queue into main with commit 00201de Mar 2, 2023
@Alystrasz Alystrasz deleted the feat/install-pr branch March 2, 2023 20:29
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.

2 participants