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

ACL support for scaling APIs #7418

Merged
merged 5 commits into from
Mar 23, 2020
Merged

ACL support for scaling APIs #7418

merged 5 commits into from
Mar 23, 2020

Conversation

cgbaker
Copy link
Contributor

@cgbaker cgbaker commented Mar 22, 2020

Added new ACL capabilities for autoscaling:

  • read-job-scaling
  • scale-job
  • list-scaling-policies
  • read-scaling-policy

Updated read and write policy dispositions, added new autoscaler policy disposition

Updated scaling API endpoints to check ACL capabilities

Closes #7411

One fun bit with this one.... because the scaling policies are embedded in the job, I wrote this to allow hitting those endpoints if you would otherwise have been able to see the scaling policies by looking directly at the encapsulating job.

@cgbaker cgbaker changed the base branch from master to scaling-api March 22, 2020 14:25
@cgbaker cgbaker marked this pull request as ready for review March 23, 2020 01:02
@cgbaker cgbaker self-assigned this Mar 23, 2020
Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

CircleCI lint is failing and a test which seems to reference count diff which makes me think its a real failure. I could be mistaken on these though.

"github.com/stretchr/testify/require"
"testing"
"time"
Copy link
Member

Choose a reason for hiding this comment

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

nit: import sorting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and a test which seems to reference count diff which makes me think its a real failure. I could be mistaken on these though.

thanks, i didn't notice the lint and i had forgotten about that test failure. sorry to take up the braincycles on that.

cgbaker added 5 commits March 23, 2020 12:44
- read-job-scaling
- scale-job
- list-scaling-policies
- read-scaling-policy

updated the read and right policy dispositions, added the new autoscaler disposition
added ACL protection in Job.Scale
in Job.Scale, only perform a Job.Register if the Count was non-nil
@cgbaker cgbaker force-pushed the f-7411-scaling-acls branch from 22edfc0 to da3c2a4 Compare March 23, 2020 12:45
@cgbaker cgbaker merged commit de87898 into scaling-api Mar 23, 2020
@cgbaker cgbaker deleted the f-7411-scaling-acls branch March 23, 2020 13:00
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Scaling] ACL support for new scaling endpoints
3 participants