-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
lab 0.18.0 behavior change #558
Comments
Hi @chenrui333 , thanks for opening this issue. |
no worries, thanks for picking this up. |
Any updates? |
Not yet, sorry. |
@bmeneguele @chenrui333 : I think I have a solution. Will update in a minute. |
chenrui333 noted in zaquestion#558 that the goreleaser test for lab was failing. The test is a simple execution of the git wrapper capabilities of lab. The test does: git init touch haunted touch house git add haunted house git commit -a -m "Initial Commit" lab ls-files and expects the output of the last command to be haunted house The test currently fails on the command line with [prarit@prarit dummy (master)]$ LAB_CORE_HOST=foo LAB_CORE_USER=bar LAB_CORE_TOKEN=baz lab ls-files Create a token with scope 'api' here: profile/personal_access_tokens Enter default GitLab token, or leave blank to provide a command to load the token: instead of displaying the list of files. This occurs because the code does not check to see if LAB_CORE_TOKEN is set before querying the user for a token. Check that LAB_CORE_TOKEN is set before querying the user for the token. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Reported-by: @chenrui333 (in zaquestion#558) Cc: Bruno Meneguele <bmeneg@redhat.com>
@prarit thanks for the help :) didn't have time to get a closer look at it. |
I think it has something to do with the way we're wrapping 'git'. 'lab -h' outputs the git help, while 'lab --help' outputs lab's help. |
much better than last time
|
chenrui333 noted in zaquestion#558 that the goreleaser test for lab was failing. The test is a simple execution of the git wrapper capabilities of lab. The test does: git init touch haunted touch house git add haunted house git commit -a -m "Initial Commit" lab ls-files and expects the output of the last command to be haunted house The test currently fails on the command line with [prarit@prarit dummy (master)]$ LAB_CORE_HOST=foo LAB_CORE_USER=bar LAB_CORE_TOKEN=baz lab ls-files Create a token with scope 'api' here: profile/personal_access_tokens Enter default GitLab token, or leave blank to provide a command to load the token: instead of displaying the list of files. This occurs because the code does not check to see if LAB_CORE_TOKEN is set before querying the user for a token. Check that LAB_CORE_TOKEN is set before querying the user for the token. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Reported-by: @chenrui333 (in zaquestion#558) Cc: Bruno Meneguele <bmeneg@redhat.com>
Thanks @chenrui333, I've added one additonal change. Can you do another test on #559 ? |
Yes, it is. Last time I changed the code I didn't notice the diff. I'm going to review it. |
chenrui333 noted in zaquestion#558 that the goreleaser test for lab was failing. The test is a simple execution of the git wrapper capabilities of lab. The test does: git init touch haunted touch house git add haunted house git commit -a -m "Initial Commit" lab ls-files and expects the output of the last command to be haunted house The test currently fails on the command line with [prarit@prarit dummy (master)]$ LAB_CORE_HOST=foo LAB_CORE_USER=bar LAB_CORE_TOKEN=baz lab ls-files Create a token with scope 'api' here: profile/personal_access_tokens Enter default GitLab token, or leave blank to provide a command to load the token: instead of displaying the list of files. This occurs because the code does not check to see if LAB_CORE_TOKEN is set before querying the user for a token. Check that LAB_CORE_TOKEN is set before querying the user for the token. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Reported-by: @chenrui333 (in zaquestion#558) Cc: Bruno Meneguele <bmeneg@redhat.com>
Close as it is resolved. Thanks @prarit @bmeneguele! |
👋 looks like the lab 0.18.0 behavior got changed (it requires the gitlab PAT before proceeding to do something meaningful) and now the test started not working.
Interesting enough, I found the similar test code in the codebase. Not sure if some real test token was used in the goreleaser process.
relates to Homebrew/homebrew-core#68377
The text was updated successfully, but these errors were encountered: