-
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
Sync script for updating frontend #6
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.
Took this for a spin and seems to work like a charm.
I think is an awesome starting point, left a couple of comments just to think about a couple of points, but IMO it's good to go.
package.json
Outdated
@@ -48,5 +48,8 @@ | |||
}, | |||
"resolutions": { | |||
"rxjs": "6.6.3" | |||
}, | |||
"dependencies": { | |||
"request-promise-native": "^1.0.9" |
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.
shouldn't this be a dev dependency?
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.
Not sure. This required for running script. I'll check it out.
@@ -0,0 +1 @@ | |||
f1b3c8ba4b9f2a3f3f35d8dd092de541784eac67 |
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.
maybe we can start with bb45f5fedc
(which is the react migration commit) as we did a few changes both here and in upstream. What do you think?
|
||
const GH_OWNER = 'grafana'; | ||
const GH_REPO = 'grafana'; | ||
const ES_DIR_PATH = 'public/app/plugins/datasource/elasticsearch'; |
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.
I was thinking that instead of this we might want a config file with local/path <-> upstram/path
for each file/dir we need to sync, so that this would also take care of dependencies for example. wdyt?
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.
Yes, sounds good. Maybe we can reorganize files a bit to make it easier to sync.
This PR adds some helpful scripts for syncing changes with upstream changes in open source Grafana. It's a bit tricky since we have slightly different code (imports, some dependencies), but looks promising. Script gets a latest changes in the elasticsearch data source folder and then formats it as a git patch. Changes only fetched from the last sync (last sync commit hash is stored in the
.upstream.lock
file). In most of cases git patch fails, but I use 3 way merge, so changes can be reviewed and applied manually. Example of usage: