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

Prevent elastic agent profile selection in Pipeline as code #10864

Open
worapojc opened this issue Sep 28, 2022 · 7 comments
Open

Prevent elastic agent profile selection in Pipeline as code #10864

worapojc opened this issue Sep 28, 2022 · 7 comments

Comments

@worapojc
Copy link

Issue Type
  • Feature proposal
Summary

My use case is that I've one cluster profile and many agent profile for each squad team.

Squad Elastic Agent Profile
Squad-A Squad-A-Build-Agent
Squad-B Squad-B-Build-Agent
Squad-C Squad-C-Build-Agent

I'm also using YAML plugin to allow squad can write their own pipeline as code.

The problem is that the config repo allow to set the permission only Environment, Pipeline and Pipeline Group.

In the config repo of Squad B, it can select Squad-A-Build-Agent profile or Squad-B-Build-Agent profile with elastic_profile_id property.

It cannot prevent elastic agent profile selection as code.

In the UI, it's OK because it allows to list and view but you cannot use the agent profile which is not configured in Role.
https://docs.gocd.org/current/configuration/policy_in_gocd.html#elastic-agent-configuration

Basic environment details
  • Go Version: 22.1.0 (13913-f4c9c1650e2e27fe0a9962faa39536f94f57e297)
  • JAVA Version: 17.0.2
  • OS: Linux 4.14.281-212.502.amzn2.x86_64
Expected Results

The elastic cluster profile and elastic agent profile in Config Repo

@chadlwilson
Copy link
Member

Relates to #7605 where the initial set of rules were implemented.

@worapojc
Copy link
Author

worapojc commented Nov 7, 2022

Hello @chadlwilson, May I ask this feature has planned to implement yet?

@chadlwilson
Copy link
Member

It should be reasonably straightforward to add I think (and makes sense to me), but I didn't get a chance to look at it for 22.3.0 (just released) and think about the right approach here.

@chadlwilson chadlwilson added this to the Release 23.1.0 milestone Nov 7, 2022
@worapojc
Copy link
Author

worapojc commented Nov 7, 2022

Thank you for this follow up.

@chadlwilson chadlwilson removed this from the Release 23.1.0 milestone Feb 19, 2023
@worapojc
Copy link
Author

worapojc commented Mar 3, 2023

Sorry to bother you @chadlwilson, I saw this request was removed from Release 23.1.0.

When it be release on which version? By the way, do we have a workaround to prevent this use case?

@chadlwilson
Copy link
Member

I removed it because I hadn't had time/motivation to work on it and I wanted to release other changes in 23.1.0 soon. I can't commit to any specific release unfortunately. https://www.gocd.org/2023/02/13/gocd-project-status/

The only workaround I can think of might be to implement some kind of pull request process outside GoCD on your config repo changes using some automation that validates the elastic_profile_ids are appropriate for each team/squad's config repo, using rules that you control.

@stale
Copy link

stale bot commented Jun 17, 2023

This issue has been automatically marked as stale because it has not had activity in the last 90 days.
If you can still reproduce this error on the master branch using local development environment or on the latest GoCD Release, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.

@stale stale bot added the stale label Jun 17, 2023
@chadlwilson chadlwilson added no stalebot Don't mark this stale. and removed stale labels Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants