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

Feature request: Add log to debug interaction with GitLab #226

Open
elucify opened this issue Nov 22, 2022 · 1 comment
Open

Feature request: Add log to debug interaction with GitLab #226

elucify opened this issue Nov 22, 2022 · 1 comment

Comments

@elucify
Copy link

elucify commented Nov 22, 2022

The instructions in the plugin say to "Link to an existing entity file
Example: https://github.com/backstage/backstage/blob/master/catalog-info.yaml"

That URL produces the file in the UI (though not the raw version), but putting that in the Backstage UI produces a 400 from (presumably GitLab?)

Screenshot 2022-11-22 at 5 33 20 PM

There's nothing in the frontend or backend log that indicates what URL it tried to use, or how GitLab responded.

Maybe also the backend should be able to handle repositories URLs (/api/v4/projects/:id/repository/files/:filepath/raw?ref=branch) also. That URL would work, but the Backstage UI complains that it's not a file (I'm guessing because it doesn't end in .yaml).

Screenshot 2022-11-22 at 5 38 39 PM

Basically I have no way to write a URL that gets catalog-info.yaml that will be accepted by both the Backstage UI and the GitLab UI via a personal access token. And I'm kind of in the dark about where the problem is, because Backstage doesn't say what it's trying to do.

@elucify
Copy link
Author

elucify commented Nov 22, 2022

Trying the sort of URL recommended by the UI produces this:

Screenshot 2022-11-22 at 5 40 45 PM

Not too surprising, since this is what curl does:

$ curl -D - -H "PRIVATE-TOKEN: $GITLAB_TOKEN" 'https://gitlab.be-md.ncbi.nlm.nih.gov/..../project-slug/blob/backstage/catalog-info.yaml'
HTTP/1.1 302 Found
Server: nginx
Date: Tue, 22 Nov 2022 22:40:10 GMT
Content-Type: text/html; charset=utf-8
Location: https://gitlab.be-md.ncbi.nlm.nih.gov/users/sign_in
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Request-Id: 01GJGQZBB26P8YTM672X3PV9MT
X-Runtime: 0.037568
X-Ua-Compatible: IE=edge
X-Xss-Protection: 1; mode=block
Strict-Transport-Security: max-age=63072000
Referrer-Policy: strict-origin-when-cross-origin

(Some headers redacted)

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

1 participant