-
Notifications
You must be signed in to change notification settings - Fork 716
Use ECS properties instead of container properties #6270
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
Nice, let's test using |
@jorgee aws tests are failing |
It seems the tests are failing because of the job definition reuse. The old definition is using containerProperties and the new one is trying to override with ecsProperties. If I am not wrong, the job definition is reused if container name and nf-token is the same, isn't it? So, I think we should include something else to the token to ensure both are using the same container or ecs properties. |
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Token was basically hashing the result of |
Launching some e2e tests |
@jorgee would not this impact also the xpack plugin for amazon? |
The xpack is overriding the |
When testing with xpack I have got this error. Not sure yet if it is related to this change or happening also with the master.
|
It was an xpack gradle problem. Working after applying the fix. |
taskArn = getTaskProperties(job)?.taskRoleArn() | ||
?: job?.container()?.taskArn() |
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.
Why now check first getTaskProperties(job)
and then job?.container()?.taskArn()
?
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.
I got it from Tom's PR #5391. I think it is needed because of the reuse of job definitions. If the job was defined with ECS, the information is inside TaskProperties
. If it is reusing an old definition with container properties, the taskProperties
are empty and you need to get in the Container
. It is the same for other job properties.
Maybe, with the change I did to do not reuse jobs definitions with container properties, it is not needed (54ee92b). However, I am not 100% sure because the hash is only applied when container properties are defined, and there could be cases were old definitions are still reused. Maybe the best is just add a comment to explain it.
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.
Not sure to follow, if it's an improvement it should go into a separate PR and keep this as a mere SDK upgrade
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.
It is not an improvement. When using ECS properties in the task definition (the goal of the PR), some properties that were obtained before from the container are now inside TaskProperties. This is why we check them first in getTaskProperties(job)
, it is the expected place with the new definition. We have a fallback to the old container properties because of the job definition reusage. If a job submission is reused with the old container properties, the task properties will be empty and we should get them from the container properties as before.
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.
ok, triggered e2e tests
It seems that something is broken with the e2e test triggering condition. It has not triggered the e2e tests. |
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
The problem was the git commit message was returning a string with escapes due to
I have changed |
Closes #5096
Ports the @tom-seqera implementation in #5391 to AWS SDK v2 implementation.
With the
RegisterJobDefinitionModel
andContainerPropertiesModel
introduced by @pditommaso, these changes shouldn't affect the xpack as the interface it extends remains untouched.