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

feat: api: add a route to resolve a templating expression #303

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rbeuque74
Copy link
Member

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    feature

  • What is the new behavior (if this is a feature change)?
    When debugging a failed task, we often need to resolve templated value
    that we struggle to inspect. POST /resolution/:id/templating will
    execute a templating expression given as input, and returns the resolved
    expression as output. This route can only be used by admins.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    No

  • Other information:

@ovh-cds
Copy link
Collaborator

ovh-cds commented Dec 21, 2021

CDS Report test#1193.0 ✘

  • tests and lint
    • golangci-lint ✘
    • unit-test and integration-tests ✔

utask.go Outdated Show resolved Hide resolved
api/handler/resolution.go Outdated Show resolved Hide resolved
api/handler/resolution.go Outdated Show resolved Hide resolved
rclsilver
rclsilver previously approved these changes May 3, 2022
When debugging a failed task, we often need to resolve templated value
that we struggle to inspect. POST /resolution/:id/templating will
execute a templating expression given as input, and returns the resolved
expression as output. This route can only be used by admins.

Signed-off-by: Romain Beuque <556072+rbeuque74@users.noreply.github.com>
Signed-off-by: Thomas Bétrancourt <thomas@betrancourt.net>
@wI2L
Copy link
Contributor

wI2L commented Apr 27, 2023

Note: this route should be restricted to admin users, to avoid leaking sensitive informations from resolutions.

Copy link
Contributor

@wI2L wI2L left a comment

Choose a reason for hiding this comment

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

Protect route.

@wI2L wI2L added the 🚧 WIP 🚧 Work in progress label label Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚧 WIP 🚧 Work in progress label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants