-
Notifications
You must be signed in to change notification settings - Fork 4
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
MIDRC-768 Check if instance type is available in AZ when creating subnets for Nextflow #111
Conversation
Please find the detailed integration test report here Please find the ci env pod logs here |
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.
Minor comments, but looks good.
Please find the detailed integration test report here Please find the ci env pod logs here |
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.
Some minor suggestions and questions. Otherwise Looks good to me.
hatchery/nextflow.go
Outdated
}, | ||
{ | ||
Name: aws.String("instance-type"), | ||
// TODO: Should this be configurable? |
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.
Do we need this TODO:
comment? To whom is this question pointed out to?
hatchery/nextflow.go
Outdated
return nil, fmt.Errorf("Error describing instance type offerings: %v", err) | ||
} | ||
if len(result.InstanceTypeOfferings) > 0 { | ||
Config.Logger.Printf("Debug: Zone: %v has instance type g4dn.xlarge available. Using that for subnet", *zone.ZoneName) |
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.
Maybe change this from the hardcoded g4dn.xlarge
to {instanceType}
variable.
hatchery/nextflow.go
Outdated
// TODO: read instance type from config. (MIDRC-751) | ||
subnetId, err := setupSubnet(subnetName, subnetString, vpcid, ec2svc, "t2.micro") |
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.
This hardcoded string will be changed to a configurable value as a part of a future ticket. Right?
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.
yes, see comment. MIDRC-751
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.
looking at the changes this doesn't look right: setupSubnet
's instanceType
parameter is the type we want for nextflow jobs instances, it's not the squid instance type we want to configure in MIDRC-751 - it should be g4dn.xlarge
not t2.micro
. I think you got it confused with this?
so i think it should be:
setupSubnet(... availableInstanceTypes=["g4dn.xlarge"]) <-- get list from config
[...]
// TODO: read instance type from config. (MIDRC-751)
launchSquidInstance(... instanceType="t2.micro")
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.
You are right pauline. This instance type is just indicating the value for the subnet. t2.micro
is sent as an argument to setupSubnet
only within the setupSquid
method (here) whereas setupSubnet
method while creating Nextflow Resources uses the instance type that is defined in the hatchery config (here)
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.
hatchery/nextflow.go
Outdated
// Make sure the selected AZ has the instance type from nextflow configuration available. | ||
var selectedZone string | ||
for _, zone := range describeZonesOutput.AvailabilityZones { | ||
if *zone.State == "available" { |
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.
Instead of adding an if
condition here checking for availability of an Availability Zone, can we add a filter in the above line?
describeZonesOutput, err := ec2Svc.DescribeAvailabilityZones(&ec2.DescribeAvailabilityZonesInput{})
Note: I haven't looked too deep into the docs, but if the input is used as a filter, maybe that is better than us filtering it ourselves.
Please find the ci env pod logs here |
Please find the ci env pod logs here |
Please find the detailed integration test report here Please find the ci env pod logs here |
Please find the detailed integration test report here Please find the ci env pod logs here |
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.
Thanks for updating this PR @nss10. I still think this comment hasn't been addressed, i could have misunderstood but could you have a look at it?
hatchery/nextflow.go
Outdated
// TODO: Should this be configurable? | ||
Values: []*string{aws.String(instanceType)}, |
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.
let's remove the todo
Please find the detailed integration test report here Please find the ci env pod logs here |
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.
Looks good to me.
Please find the detailed integration test report here |
bf31384
to
e0c8046
Compare
} | ||
Config.Logger.Printf("Created new license-user-map item: %v", newItem) | ||
|
||
} | ||
|
||
allpaymodels, err := getPayModelsForUser(userName) | ||
if err != nil { | ||
Config.Logger.Printf(err.Error()) | ||
Config.Logger.Print(err.Error()) |
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.
If linting issues are also being addressed, shouldn't Line:495 also use Print
instead of Printf
?
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.
That one has been fixed too
Please find the detailed integration test report here Please find the ci env pod logs here |
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.
@nss10 please merge once you have tested the new changes
Link to JIRA ticket if there is one:
New Features
Breaking Changes
Bug Fixes
Improvements
Dependency updates
Deployment changes