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

disable Apple News pushes on non-production environments #44

Merged
merged 25 commits into from
Jul 16, 2024

Conversation

mogmarsh
Copy link
Contributor

Summary

As titled.

Notes for reviewers

None.

Changelog entries

Added

Changed

Deprecated

Removed

Fixed

Security

@mogmarsh mogmarsh requested a review from a team as a code owner June 15, 2023 16:52
@mogmarsh mogmarsh changed the title setting up Apple News push feature disable Apple News pushes on non-production environments Jun 16, 2023
Copy link
Contributor

@renatonascalves renatonascalves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few questions and suggestions. :)

@jakewrfoster
Copy link
Member

@mogmarsh does this close #26 ?

Copy link
Member

@benpbolton benpbolton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporary review

@benpbolton benpbolton dismissed their stale review November 14, 2023 22:39

Temporary review to clear #alley

@emilyatmobtown
Copy link

I'd recommend also disabling remote images when not on production. Otherwise, Apple News will trigger an error and fail the push if it tries to fetch remote images that it doesn't have access to, i.e. from local envs or protected non-production envs.

@mogmarsh
Copy link
Contributor Author

@mogmarsh does this close #26 ?

it should

@mogmarsh
Copy link
Contributor Author

I'd recommend also disabling remote images when not on production. Otherwise, Apple News will trigger an error and fail the push if it tries to fetch remote images that it doesn't have access to, i.e. from local envs or protected non-production envs.

this is disabling all pushes, so the image references won't matter.

@emilyatmobtown
Copy link

@mogmarsh Ah, right. I was thinking of scenarios in which we have test credentials on non-prod.

In that case, I'd suggest also disabling if WP_CLI is true. That will ensure that posts don't get pushed on batch updates via CLI in production.

@jakewrfoster
Copy link
Member

@emilyatmobtown's input is valid, but should come in the form of a future issue and not block this one. I see preventing prod bulk CLI updates as a separate feature from blocking pushes on lower environments.

@mogmarsh
Copy link
Contributor Author

@emilyatmobtown's input is valid, but should come in the form of a future issue and not block this one. I see preventing prod bulk CLI updates as a separate feature from blocking pushes on lower environments.

https://github.com/alleyinteractive/wp-bulk-task/blob/main/src/trait-bulk-task-side-effects.php also could handle this in many CLI situations if we use it.

@anubisthejackle anubisthejackle dismissed renatonascalves’s stale review July 16, 2024 15:43

Extensive revisions. New reviews required.

* the method caches the initial result and always returns it, even if
* we modify the environment variable.
*/
\define( 'WP_RUN_CORE_TESTS', true ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound
Copy link
Member

@srtfisher srtfisher Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. It wasn't, which is why I had to add it here. Maybe worth a look?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhh I missed the asof line. That's probably why.

@anubisthejackle anubisthejackle merged commit e345f16 into main Jul 16, 2024
7 checks passed
@anubisthejackle anubisthejackle deleted the feature/disable-apple-news-pushes branch July 16, 2024 16:46
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.

8 participants