You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: .ci/README.md
+55
Original file line number
Diff line number
Diff line change
@@ -95,3 +95,58 @@ The merge job sets the submodules back to tracking their downstream repositories
95
95
`magic-modules` PR #1 is created. `downstream-repo-a` PR #7 and `downstream-repo-b` PR #8 are created from that PR. `magic-modules` PR #2 is created. `downstream-repo-a` PR #9 is created from that PR. PR #7 is merged, then PR #9. Since all of PR #2's downstream PRs are merged, PR #2 is merged, and it includes the changes from PR #1. PR #8 is finally merged, and so PR #1 is ready to be merged.
96
96
97
97
When merging PR #1, if we update `downstream-repo-a` to the merge commit for PR #7, we will go backwards, erasing PR #2. If we update to `master`, we will definitely include both the changes of both PR #1 and PR #2.
98
+
99
+
-------
100
+
101
+
# Troubleshooting The Magician
102
+
103
+
Sometimes, the Magician won't do what you expect! When that happens, try some of these things.
104
+
105
+
## My PR didn't get a Magician run!
106
+
There are several possible reasons. Does your PR have a merge conflict? Is it written by someone who is a collaborator / contributor / member of the `magic-modules` repo?
107
+
108
+
### Check the `magic-modules-new-prs` resource.
109
+
Find your PR number and commit hash, and click on that version to get a detail view.
110
+
#### It didn't work!
111
+
If you don't see your PR number and commit hash, verify the following things:
112
+
- The PR is mergeable.
113
+
- If not, fix the merge conflicts.
114
+
- The author of the PR has the `member`, `contributor`, or `collaborator` badge on the PR page.
115
+
- If not, **manually verify that the PR is appropriate to run through the magician**, and then run the `authorize-single-rev` task on the PR number and hash.
116
+
117
+
### Find the number of the `mm-generate` command that was run.
118
+
It should be prominent in the detail view.
119
+
#### It didn't work!
120
+
Press the 'power' button on the PRs above it and click the '+' button in `mm-generate` - it's very rare, but sometimes Concourse falls behind and drops some things it ought to do. It's also plausible that Concourse was briefly paused for maintenance and more PRs stacked up on top of yours, which prevented Concourse from ever reaching it. In any event, it should continue now. If you *ever* have to do this, tell a Magician maintainer - this is one of those things that we could build alarms for.
121
+
122
+
### Open `mm-generate` and find your run.
123
+
It should be green and list a bunch of tasks that were performed to generate your downstream repos.
124
+
125
+
#### It didn't work!
126
+
If the run isn't listed there, probably it's the case that it's still pending (grey) or there's been a global Magician reboot - find a Magician maintainer to solve the mystery. If the run is listed there but it's red, the error message should help you out. If you're having trouble figuring out what's gone wrong (e.g. it's a puppet / chef build and the error message is swallowed by Concourse), try `fly -t prod hijack magic-modules/mm-generate`. You may have to configure Fly first - see up the page for help on that.
127
+
128
+
### Find the `magic-modules` output hash.
129
+
It should be at the bottom of the page, after `point-to-submodules`.
130
+
131
+
#### It didn't work!
132
+
Something has gone strangely and you should find a Magician maintainer. Make them update this page. :)
133
+
134
+
### Open the `magic-modules` resource from the main page.
135
+
Find your version and click on it to get a detail view. Confirm that the unit tests have run and are green.
136
+
137
+
#### It didn't work!
138
+
If the unit tests didn't run, see above for what happens if `mm-generate` didn't run. If they didn't *pass* ... :)
139
+
140
+
## There was a confusing git error message
141
+
Git's error messages can be obtuse! If you see something about how the `git push` failed, because a rev cannot be pushed if it already exists, you probably have accidentally triggered two Magician runs at the same time - two force pushes which try to push to the same rev at the same time will conflict with each other. If you see something about how the `git clone` failed because an object is unadvertised, you probably have done a `push` / `amend` / `push -f` sequence. Both these errors can be ignored if the pipeline is progressing. If the pipeline has stopped progressing, try to run the failing step again with the '+' button.
142
+
143
+
## The Magician failed while running on my submitted PR
144
+
If Concourse notices the Magician's pushes to your PR before it notices that the Magician has merged your PR, it might try to generate again - this is always safe, don't worry. :)
145
+
146
+
## I submitted some generated PRs, but not all of them, and I need to make a change.
147
+
This is the most common issue and the solution isn't complicated. If you delete all the `depends: ...` lines from the Magician's comments, the Magician will think that it is starting over from scratch. It'll push to the `codegen-pr-##` branch, instead of the `codegen-sha-######` branches, and it'll try to open PRs from those branches. If you want a clean experience, you can close your existing PRs (just hit 'Close' at the bottom of the PR, don't merge them) and The Magician will do the right thing.
148
+
149
+
If you want to leave those PRs open for some reason (preserve comments, because an external partner is watching them, etc), no problem, the magician will still do the right thing, it'll just update the PRs in the `mm-generate` step (*before* the tests) rather than in `create-prs` (*after* the tests) - your PR will still get updated even if the generated code fails tests.
0 commit comments