-
Notifications
You must be signed in to change notification settings - Fork 805
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(cloudrun): Adding cloudrun provider functionality in orca. #4279
Conversation
We prefer that non-test backend code be written in Java or Kotlin, rather than Groovy. The following files have been added and written in Groovy:
See our server-side commit conventions here. |
@sanopsmx any chance |
Will write and test and check in. Give me sometime..i will write it in java and check in. |
Modified the code from groovy to java. |
...oovy/com/netflix/spinnaker/orca/kato/pipeline/strategy/DetermineSourceServerGroupTask.groovy
Outdated
Show resolved
Hide resolved
...netflix/spinnaker/orca/clouddriver/tasks/servergroup/WaitForRequiredInstancesDownTask.groovy
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of comments. Can you add some tests for the new functionality as well please?
@@ -49,6 +50,7 @@ class DetermineSourceServerGroupTask implements RetryableTask { | |||
|
|||
@Override | |||
TaskResult execute(StageExecution stage) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: space not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@Component | ||
public class CloudrunServerGroupCreator implements ServerGroupCreator { | ||
|
||
@Autowired ObjectMapper objectMapper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constructor injection is preferred over property injection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
try { | ||
yamlMap = yamlReader.readValue(configStr, LinkedHashMap.class); | ||
if (yamlMap.get("metadata") != null | ||
&& ((LinkedHashMap<String, Object>) yamlMap.get("metadata")).get("labels") != null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the cast to LinkedHashMap necessary here or can it just be Map?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Added test cases and sent it for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is part of spinnaker/governance#302
Adding cloudrun provider functionality in orca.