-
Notifications
You must be signed in to change notification settings - Fork 900
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
bin/update can leave a developer in a bad state #15926
Comments
👍 I like the idea, but how do we make it noticeable? Currently the STDOUT of |
@Fryguy as I started to elude to regarding " @jrafanie idea" in second part of this comment: ManageIQ/miq_bot#357 (comment) There are a few things to keep in mind with this approach.
|
@bdunne it is ~840 lines of text if you yarn is up to date and you don't have any migrations to run... far worse if that is not the case. |
I agree. We may have to do something to cut down on some of the "info" messages from yarn.
I could see it making sense, if you don't have the latest fine branch locally for some reason. I disagree about the non-triviality...you can
┬─┬ ︵ /(.□. \) |
|
Close - you actually want to check that |
I think you are still missing the point. People are not just going to run Every suggest is assuming you are running from the master branch, but rarely are people working from that branch directly.
Again, this doesn't help. Your remote doesn't matter when it comes to the git gems. They are dependent on |
I'm going, again, back to the point of 'you should always just run the latest' (unless you know what you're doing, in which case add a flag and do whatever you want). Since bin/update updates your gems to their latest, you should be expected to have your feature branch up to date as well. This greatly simplifies the solution. This is a byproduct of having unlocked git-based gems, as I've been saying from the beginning. If you really want things in sync, either version actual gems or start setting refs to lock to in the Gemfile (which introduces it's own set of nightmares, I'm not actually recommending this), and let's not invent our own git-dependency resolution nightmare. |
right...thats what I meant by "share the tip commit", but I didn't elaborate on that I meant the remote master's HEAD, so thanks for the clarification. To clarify even further, the script would know which remote, so on any branch off of master it would check the remote master's HEAD, but a branch off of fine, would know to check remote fine's HEAD.
That is exactly what I am describing (and which @chrisarcand clarified). If the remote master's HEAD is in your branches' history then you are up-to-date. |
While I missed the intent of what he was saying until you actually made it more clear, it still has two flaws:
To clarify the last point, what I mean is even on a slow day, like today, 6 pull requests were merged into master, so except for right after you rebase, chances are the next time you run |
Turns out this is easier than I thought, since it's built-in to git... |
Hi @Fryguy [root@miq02 vmdb]# git remote -v
origin https://github.com/ManageIQ/manageiq.git (fetch)
origin https://github.com/ManageIQ/manageiq.git (push)
[root@miq02 vmdb]# git log -1
commit 5bf92a4f7f8bf33eb2ae160d7519dd842e9c4b81
Merge: 61474a7 c5cba61
Author: Martin Povolny <[email protected]>
Date: Fri Aug 11 10:10:14 2017 +0200
Merge pull request #15778 from lpichler/visible_for_current_user
Replacement for CustomButton#available_for_user
[root@miq02 vmdb]#
[root@miq02 vmdb]# git merge-base --is-ancestor remotes/upstream/master HEAD
fatal: Not a valid object name remotes/upstream/master
[root@miq02 vmdb]#
|
@tjyang since your remote is named origin, you'll need to change the command to this: |
@jrafanie , thanks for the pointer for correct command. I need to learn git more. |
@jrafanie , sorry to bug you again.
|
The exit status will tell you out of date, so |
$ git fetch upstream
$ git merge-base --is-ancestor remotes/upstream/master HEAD
$ echo $?
1 # <= means I'm out of date |
@Fryguy . Thank you for you git usage guidance. Following is the successful log for my environment.
|
This issue has been automatically marked as stale because it has not been updated for at least 6 months. If you can still reproduce this issue on the current release or on Thank you for all your contributions! |
@Fryguy is this still a valid issue. If not can you close. |
Closing issue. If you feel the issue needs to remain open, please let me know and it will be reopened. |
As discussed in ManageIQ/miq_bot#357, bin/update can leave a developer in bad state where they may have "oldish" code in ManageIQ/manageiq locally, but then pull in the "new" code from the dependent git repos. That "new" code may be incompatible with the local "oldish" code, leading to errors that just confuse the developer.
We can't force a git pull locally, in particular, if the user has changes locally they are trying to test with. So, the proposal is to emit a warning (credit goes to @jrafanie)
Proposal: Make ManageIQ/manageiq's bin/update print out a nice red warning that your branch is not up to date with master and recommend that you rebase against it. From the plugin perspective, in the bin/update files of the plugin repos, where it sees you are using a symlinked spec/manageiq directory, that can print out a nice red warning that the spec/manageiq is not up to date with master (this should be coded into the generator).
cc @NickLaMuro @jrafanie @bdunne @chrisarcand
The text was updated successfully, but these errors were encountered: