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

Enabled dev-mode functionality to setup a "custom repository to load from" #19

Merged
merged 1 commit into from
Apr 4, 2020

Conversation

tmack8001
Copy link
Contributor

@tmack8001 tmack8001 commented Apr 3, 2020

The intention of this dev-mode is to allow developers (both baronbrew and contributing developers) to setup a github branch as the source for "Update App (Flow)" button in the TiltPi UI. In doing so I decided it would also be helpful to have the latest official update documented in the UI so a user would know if hitting "Update App (Flow)" would actually load any changes.

NOTE I'm relying on Github Releases to determine this... which isn't currently setup in baronbrew/TILTpi, but I have an example changelog in my fork, https://github.com/tmack8001/TILTpi/releases/tag/v.2.5

Here is a preview of what that would look like for users.

no update
image

new release (either from developer's custom release or the official release track)
image

… some function code blocks, add debugging before and after cloud service logging http requests
@tmack8001
Copy link
Contributor Author

Within this I also added 2 debug nodes in helping to diagnosis another issue I ran into about the Cloud Provider logging. These mostly just log out the payload and response from the cloud provider. They are disabled by default, but can easily be enabled. Later I want to expose the cloud provider's error into the UI for the end user so that there isn't a need to go into the node-RED interface to determine what is broken with publishing.

image

@noahbaron
Copy link
Collaborator

noahbaron commented Apr 3, 2020 via email

@tmack8001
Copy link
Contributor Author

My guess is I'll need to update v.2.5 to include these
changes in the release since I haven't merged the changes yet.

I'd just leave v.2.5 where it is and add this into a v.2.6 release entry within Github's UI. Then have that track the merged commit of this PR on top of the existing v.2.5 on the Aiolblescan branch. We shouldn't get in the practice of modifying release targets and instead leave releases as unmodifiable elements of the repo.

Ideally the Node-RED interface should pull the source of the release's tag instead of being hardcoded to the branch we are using today of Aiolblescan. To check out the release API checkout, https://api.github.com/repos/baronbrew/tiltpi/releases/latest. However, please be aware without authentication there is rate limiting enabled to 60 requests an hour (thus the 1/5min limiter I put in place).

@noahbaron noahbaron merged commit 4a70d8b into baronbrew:Aioblescan Apr 4, 2020
@noahbaron
Copy link
Collaborator

Sounds good to me. Not sure if I did this exactly as you suggested (still learning github), but I added a v.2.6 release with a description of the new features on the github release page ui. The new feature description I realized needs to be manually updated in the flow too, so it still shows the v.2.5 new features, will keep this in mind next time.
I agree it should pull based on the releases tag. Will take a closer look at the api.

@tmack8001
Copy link
Contributor Author

@noahbaron I could look at building a small bash script that would be able to be used to generate and populate the "inner flow" changelog, tag and push to github for you.

Then the only manual thing to do would be to create the release in github (which could in theory also be automated in this script using an API token).

@tmack8001
Copy link
Contributor Author

image

nice, love it! Yes you did the release in github right though might want to upgrade the tag destination to a5cbb0777fbc013eff21daef7e3f75196127bbf4 which fixes some of the merge conflicts that happened.

@tmack8001
Copy link
Contributor Author

I also want to explore having a "download and compare" periodic task (once a day / once an hour) which will look at the loaded flow.json and compare it with the remote source for the same version to see if there is a change. This could then be exposed in the UI on this same admin / version description experience to signal that the tiltpi effective flow has been modified by the end user.

@noahbaron
Copy link
Collaborator

noahbaron commented Apr 6, 2020 via email

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