Skip to content

refactor(app-canary): monitor only a single GUID #239

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

cgraham-rs
Copy link
Contributor

@cgraham-rs cgraham-rs commented Jul 11, 2025

Refactor includes:

  • Only monitoring a single GUID
  • Removing pandas since we no longer need to store a dataset of multiple content results
  • Displaying monitoring results in a callout instead of a table since we are no longer collecting multiple content results
  • Displaying any errors in a callout instead of shoving them into the results (previously directly into the results table). This makes the error much more consumable and functions as providing feedback about malformed/invalid GUID, or GUID you don't have access to for whatever reason
  • Improved output when you don't have permissions to view the logs for the monitored content, which should only happen if you are a viewer
  • Significant refactoring of the overall code to reduce duplication and complexity

This is deployed on our internal Connect server: https://dogfood.team.pct.posit.it/connect/#/apps/54e4557b-812d-4f70-afc6-9f2e5022a179/environment

Fixes https://github.com/posit-dev/connect/issues/32394
Fixes https://github.com/posit-dev/connect/issues/32404

Tests

  • No CANARY_GUID env var set
    • If scheduled, DOES NOT send an email
  • Invalid GUID
    • If scheduled, sends an email
  • Valid GUID for content you are a owner of
  • Valid GUID for content you are a collaborator of
  • Valid GUID for content you are a viewer of
  • Valid GUID for content you do not have access to (not in ACL, etc.)
    • In the above setup, where the monitored content passing validation, if scheduled, DOES NOT send an email
  • Valid GUID, content is published but fails validation
    • If scheduled, sends an email

Required env var not set.
Screenshot 2025-07-11 at 1 11 56 PM

Invalid GUID set
Screenshot 2025-07-11 at 1 12 43 PM

image

Valid GUID, owner of content, content passes validation
Screenshot 2025-07-11 at 1 13 35 PM

Valid GUID, collaborator of content, content passes validation
image

Valid GUID, viewer of content, content passes validation
Screenshot 2025-07-11 at 1 28 12 PM

Vaid GUID, no permission to content
image

image

Valid GUID, owner of content, content fails validation
Screenshot 2025-07-11 at 1 22 34 PM

image

@cgraham-rs cgraham-rs changed the title feat(app-canary): monitor only a single GUID refactor(app-canary): monitor only a single GUID Jul 11, 2025
@cgraham-rs cgraham-rs marked this pull request as ready for review July 11, 2025 21:06
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.

1 participant