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

Add a Horreum passthrough API #93

Merged
merged 2 commits into from
May 31, 2024
Merged

Conversation

dbutenhof
Copy link
Collaborator

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

Any Horreum GET API path, including query parameters, can be passed to GET /api/v1/horreum/api/{path}: e.g., /api/v1/horreum/api/test?limit=10 or /api/v1/horreum/api/test/byName/FakeTest. The query will be authorized using the configured CPT project Horreum credentials.

The Horreum status, response body, and response headers will be returned to the caller.

Related Tickets & Documents

Issue PANDA-367

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please describe the System Under Test.
  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Deployed locally using local-compose.sh, along with a local populated Horreum instance, verified using curl. E.g.,

$ curl -sS http://localhost:8000/api/v1/horreum/api/test|jq
{
  "tests": [
    {
      "access": "PROTECTED",
      "owner": "dev-team",
      "id": 10,
      "name": "Fake",
      "folder": null,
      "description": "Another fake test",
      "datastoreId": 1,
      "tokens": [],
      "timelineLabels": [
        "start"
      ],
      "timelineFunction": null,
      "fingerprintLabels": [
        "job"
      ],
      "fingerprintFilter": null,
      "compareUrl": null,
      "transformers": [],
      "notificationsEnabled": true
    }
  ],
  "count": 1
}

Copy link
Member

@chentex chentex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for the contribution!

@dbutenhof
Copy link
Collaborator Author

LGTM. Thank you for the contribution!

Happy to help. Is there someone else who needs to approve this before it gets merged?

@chentex
Copy link
Member

chentex commented May 22, 2024

I've asked another set of eyes to take a look, will merge if nothing comes up

@chentex
Copy link
Member

chentex commented May 23, 2024

Hi @dbutenhof could you rebase your PR.

Any Horreum `GET` API path, including query parameters, can be passed to
`GET /api/v1/horreum/api/{path}`: e.g., `/api/v1/horreum/api/test?limit=10`
or `/api/v1/horreum/api/test/byName/FakeTest`. The query will be authorized
using the configured CPT project Horreum credentials.

The Horreum status, response body, and response headers will be returned to
the caller.
@chentex chentex merged commit 592a572 into cloud-bulldozer:main May 31, 2024
1 check passed
@dbutenhof dbutenhof deleted the horreum branch May 31, 2024 11:23
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

Successfully merging this pull request may close these issues.

2 participants