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

save function fails when using: resourceOptimizerExtendedCompatibility #44

Open
DidierFort opened this issue May 30, 2019 · 6 comments
Open
Labels
bug Something isn't working

Comments

@DidierFort
Copy link

Hello,

The save function fails when I use the resourceOptimizerExtendedCompatibility behavior.
The output looks like this:
There are validation errors: [ { "location": { "template": "config-snippets/performance.json", "variables": [], "location": "behaviors/7/name", "value": "resourceOptimizerExtendedCompatibility" }, "schemaLocation": "/definitions/behavior/allOf/0/properties/name", "detail": "instance value (\"resourceOptimizerExtendedCompatibility\") not found in enum (possible values: [\"adaptiveAcceleration\",\"adaptiveImageCompression\",\"advanced\",\"akamaizer\",\"akamaizerTag\",\"allHttpInCacheHierarchy\",\"allowCloudletsOrigins\",\"allowDelete\",\"allowOptions\",\"allowPatch\",\"allowPost\",\"allowPut\",\"allowTransferEncoding\",\"apiPrioritization\",\"applicationLoadBalancer\",\"audienceSegmentation\",\"autoDomainValidation\",\"baseDirectory\",\"breakConnection\",\"brotli\",\"cacheError\",\"cacheId\",\"cacheKeyIgnoreCase\",\"cacheKeyQueryParams\",\"cachePost\",\"cacheRedirect\",\"caching\",\"centralAuthorization\",\"chaseRedirects\",\"constructResponse\",\"cpCode\",\"customBehavior\",\"datastream\",\"denyAccess\",\"deviceCharacteristicCacheId\",\"deviceCharacteristicHeader\",\"dnsAsyncRefresh\",\"dnsPrefresh\",\"downstreamCache\",\"edgeConnect\",\"edgeImageConversion\",\"edgeLoadBalancingAdvanced\",\"edgeLoadBalancingDataCenter\",\"edgeLoadBalancingOrigin\",\"edgeOriginAuthorization\",\"edgeRedirector\",\"edgeScape\",\"edgeSideIncludes\",\"edgeWorker\",\"enhancedAkamaiProtocol\",\"failAction\",\"fastInvalidate\",\"firstPartyMarketing\",\"firstPartyMarketingPlus\",\"forwardRewrite\",\"frontEndOptimization\",\"gzipResponse\",\"healthDetection\",\"http2\",\"httpStrictTransportSecurity\",\"imOverride\",\"imageManager\",\"imageManagerVideo\",\"inputValidation\",\"instant\",\"instantConfig\",\"largeFileOptimization\",\"mPulse\",\"manualServerPush\",\"mobileSdkPerformance\",\"modifyIncomingRequestHeader\",\"modifyIncomingResponseHeader\",\"modifyOutgoingRequestHeader\",\"modifyOutgoingResponseHeader\",\"origin\",\"originCharacteristics\",\"persistentClientConnection\",\"persistentConnection\",\"personallyIdentifiableInformation\",\"phasedRelease\",\"preconnect\",\"predictivePrefetching\",\"prefetch\",\"prefetchable\",\"prefreshCache\",\"rapid\",\"readTimeout\",\"realUserMonitoring\",\"redirect\",\"redirectplus\",\"refererChecking\",\"removeQueryParameter\",\"removeVary\",\"report\",\"requestControl\",\"resourceOptimizer\",\"responseCode\",\"responseCookie\",\"rewriteUrl\",\"rumCustom\",\"saasDefinitions\",\"salesForceCommerceCloudClient\",\"salesForceCommerceCloudProvider\",\"scheduleInvalidation\",\"scriptManagement\",\"setVariable\",\"shutr\",\"simulateErrorCode\",\"siteShield\",\"sureRoute\",\"teaLeaf\",\"tieredDistribution\",\"timeout\",\"validateEntityTag\",\"verifyTokenAuthorization\",\"visitorPrioritization\",\"watermarkUrl\",\"webApplicationFirewall\",\"webSockets\",\"webdav\",\"akamaizertag\",\"edcheader\",\"enableallmethodscacheh\",\"edccacheid\",\"failaction\",\"audience_segmentation\",\"modincomingrespheader\",\"chaseredirects\",\"mediaclient\",\"cachekeyignorecase\",\"elb_origin\",\"denyaccess\",\"segmentedcontentprotection\",\"saasdefinitions\",\"cacheid\",\"setresponsecode\",\"basedir\",\"ip_geo_access\",\"asset_prioritization\",\"elb_data_center\",\"allowput\",\"visitor_prioritization\",\"aic\",\"removevary\",\"modincomingreqheader\",\"quicbeta\",\"token_auth_verify\",\"realUserAcceleration\",\"dnsasyncrefresh\",\"randomseek\",\"dnsprefresh\",\"cloudPerformanceIntelligence\",\"allowpost\",\"edgeoriginauth\",\"validateetag\",\"sim_error_codes\",\"protocoldowngrade\",\"sureroute\",\"networkconditionsheader\",\"edge_image_converter\",\"edgescape\",\"connecttimeout\",\"refererchecking\",\"segmentedmediaoptimization\",\"mediaoriginfailover\",\"modoutgoingrespheader\",\"siteshield\",\"scheduledinvalidation\",\"watermark_tokens\",\"prefetching\",\"readtimeout\",\"allowpatch\",\"edgeconnect\",\"largefileoptimizations\",\"tiereddistribution\",\"esi\",\"rumcustom\",\"elb_advanced\",\"bitratelimiting\",\"construct_response\",\"rum\",\"removeqsbyname\",\"allowoptions\",\"pii\",\"feo\",\"cpcode\",\"pconns\",\"cacheprefresh\",\"urlrewrite\",\"prefetchableobject\",\"breakconnect\",\"centralauth\",\"cache302\",\"modoutgoingreqheader\",\"save_post_dca_processing\",\"imagemanagement\",\"allowdelete\",\"mfro\",\"gzipresponse\",\"predictivecontentdelivery\",\"mdc\",\"conditionalOriginBehavior\",\"netsession\",\"edge_redirector\",\"thirdPartyOptimizer\",\"postcaching\",\"cachekeyqueryparams\",\"clientpconns\",\"predictiveprefetching\",\"objectcachingrestrictions\",\"downstreamcaching\",\"negativettl\",\"receiptdelivery\",\"setresponsecookie\",\"enhancedakamaiprotocol\",\"subcustomerenable\",\"waf\",\"reporting\",\"forward_rewrite\",\"hddata_advanced\",\"rmaoptimizations\",\"manifestrerouting\",\"healthdetect\",\"tcpoptimizations\",\"continuousDeployment\",\"cachekeyrewrite\"])", ...

My work around is to remove the behavior in the JSON file and add it back in the Property Manager UI.

Regards,
Didier

@optplx
Copy link

optplx commented Jun 5, 2019

Hi @DidierFort,

I have noticed that in my case I have "suggestedRuleFormat": "v2018-09-12" in my envInfo.json file (even if i have "ruleFormat": "latest" for each version). By changing this to "latest", I don't reproduce the error.
Do you have the same behavior on your side?

The problem is that the "suggestedRuleFormat": "v2018-09-12" comes back as soon as you do an akamai property-manager update-local -p myproperty ...

@DidierFort
Copy link
Author

Hi @optplx,

I see the same suggestions with configurations that are successful.
That being said, I am pretty sure it's related to the rule format versioning, which cannot be really managed via the CLI.
I also wonder if the PAPI version (the CLI is still using v0) is not part of the problem.

Regards,
Didier

@optplx
Copy link

optplx commented Jun 6, 2019

Hi @DidierFort

thanks for confirming this.

I have tried to update to v1 and re-build the CLI locally, and it did not solve the issue (maybe i have missed something though).

However concerning the suggestedRuleFormat, I have tried to change a few lines successfully, but I don't really know the full impact of it. (More precisely, I have removed this part

suggestedRuleFormat = warning.suggestedRuleFormat;
).

Our issue is due to the warnings returned by the API call - which I think is not manageable through the CLI - but what we do with this warning could be left to us through some kind of configuration :/

My workaround for the moment is to alias akamai to a function that starts with a sed to remove the suggestedRuleFormat (ugly but easy and low impacts). I don't have it right now but it s something like sed -i 's/"suggestedRuleFormat":.*[^,]/"suggestedRuleFormat": "latest"/g' ${PROPERTY}/envInfo.json && akamai $@

@ddcrjlalumiere
Copy link

I was having essentially the same enumeration error, but with the cacheTagVisible behavior.

So, it seems that despite the "ruleFormat" all being set to "latest" the fact that "suggestedRuleFormat" was old (v2018-09-12) was causing the config to be validated against a version that lacked the cacheTagVisible behavior (not added until the 2020-01-16 PM release). Once the "suggestedRuleFormat" was updated via property-manager set-ruleformat and I had done a property-manager update-local I was able to make my changes and property-manager merge successfully.

example -

$ egrep -i rule my.property.example/envInfo.json
        "ruleFormat": "latest"
        "ruleFormat": "latest",
        "ruleFormat": "latest",
    "suggestedRuleFormat": "v2018-09-12",
    "ruleTreeHash": "527df6d9ad10c76fcd1777bb49be80c2e42d66fc0fbdbdf4c6976f5937fd3529",

$ akamai property-manager set-ruleformat "latest"
$ akamai property-manager update-local --property my.property.example

$ egrep -i suggestedRuleFormat my.property.example/envInfo.json
    "suggestedRuleFormat": "v2021-07-30",

It would have really helped if the error had said literally anything about potential rule format mismatches :|

@lkowalsk-akamai-com lkowalsk-akamai-com added the bug Something isn't working label May 27, 2022
@ddcrjlalumiere
Copy link

Ran in to this issue again today with a different property and rule. In 2 days of searching for a fix my comment that I forgot existed was literally the only thing I could find that worked to get past these errors. Still hoping that one day this may be handled in a more graceful manner 🤞

@mgwoj
Copy link

mgwoj commented Oct 20, 2022

We are evaluation options to fix that, but we do not have any ETA yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

5 participants