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

Feature/#443 shielding list #449

Merged
merged 13 commits into from
May 20, 2021

Conversation

Lukas713
Copy link
Contributor

this is adjusted PR for this.

Controller/Adminhtml/FastlyCdn/Backend/CreateBackend.php Outdated Show resolved Hide resolved
Controller/Adminhtml/FastlyCdn/Backend/CreateBackend.php Outdated Show resolved Hide resolved
Model/Api.php Outdated
Comment on lines 492 to 496
public function getDataCenters()
{
$url = $this->config->getApiEndpoint() . 'datacenters';
return $this->_fetch($url, 'GET');
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@vvuksan and I are on the same page. We don't want to call /datacenters API in this way but rather want to have a static JSON file in our repo for the time being. This is not just about stability but also ensure we don't harm our own platform (API backend) by this change since we have fairly many plugin users out there.

Copy link
Contributor Author

@Lukas713 Lukas713 Apr 29, 2021

Choose a reason for hiding this comment

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

HI @smaeda-ks ,

I agree with these redundant functions. I've changed the code and did what you have requested in the first place.
However, I still think that pinging /datacenter is not a big deal and its much better solution then static .json file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I think you're right. But then our minimum requirement is that we must catch errors from the /datacenter API endpoint (e.g., 503) and actually shows an error message to the logged-in user to tell "hey, something went wrong". And if there's an error at this stage we don't want to allow users to submit the form at all. So basically, users need to refresh the page or retry this flow until they can successfully fetch the shielding data from our API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@smaeda-ks
Totally understands. I've removed the pinging. Thanks for collaboration

@vvuksan vvuksan merged commit 7e52f1d into fastly:master May 20, 2021
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.

3 participants