Data Explorer has become more and more useful as part of a Plugin workflow, but:
How do we reliably but tolerantly add Data Explorer queries from a third party plugin so we can fail gracefully without jeopardising the build but also retry each time in case Data Explorer is eventually installed?
Options I’ve explored:
Poll Plugin: this cheats - the queries are added by the Data Explorer plugin itself
Plugin fixtures - this appears to be problematic because the Data Explorer artifacts don’t seem to be guaranteed to be available during plugin initialisation - perhaps because the Data Explorer plugin is itself a third party plugin and not guaranteed to have been loaded? I guess I could try to use SQL via Ruby code to identify if the table exists?
Migrations - I’ve written migrations but they need to harmlessly fail BUT NOT COMPLETE if Data Explorer plugin is not installed and there is no query table - the migrations should always run on rebuild until the Data Explorer plugin is installed and the table available so the queries can be added - that way from an admin point of view the solution is flexible and not depend on installation order. A failing migration should not jeopardise the build - is there a way to fail/put off a migration without stopping the build?
Using a periodic scheduled job to check presence of both the data explorer plugin/query table and the required queies.
Asking the admin to manually add them … yuk.
I guess I may try the SQL version of 2 next or maybe I’m missing something?
אתה יכול ליצור ג’וב שרץ כדי לבדוק שהם מותקנים. הוא לא יתחיל עד שהכל פועל.
אבל כדי לוודא שדברים לא שבורים אתה יכול לבדוק שקריאת סייר נתונים כלשהי זמינה. אני חושב שזה מה שאני עושה עבור מינויים, אולי. (עוד מוקדם ולא פתחתי את המחשב הנייד שלי.)
הם הוסיפו קוד בשבוע שעבר שבודק אם תוסף הצ’אט נטען.
אני חושב שפשוט לשים את הבדיקה שלך במקום כלשהו שממנו היא תינצל אם היא תיכשל זה כל מה שאתה צריך. אבל אתה לא יכול פשוט לבדוק כדי לראות אם משהו כמו DataExplorer.משהו קיים?
אני לא יודע מספיק על שימוש בהעברות כדי לשקול להשתמש בהן עבור מקרה השימוש שלך. אתה יכול גם שיהיה לך נקודת קצה ש, למשל, פאנל האדמין קרא לה, והיא תבדוק שיש לך את השאילתות שלך מותקנות.
עכשיו כשאני חושב על זה, אני חושש שהבעיה היחידה שבעצם פתרתי היא הוספת הפלאגין האחר כדי שבדיקות יוכלו לעבוד.