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

recurring 403 errors while provisioning the conflict-practices repositories #350

Open
UncleBats opened this issue Mar 1, 2022 · 6 comments

Comments

@UncleBats
Copy link

UncleBats commented Mar 1, 2022

Problem:
The generation of the conflict-practices repositories cannot be handled unattended. It requires a lot of reruns on bigger classes and takes full concentration that you cannot give your class while resolving this. The bigger the class the bigger the problem

Observed behavior:
The generation of the conflict-practices repositories (option 4 in the scrip) is giving recurring 403 errors. Every 4th repository it is trying to make results into HTTP 403 Forbidden warning. Every consecutive repos gets the same.

Workaround:
This requires you to rerun the script, skipping every repository you already created. You will need to do this roughly for the #contributors / 4.

Expected behavior:
Script generates conflict-practices repositories unattended while I can focus on teaching the class

I have provided a the full log and console log
console log.txt
log.txt

@amyschoen
Copy link
Collaborator

This part immediately looks strange to me:

Username for 'https://github.com': ericksegaar
Password for 'https://[email protected]':

Do you have your class tokens properly set up? I never get asked for a username or password.

@UncleBats
Copy link
Author

Ther are two ways to authenticate with the scripts, first is the .trainingmanualrc which contains the token for the GH commands. There is another authentication required for the git commands, that is what you see here.

I believer ther is a separate issue for that.

The only thing this part is doong is asking for authentication for git. As iam using wsl and normally dont use wsl for day to day work I run into all kind of issues. Most of them are already known in other issues (OSTYPE for the sed command, git credential manager so i use a pat token, the missing validation vor correct httpie version that support —quiet)

this is just a line asking me for a git token

@amyschoen
Copy link
Collaborator

I've been running on Mac for years with no issues like you're seeing. Max class size around 30 or so but typically around 20. I wonder if there's some weird quirk specific to WSL.

@UncleBats
Copy link
Author

My guess is you use your mac for day 2 day development work too and have it set up correctly in that manner. I only use WSL to run the scripts. Normally pscore is my script of choice on windows. If the credential manager is set up it will take care of the git authentication, that's why you are not asked to put in username:token. Also the script has some more if statement like if [[ "$OSTYPE" = "msys" ]] then that should be if [[ "$OSTYPE" = "msys" || "$OSTYPE" = "linux-gnu" ]]; then to work in the create-files. Just as an example stated that there are some alternative code flows

@UncleBats
Copy link
Author

UncleBats commented Mar 1, 2022

When following the flow just before the first 403 I track it down to a function in the shared_functions:300
if http --check-status --ignore-stdin --quiet --auth \ "$TOKEN_OWNER:$TEACHER_PAT" "$org_repos_endpoint/$repo/pulls" \ title="$title" \ head="$head" \ base="$base" \ body="$body"; then echo "Done." fi

This is using the token from the .trainersmanualrc and is not related to the Git authentication that was discussed above.

Commonality between all different tries is that it always starts with the "Creating pull request: Minor CSS fixes" after that first failure it constantly fails for all creating PR calls. Other calls can still succeed.

@wulfland
Copy link

wulfland commented Mar 1, 2022

I have the same issue on mac and also have to rerun the script several times. Also the cleanup scripts are not working.

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

No branches or pull requests

3 participants