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:

@rbeuque74 rbeuque74 requested review from loopfz and wI2L December 21, 2021 17:20
@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 ✔

@rbeuque74 rbeuque74 force-pushed the dev/rbeuque/templating branch from 68e8d02 to 91b4374 Compare December 21, 2021 17:43
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
@rbeuque74 rbeuque74 force-pushed the dev/rbeuque/templating branch from 91b4374 to 6f4349f Compare December 29, 2021 13:43
@rbeuque74 rbeuque74 requested review from wI2L and rclsilver May 3, 2022 09:11
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 <[email protected]>
@rclsilver rclsilver force-pushed the dev/rbeuque/templating branch from 6f4349f to c617897 Compare May 6, 2022 10:33
Signed-off-by: Thomas Bétrancourt <[email protected]>
@rclsilver rclsilver force-pushed the dev/rbeuque/templating branch from c617897 to 7c898db Compare May 6, 2022 10:33
@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.

5 participants