Skip to content
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

Move the visible check to alert banner manager #355

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

andybroomfield
Copy link
Contributor

@andybroomfield andybroomfield commented Jul 26, 2024

Fix #354

@andybroomfield andybroomfield force-pushed the feature/1.x-354-move-visible-check branch from bce895b to f621db9 Compare July 27, 2024 19:23
@ekes
Copy link
Member

ekes commented Jul 30, 2024

@millnut do you know what's happening here?

@stephen-cox
Copy link
Member

do you know what's happening here?

Composer is failing to install the testing branch because the LATEST_RELEASE variable defaults to 1 when it can't determine the latest release through the API call.

See: https://github.com/localgovdrupal/localgov_shared_workflows/blob/75394bb8ccaae453e67062d0c6e5e66215c8a609/.github/workflows/test-module.yml#L56-L60

This bit of code is showing itself to be a bit flaky. We either need to make the API call more reliable or create a variable that allows us to override the default value. The latter might be easier.

@millnut
Copy link
Member

millnut commented Jul 31, 2024

@stephen-cox I wonder whether we can use a github action step to get the latest tagged release? Would that work?

@stephen-cox
Copy link
Member

I wonder whether we can use a github action step to get the latest tagged release?

The API call in the workflow is supposed to do this for the major release, but in this case, because the target branch contains a minor release number the command is failing. This looks to be due to the bash string operations not being able to handle this case. I think I have a fix for this and will create a PR in the shared workflows for it.

@stephen-cox
Copy link
Member

There's a fix for this here: localgovdrupal/localgov_shared_workflows#4

If we're happy with this then we can merge and then rerun the tests (after resetting the cache variable) and tests should run.

@andybroomfield andybroomfield force-pushed the feature/1.x-354-move-visible-check branch from f621db9 to 45946fe Compare August 6, 2024 12:14
@andybroomfield andybroomfield marked this pull request as draft August 6, 2024 12:35
@andybroomfield andybroomfield marked this pull request as ready for review August 29, 2024 08:11
@andybroomfield andybroomfield force-pushed the feature/1.x-354-move-visible-check branch from 834ce8f to ef239c5 Compare August 29, 2024 08:20
@andybroomfield
Copy link
Contributor Author

This is update to include a test for the scenario we encounterd in #327 where the cache contexts of the block meant the banner did not show. Interestingly I found out that checking for visibility did not seem to matter, but that might be as we are not negating yet. However it is important that the containing block does have cache contexts and if this api is extended we might want to offer an api to get cache contexts.

@andybroomfield andybroomfield force-pushed the feature/1.x-354-move-visible-check branch from ef239c5 to 0209c01 Compare September 3, 2024 11:31
@andybroomfield
Copy link
Contributor Author

Anything that @localgovdrupal/maintainers want to comment on, or can I merge this as this should be enough to get a 1.8.0 release next merge Tuesday.

andybroomfield and others added 2 commits September 12, 2024 21:53
See #327.

Extends visibility test by providing actual pages for the banner to display on.
This also provides an extra banner to test the correct banner is visible per page.
@andybroomfield andybroomfield force-pushed the feature/1.x-354-move-visible-check branch from 0209c01 to 69e4167 Compare September 12, 2024 20:53
@andybroomfield andybroomfield mentioned this pull request Sep 13, 2024
1 task
@andybroomfield
Copy link
Contributor Author

Going ahead and merging this.

@andybroomfield andybroomfield merged commit f59c9f3 into 1.8.x Sep 16, 2024
8 checks passed
@andybroomfield andybroomfield deleted the feature/1.x-354-move-visible-check branch September 16, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants