hashicorp / hashicorp/nomad

Evaluation GET API ignores namespace value

Open
#12,919 0 comments 0 reactions 0 assignees View on GitHub
theme/api theme/namespaces type/bug
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

### Nomad version
1.3 beta

### Operating system and Environment details

MacOS

### Issue

When getting a single eval at /v1/evaluation/ID, if you pass in a bad namespace, it still returns an evaluation.

### Reproduction steps

Call the evaluation API with a non-matching namespace value, like so:

`nomad operator api -verbose -namespace="BAD_NAMESPACE_VALUE" /v1/evaluation/dc5ba85c-7aa3-df14-7ba8-4d5319a67bd5 | jq`

#### Expected Result

The evaluation should only be returned if it is in the given namespace.

#### Actual Result

The evaluation will return regardless of namespace

![GET Eval with bad Namespace](https://user-images.githubusercontent.com/2732204/167220088-97cb1d82-f153-4870-947b-1c47430145a9.jpg)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the GET /v1/evaluation/ID API endpoint and reproduce the issue with the provided nomad operator api command using a non-matching namespace. Trace how the namespace is handled for a single evaluation; done means the evaluation is returned only when it belongs to the requested namespace.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.