hashicorp / hashicorp/nomad

Pull logic out of nomad/Job.Register into admission controllers

Open
#7,020 2 comments 1 reaction 0 assignees View on GitHub
theme/cleanup theme/core type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

The `Job.Register` function makes use of fancy new new admission controller tooling for validating only a couple of recent things. Let's extract more blocks of logic out of this function into their own controllers, e.g.
- Volume Permissions
- Enforce Modify Index
- Valid Update Transitions
- Vault Policy Permissions
- Consul Connect Task Permissions
- Sentinel Policy Enforcement

This will help make these critical bits of functionality more easily individually testable.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in nomad/Job.Register and review the existing admission controller tooling used for recent validations. Trace the listed logic blocks—Volume Permissions, Enforce Modify Index, Valid Update Transitions, Vault Policy Permissions, Consul Connect Task Permissions, and Sentinel Policy Enforcement—and determine their boundaries. Done means the selected blocks are extracted into admission controllers and can be tested individually.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.