Skip to content

Update towards template repo - #14

Merged
Jun Aishima (JunAishima) merged 12 commits into
NSLS2:mainfrom
JunAishima:test-updating-to-template
Oct 1, 2026
Merged

Jun Aishima (JunAishima) merged 12 commits into
NSLS2:mainfrom
JunAishima:test-updating-to-template

Conversation

@JunAishima

Copy link
Copy Markdown
Contributor

Update this repo to match what is already in https://github.com/NSLS2/nsls2-workflows-template
Will obsolete the following PRs, so will close them once this PR is approved:

 * API key handling
 * Assisted-by: copilot-gpt-5.6-luna
 * Assisted-by: copilot:gpt-5.6-luna
 * incremented version number of deployment
Copilot AI lite review requested due to automatic review settings September 23, 2026 18:50
@JunAishima Jun Aishima (JunAishima) changed the title Test updating to template Update towards template repo Sep 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Three unresolved moderate issues affect dry-run behavior, credential lifetime, and failure notification coverage.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 Medium severity

Open (3)
What changed in this PR

Updates TST workflows to align with the template repository and use dotenv-based Tiled authentication.

Changes:

  • Replaces legacy Tiled/Prefect Secret access with URI-based clients.
  • Adds Slack notifications and workflow parameters.
  • Updates deployment configuration, mounts, and dependencies.

Three unresolved moderate issues remain: dry_run still reads data, load_dotenv leaves credentials in the environment, and early Tiled failures bypass notifications.

File Summary
utils.py Removes the obsolete Tiled client helper.
test_extra_client.py Uses the shared Tiled run lookup.
prefect.yaml Updates deployment version and volume mounts.
pixi.toml Adds python-dotenv.
end_of_run_workflow.py Adds notifications and workflow orchestration.
data_validation.py Loads credentials and validates Tiled streams.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread data_validation.py Outdated
Comment thread data_validation.py Outdated
Comment thread end_of_run_workflow.py Outdated
Copilot AI review requested due to automatic review settings September 23, 2026 18:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved credential handling, dry-run behavior, and preflight failure reporting issues remain.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 3 Medium severity

Open (4)

Comment thread end_of_run_workflow.py
 * always do this because it will not write to any resources
Copilot AI review requested due to automatic review settings September 23, 2026 18:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Unresolved credential-handling, notification-error, preflight-reporting, and deployment-mount issues remain.

Review effort: Lite
Findings: 1 High severity · 2 Medium severity

Open (3)
Resolved since last review (1)

 * do not put the secret file contents into the environment,
   just get the value and return
Copilot AI review requested due to automatic review settings September 23, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved critical mount security and moderate failure-notification issues remain.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity · 1 Medium severity · 1 Low severity

Open (4)
Resolved since last review (1)

Comment thread prefect.yaml Outdated
Comment thread data_validation.py Outdated
Copilot AI review requested due to automatic review settings September 23, 2026 19:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Move the Tiled metadata lookup into protected error handling so failures are reported consistently.

Review effort: Lite
Findings: 2 High severity · 1 Medium severity

Open (3)
Resolved since last review (1)

Copilot AI review requested due to automatic review settings September 23, 2026 19:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Tiled lookup failures can bypass the guarded Slack failure notifications.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
Resolved since last review (2)

Copilot AI review requested due to automatic review settings September 23, 2026 20:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Unresolved moderate issues in end_of_run_workflow.py must be addressed before approval.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Prevent success notification failures from marking runs failed

end_of_run_workflow.py:32

Because this success notification is inside the try, a Slack webhook failure after func has completed successfully enters the exception handler, sends failure notifications, and re-raises. That can mark a successful validation run as failed solely because monitoring is unavailable; isolate notification errors from the wrapped workflow result.

 * much better error handling
 * Assisted-by: copilot-gpt-5.6-luna
Copilot AI review requested due to automatic review settings September 23, 2026 20:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The API key is exposed through Prefect flow/task parameters and should be removed from those interfaces.

Review effort: Lite
Findings: 1 Medium severity

Open (1)

Copilot AI review requested due to automatic review settings September 23, 2026 20:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Tiled API keys remain exposed through Prefect task and flow parameters.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

Comment thread data_validation.py
@JunAishima

Copy link
Copy Markdown
Contributor Author

fixes #13

@AbbyGi Abby Giles (AbbyGi) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One comment removal

Comment thread data_validation.py Outdated
Co-authored-by: Abby Giles <35899293+AbbyGi@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 30, 2026 20:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Authentication, workflow orchestration, and deployment changes warrant final human review.

Review effort: Lite
Findings: None

Resolved since last review (1)

@JunAishima

Copy link
Copy Markdown
Contributor Author

just tested this with a UID that was successful 5 months ago, so merging.

@JunAishima
Jun Aishima (JunAishima) merged commit c8c5c2d into NSLS2:main Oct 1, 2026
1 check passed
@JunAishima
Jun Aishima (JunAishima) deleted the test-updating-to-template branch October 1, 2026 22:49
This was referenced Oct 1, 2026
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.

3 participants