-
Notifications
You must be signed in to change notification settings - Fork 1.1k
skip aws api check when regions are passed from config #3124
Conversation
The preflight check is used to initialise the AWS state when that's needed, but it's also used if I'm not sure why using ECR from Fargate (as in #3015) is different to using ECR from anywhere else. If you can give an explanation why this is the right change to fix 3015, I'd appreciate it. The way forward then would be to separate the preflight check from the region calculation, so the check can still be called as an assertion. |
I don't think this is a complete change to fix ECR on Fargate, I figured I would push it just in case anyone else ran into this issue and needed a quick workaround ( assuming they cared more about having it work than having it not work since this breaks the assertion ). I'm not actually running this on Fargate at all, but my setup reproduces the same error mentioned in #3015. I'm using IAM roles for service accounts to provide IAM permissions to this pod. The pod is running on an EC2 nodegroup where I have blocked access to the EC2 metadata service in able to prevent the pods from accessing the instance credentials, per best practice. So the issue arises when flux is unable to access the EC2 metadata service. This can be verified by looking at the error pbn4 reported. Currently the preflight check doesn't actually have any bearing on whether you'll be able to actually connect to ECR, only whether you can connect to the EC2 metadata service - a totally separate and unrelated service. I believe there are two changes that should be made to properly fix this:
Unfortunately I don't think 2 always works if I understand some of the use cases right. Originally I was wondering if we could simply call |
That's a good diagnosis, I understand it much better now. So paraphrasing a little, there's two problems to be solved, potentially:
.. and the latter is tricky because it may not be possible to check ECR access before knowing an account or region to check with. I would be happy for the first problem to be solved, without the second; people that are using |
this is also a problem when running flux locally, e.g. in minikube and the containers are in ECR. i dont really see a reason why you cant have a successful prefilight check by just setting @squaremo can you elaborate the 2nd point? if the ec2 api fails you can simply check if |
Greetings, If you can pull I cannot merge or adopt your commits without the DCO, please rebase and squash, and sign off Thank you for your contribution! |
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.
Did you mean to make any changes in .dockerignore
, .github/workflows
, or Dockerfile
?
When you rebase, could you remove these changes first?
Happy to do so tomorrow, that most recent commit was just for an internal build - will prune it so we can get this merged |
I'm not especially comfortable reviewing this change by myself since I don't have an environment that I can test it in, to prove to my satisfaction that it has the desired effects. But it seems like the discussion has already been talked out and with a maintainer satisfied that the change is OK, I would be happy to merge and include it in the release. The DCO is check is unfortunately still blocked. But... I can apparently also bypass it now. Either someone with higher permissions than +v is listening and has found a way to grant me the ability to mark the DCO check as passing, or... 👻 If you're having trouble rebasing, please let me know, I can help; there is still time to merge in for the next release! Thanks again. |
It's no problem, we can have a 1.22.1 release out soonish if this is still needed. Whenever you get around to it is fine. |
Signed-off-by: eV <ev@7pr.xyz>
sorry for the delay - i've removed the last commit, rebased on origin/master and amended with |
I was going to rebase this and retry it against the latest commit in Alternatively, if you can I can't merge or take any further action until one of these actions is taken. Thanks again for your contribution. |
We're working our way down to zero backlogged PRs. This is one that I think we wanted to merge. If you can set the "maintainers with write access can edit this branch" flag on the PR, I can try to move it forward. Thanks for using Flux! |
I think the DCO sign-off is what is supposed to empower me to reopen this as a new PR in my name without asking for permission, so I can run the tests again and make any changes needed, since this submitter left off the "maintainers can edit this PR" flag. At this time I don't have any changes only a clean rebase on v1.22.2 version of Flux release and am pushing a new PR with head revision eebe032 so that it can be re-tested for FOSSA which failed with rate limiting errors. I'm not stating any opinion or approval by reopening this PR, just trying to move things along (and also get it out of the queue if possible, since it seems to be stuck here.) |
Closing in favor of #3485, which is expected to be passing in CI |
fixes #3015