fastly / fastly-magento2

Module for integrating Fastly CDN with Magento 2 installations
BSD 3-Clause "New" or "Revised" License
146 stars 120 forks source link

cli `fastly:conf:set --activate` doesnt activate anything #653

Closed jbartus closed 1 year ago

jbartus commented 1 year ago

it doesnt return an error or activate anything alone, it appears that it has to be used in conjunction with --upload-vcl to work

# ./bin/magento fastly:conf:set --upload-vcl         <--- works alone
Successfully uploaded VCL. 
Flushed cache types:
config

# ./bin/magento fastly:conf:set --activate       <--- seems to do nothing
Flushed cache types:
config

# ./bin/magento fastly:conf:set --upload-vcl --activate   <---   work together
Successfully uploaded VCL. Activated Version 5
Flushed cache types:
config

an error check that returns something like "must be used with --upload-vcl" would be enough to have caught me.

dpotkoc commented 1 year ago

Hello @jbartus

php bin/magento fastly:conf:set --help command has explanation: "Activate newly cloned version. Used with VCL upload."

If you didn't make any modifications then there is no sense to call this command, there is no new version to activate.

vvuksan commented 1 year ago

The issue is that -activate by itself doesn't do anything. So we need a check that catches that.

On Fri, Jul 21, 2023, 08:03 Domagoj Potkoc @.***> wrote:

Hello @jbartus https://github.com/jbartus

php bin/magento fastly:conf:set --help command has explanation: "Activate newly cloned version. Used with VCL upload."

If you didn't make any modifications then there is no sense to call this command, there is no new version to activate.

— Reply to this email directly, view it on GitHub https://github.com/fastly/fastly-magento2/issues/653#issuecomment-1645473791, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB7WDNJYTR6HJN5TNA6IH3XRJV2JANCNFSM6AAAAAA2R55ML4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

vvuksan commented 1 year ago

Will be released as 1.2.205