-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix hero alt text #889
Merged
Merged
Fix hero alt text #889
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 took me a while to work out what we're trying to do here is exit with a non-zero if
FunctionError
is equal to some value other than empty string""
. Might be useful to add a comment to this one.Some follow up questions:
FunctionError
is equal to something other than empty string, which is good. But as far as I can see there's nothing in this PR that actually aims to fix the migrations failing. Do we know why this is happening/what the fix is? i.e: this change in itself won't cause the migration to apply correctly next time we deploy.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.
Oh.. hang on.
Is
the fix for failing migrations?
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 sorry, I didn't write a lot of explanation here!
The problem is the typo above: we invoke a Lambda that exists but it throws a 500 because the handler code doesn't exist at that path.
The invocation "works" in that, we have permission to call a function that exists, but "fails" because of this error.
This means we need a way to get a return code that's non-0 somehow, and I thought grepping the JSON was...a way of doing that. I can't see anything in the
aws-cli
docs about exit codes in this situation.In terms of when we run the code and the implication on the deploy...I don't know. We should run the migrations after the code has changed, but how to rollback a failed deploy is a bigger question. At least this makes the error a hard fail that we can be notified about, rather than just working without us knowing.
In terms of other projects...I don't think so. Maybe WCIVF does the same sort of thing?
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 looks like if we have this problem here then I reckon we have the same issue on:
WCIVF
https://github.com/DemocracyClub/WhoCanIVoteFor/blob/36d9c34d6a04eaea2cc9bf9f81815354a6bfd27d/Makefile#L26-L31
devs.DC
https://github.com/DemocracyClub/aggregator-api/blob/0d9c876c619979392211d41a4c346a3a3213b80c/.circleci/config.yml#L137-L140
so lets fix those as well, rather than just leaving a known issue as a trap for ourselves to fall into in future.
Then the other 2 places I expected to find this issue were leaflets and ec-api-proxy. They both appear to be running the migrations against the prod database directly from CI instead of invoking a lambda
which is.. different
Is there a reason we've taken different approaches to this in different places? (I realise WCIVF is an outlier compared to the other apps we're looking at here as it is EC2/SAM rather than lambda/SAM)
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, pushed a comment