Picolab / devtools

Repository for KRL Developer Tools
MIT License
6 stars 4 forks source link

Deleting and Registering rulesets. #84

Closed burdettadam closed 8 years ago

burdettadam commented 8 years ago

when a rule is deleted and a new ruleset is registered, the old meta data is displayed instead of the new rules meta data.

AngelSassin commented 8 years ago

The wrangler.krl code supplies the following line, which supports this issue: describe_url = "https://#{meta:host()}/ruleset/describe/#{$rids_string}"; I don't believe we have access to the KRE engine to fix the issue. The entire old meta data is being found instead of the new data.

Two ways to bypass this are by flushing the new ruleset or by using "Edit URL" instead of deleting and re-registering a ruleset. Both of these will display the new meta data.

windley commented 8 years ago

@AngellNick can you give me a specific URL (from describe) that's returning the wrong data and what it should be? That way I can look at it.

AngelSassin commented 8 years ago

https://cs.kobj.net/ruleset/describe/b507707x9.prod;

The name should be "Sample Ruleset 2" instead of "Sample Ruleset" The description should be "Not much to see here 2"

windley commented 8 years ago

Perfect. Thanks.

On Apr 28, 2016, at 3:59 PM, Nicholas Angell notifications@github.com wrote:

https://cs.kobj.net/ruleset/describe/b507707x9.prod https://cs.kobj.net/ruleset/describe/b507707x9.prod;

The name should be "Sample Ruleset 2" instead of "Sample Ruleset" The description should be "Not much to see here 2"

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/kre/devtools/issues/84#issuecomment-215587278

windley commented 8 years ago

Flush the ruleset cache when the ruleset is unregistered.

AngelSassin commented 8 years ago

The change was made in the devtools_dev.krl file:

rule deleteRuleset { select when devtools delete_rid ... { rsm:delete(rid); rsm:flush(rid); // This line was added } }

Side question: Should the rsm:delete(rid) function perform a flush on its own instead of performing the flush here?

windley commented 8 years ago

I've updated rsm:delete() to flush the RID. Give it a test.

AngelSassin commented 8 years ago

I'm still getting the same problem. Raising an event to delete the RID does not seem to flush the cache.

windley commented 8 years ago

The only place the change was made was kibdev, not the production servers. Be sure you’re testing there.

On May 11, 2016, at 2:48 PM, Nicholas Angell notifications@github.com wrote:

I'm still getting the same problem. Raising an event to delete the RID does not seem to flush the cache. Also, I was wrong; my addition of the flush didn't fix it. My guess is that the flush is happening too quickly (I'm not sure this makes sense), and two separate events need to be raised to delete and then flush the ruleset.

Also, did we intend to remove the "delete" button from the register rulesets page? I can only delete RIDs by raising events.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/kre/devtools/issues/84#issuecomment-218585557

AngelSassin commented 8 years ago

That did it. I was raising events to the cs.kobj.net domain, not kibdev.kobj.net. All issues have been fixed.

windley commented 8 years ago

Cool. That makes me feel better. I wasn’t understanding what could be going wrong until I thought of that. :)

On May 11, 2016, at 3:43 PM, Nicholas Angell notifications@github.com wrote:

That did it. I was raising events to the cs.kobj.net domain, not kibdev.kobj.net. All issues have been fixed.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/kre/devtools/issues/84#issuecomment-218599307