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

FIX: issues with ioc-deploy casing #196

Merged
merged 5 commits into from
Sep 4, 2024

Conversation

ZLLentz
Copy link
Member

@ZLLentz ZLLentz commented Sep 4, 2024

Description

Fix an issue where ioc-deploy would happily create new folders if you make a casing typo, e.g. ioc-common-gigecam will now deploy to ioc/common/gigECam.

Github URLs are case-insensitive, e.g. you can clone ioc-coMMon-GiGeCaM and it will work just fine.
So, we need to turn to other sources for the correct casing for directory deployment.

The REST API is the most consistent method, but it requires additional authentication.

This PR checks two things in order looking for a match:

  • The existing deploy directories
  • The README

Motivation and Context

https://jira.slac.stanford.edu/browse/ECS-6018

How Has This Been Tested?

Interactively only, works as I expect

Where Has This Been Documented?

Here only

Copy link
Contributor

@tangkong tangkong left a comment

Choose a reason for hiding this comment

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

I'm on board with this on the whole 👍

scripts/ioc_deploy.py Outdated Show resolved Hide resolved
scripts/ioc_deploy.py Outdated Show resolved Hide resolved
@ZLLentz
Copy link
Member Author

ZLLentz commented Sep 4, 2024

I also ended up adding a check for readmes like this one that have the last part of the suffix in them but not the ioc-area part: https://github.com/pcdshub/ioc-common-ads-ioc/blob/master/README.md

@ZLLentz
Copy link
Member Author

ZLLentz commented Sep 4, 2024

Testing for this has been lots of ioc-deploy --name ioc-CoMmOn-gIgECaM -r R5.0.4 and similar, and it seems to work pretty well.

Copy link
Contributor

@tangkong tangkong left a comment

Choose a reason for hiding this comment

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

I like this 👍

Copy link
Contributor

@slactjohnson slactjohnson left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@ZLLentz
Copy link
Member Author

ZLLentz commented Sep 4, 2024

Thank you for the reviews!

@ZLLentz ZLLentz merged commit 1ab5b21 into pcdshub:master Sep 4, 2024
2 checks passed
@ZLLentz ZLLentz deleted the fix_ioc_deploy_casing branch September 4, 2024 20:57
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