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

Closes #40 Update CDN cname #42

Merged
merged 57 commits into from
Nov 15, 2024
Merged

Closes #40 Update CDN cname #42

merged 57 commits into from
Nov 15, 2024

Conversation

remyperona
Copy link
Contributor

@remyperona remyperona commented Oct 29, 2024

Description

Fixes #40

Automatically updates the current CDN cname on update of the plugin and display an info notice to inform the user

Type of change

  • Enhancement (non-breaking change which improves an existing functionality).

Detailed scenario

Update the plugin

Technical description

Documentation

Explain how this code works. Diagrams & drawings are welcome.

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.
  • Output messages (errors, notices, logs) are explicit enough for users to understand the issue and are actionnable.

Additional Checks

  • I added error handling logic when using functions that could throw errors (HTTP/API request, filesystem, etc.)

@remyperona remyperona self-assigned this Oct 29, 2024
@remyperona remyperona added the enhancement New feature or request label Oct 29, 2024
@remyperona remyperona marked this pull request as ready for review October 30, 2024 19:37
@remyperona remyperona requested a review from a team October 30, 2024 19:37
@remyperona remyperona linked an issue Oct 30, 2024 that may be closed by this pull request
@remyperona
Copy link
Contributor Author

Updated the code to take care of fresh install and prevent the notice from displaying.

@hanna-meda
Copy link

@remyperona, retested on this site where we have rocketcdn staging linked to it, so we can actually see the CNAME updated. There are a few points that still need to be addressed:

  1. The Notification will still be present on fresh installs but not immediately.
    It appears after validating API key.
  2. The Notification cannot be dismissed.
    Clicking on "X" button doesn't trigger any action.
  3. The old name is missing from the notification:
Screenshot 2024-11-11 at 10 36 53

@wp-media/product, I have a question regarding the following scenario:

  1. RocketCDN version <=1.0.6 installed & activated, but the API key hasn’t been validated.
  2. The user updates to version 1.0.7 => In this case, should we expect the notification to appear? Since the user hasn’t provided their API key yet, we wouldn’t know it.

@piotrbak
Copy link

@hanna-meda

1. RocketCDN version <=1.0.6 installed & activated, but the API key hasn’t been validated.
2. The user updates to version 1.0.7 => In this case, should we expect the notification to appear? Since the user hasn’t provided their API key yet, we wouldn’t know it.

That's kind of edgy. What's the current state?

@hanna-meda
Copy link

hanna-meda commented Nov 11, 2024

That's kind of edgy. What's the current state?

@piotrbak the notification will *NOT be there.

@piotrbak
Copy link

@hanna-meda Do you have a screenshot of notification from this scenario? Since the API is not there, we'll not display the URLs?

@hanna-meda
Copy link

@piotrbak, Correction: the notification will not be there in this case. But it will be there after validating key, in which case we will have empty for from (which is a general issue even when we did validate key in previous version, same as in above issue no. 3 ):
Screenshot 2024-11-11 at 14 02 16

@piotrbak
Copy link

@hanna-meda That sounds good if the issue 3 is fixed.

@remyperona
Copy link
Contributor Author

remyperona commented Nov 12, 2024

All reported issues should be fixed now. I tested directly the notification dismiss issue on the test site, found the issue and now it's all good.

@hanna-meda
Copy link

hanna-meda commented Nov 13, 2024

Thank you, @remyperona.
I can confirm all issues are fixed except point 3. The old name is missing from the notification

  • Testing on mega (site linked to staging rocketCDN website where the namedelivery update is in place), the notification banner cannot be triggered anymore:
    link to video
  • Testing on newer (site linked to rocketCDN production), I can see the notification but with old name missing:
Screenshot 2024-11-13 at 14 53 35 P.S. Left API key validated on mega now. But, if not, for everyone who needs it, the API key can be found in BW by name `RocketCDN API Key to use on mega site`

@remyperona
Copy link
Contributor Author

Ok I finally found the issue for this point, it should be good now! I tested on the newer site, and got the notification with both old and new CDN URL filled (since it's using production API, it ends up being the same value for now).

Copy link

@hanna-meda hanna-meda left a comment

Choose a reason for hiding this comment

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

Related Test Results Report:
testrail-report-662.pdf

@remyperona remyperona merged commit d63a733 into develop Nov 15, 2024
6 checks passed
@remyperona remyperona deleted the enhancement/40-cdn-change branch November 15, 2024 12:57
Khadreal added a commit that referenced this pull request Nov 18, 2024
* Add GH Action PR Template checker

* Closes #40 Update CDN cname (#42)

* Update readme file

---------

Co-authored-by: Mathieu Lamiot <[email protected]>
Co-authored-by: Rémy Perona <[email protected]>
Co-authored-by: Rémy Perona <[email protected]>
Khadreal added a commit that referenced this pull request Nov 18, 2024
* Add GH Action PR Template checker

* Closes #40 Update CDN cname (#42)

* Update readme file

* Update stable version tag in readme.txt file

---------

Co-authored-by: Mathieu Lamiot <[email protected]>
Co-authored-by: Rémy Perona <[email protected]>
Co-authored-by: Rémy Perona <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RocketCDN CNAME change
4 participants