-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[server] bump GitLab API library #13001
Conversation
started the job as gitpod-build-at-gl.1 because the annotations in the pull request description changed |
const projectsWithAccess = await api.Projects.all({ | ||
min_access_level: "40", | ||
perPage: 100, | ||
pagination: "keyset", |
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.
Hi @gtsiolis! Would you like to test this change on the preview environment? Maybe you know how to find the 101 repo in the GitLab org/group?
It's not an urgent request, actually just trying to test-ride the new release of the API library.
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.
@AlexTugarev I don't have maintainer access to such a long list of repositories to try this but took 10 minutes to create a list of 101 repositories via command line in a reproduction group.
However, I can already find the 101th repository in Gitpod.io, see screenshot below. 💭
For this preview environment, when I add the GitLab integration I'm stuck in the fetching repositories screen with the following error in console.
Error: Request getProviderRepositoriesForUser failed with message: Response code 405 (Method Not Allowed)
Gitpod.io | This preview environment |
---|---|
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.
@gtsiolis, in the meantime, I was able to create a test script to create ~200 test projects in https://gitlab.com/alex-gp-test-group?page=1 and wrote a unit test for the request which was expected to be broken. not to forget, those tests are not automated, as they require a personal OAuth token in the environ.
That said, I'd be more than happy if you could retest after next build is deployed to preview. 🙏🏻
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'll make a screenshot to the description as well, once I could verify it myself.
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.
... in the meantime, I was able to create a test script to create ~200 test projects ...
🙂
... wrote a unit test for the request which was expected to be broken. not to forget, those tests are not automated, as they require a personal OAuth token ...
It could be nice if we could use a dedicated group for such integrations tests, right? Cross-posting a relevant comment from #5362 (comment) for visibility.
... if you could retest after next build is deployed to preview
I'll keep an eye on the build[1].
I'll make a screenshot to the description as well
Thank you! 🙇
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.
@AlexTugarev I tested this again and works as expected. I can see the 101th repository. ✔️
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.
@gtsiolis, see the updated description. Also, sorry to have you seen the broken state in between. 🤦🏻♂️
c09ec17
to
981c285
Compare
verified: true, | ||
}, | ||
}); | ||
expect(result.length).to.be.greaterThan(200); |
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.
better this not-automated test, than nothing.
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.
UX LGTM. Approving this but this will need an approval also from @gitpod-io/engineering-webapp
.
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 just read through the code, but haven't tested. Adding hold in case this needs more manual testing.
/hold
this also adds test for changed API and a test to verify that `Projects.all` is paginated as expected.
We have folks blocked on this for their evaluations. Please merge as soon as possible. |
/werft run Testing the GitLab features to get a sense of current state of GitLab features affected by this PR. 'Merging then, if nothing seems to be broken. |
started the job as gitpod-build-at-gl.8 because the annotations in the pull request description changed |
/hold cancel |
Description
PR updates GitLab API library, adds tests to cover changes and verify that the paginated requests now works as expected.
Related Issue(s)
Fixes #12970
How to test
export GITPOD_TEST_TOKEN_GITLAB='{ "value": "F00....", "scopes":[] }'
cd components/server && npx mocha --opts mocha.opts './**/gitlab-*.spec.ts' --exclude './node_modules/**'
Projects.all
requestcreateManyRepos
to create/new
Release Notes
Documentation
Werft options: