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

Deploy branch status - August 2023 #41

Merged
merged 8 commits into from
Sep 6, 2023
Merged

Deploy branch status - August 2023 #41

merged 8 commits into from
Sep 6, 2023

Conversation

klauer
Copy link
Contributor

@klauer klauer commented Aug 18, 2023

** This PR was created automatically ** This PR can be used to easily see when cron-based pushes to GitHub happen, and allow us an opportunity to review changes prior to merging into master.

@klauer
Copy link
Contributor Author

klauer commented Aug 18, 2023

Automatic PR creation worked (as in #33) 👏

@klauer
Copy link
Contributor Author

klauer commented Sep 2, 2023

Let's try to get back to reviewing/merging monthly here, @ZLLentz @tangkong

@ZLLentz
Copy link
Member

ZLLentz commented Sep 6, 2023

I noticed this time that the deploy branch is out of sync with master: deploy...master

It looks like it's the .py file in master that's missing- coincidentally, if we merged master back in (and pulled back to the nfs local branch) it would satisfy the CodeQL error, which would give us a free (meaningless) green check:

CodeQL did not detect any code written in languages supported by CodeQL.

Copy link
Member

@ZLLentz ZLLentz left a comment

Choose a reason for hiding this comment

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

I had some food for thought but no merge-stoppers

@@ -511,6 +511,44 @@
"type": "pcdsdevices.happi.containers.LCLSItem",
"z": 742.4427
},
"comp_motor": {
Copy link
Member

Choose a reason for hiding this comment

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

If I'm allowed to be pedantic in these reviews, this is a rough name for a motor- high chance for cross-hutch name collisions. I'm not worried though since we can rename things later with low impact.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should come up with a way to follow up on these things and work with the maintainer (?) of the device.
For now, maybe we make issues here and ping that person / open Jira tickets?

Copy link
Member

Choose a reason for hiding this comment

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

Small note: it's hard to track down the maintainer of a device because it isn't tracked- we don't put usernames on the edit fields and the "ioc_engineer" field is optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

-> #43

@@ -5899,7 +5937,7 @@
],
"beamline": "TMO",
"creation": "Mon Jul 18 16:05:31 2022",
"device_class": "pcdsdevices.pim.PPM",
"device_class": "pcdsdevices.pim.PPMCOOL",
Copy link
Member

Choose a reason for hiding this comment

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

Side note: I wonder if there's any way to avoid this problem:

  1. A new class is added to pcdsdevices
  2. happi is updated to expect the new class
  3. All old code that referenced this device needs a pcdsdevices update or the load fails

It makes me wonder if we need to do versioning on these or have some other way to maintain backward compatibility in this sort of environment...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It depends on the type of the backward-compatibility.
If it's that the new device has additional PVs - great, we can use the old device without problems.
If the new device changes previous PVs - well, not so great, typhos screens may be broken and hutch-python data acquisition may fail.

I'm not sure there's a good way of doing this, really.

I think my preferred workaround would be to do like AT2L0 and AT1K4 in pcdsdevices - having device-specific classes of the same name. We can change its parent class in dev/prod and happi doesn't need any updating.

Copy link

Choose a reason for hiding this comment

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

The "factory class" method is nice for backwards compatibility, but I'm not a fan of the obfuscation it brings. If I edit a class and want to check which devices in our db are affected, it's not immediately clear.

To be clear I do think it might be the best option, nothing better comes to mind immediately. (Other than just telling people to update...)

Copy link
Member

Choose a reason for hiding this comment

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

I think I'm most a fan of the "device specific class" method since it's straightforward and clear- though it feels a bit strange to figure out which things belong in the specific class and which things belong in the database. Isn't part of the point of the database to include what classes devices are? Does something like a static prefix belong in a device-specific class? Does any of this even matter? I'm not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

-> #42

@klauer
Copy link
Contributor Author

klauer commented Sep 6, 2023

I'm going to merge this but we should follow up on @ZLLentz 's comments above

@klauer klauer merged commit 06ffda7 into master Sep 6, 2023
2 checks passed
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