-
Notifications
You must be signed in to change notification settings - Fork 40
remove queue
from AccountInfo
#890
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
base: master
Are you sure you want to change the base?
Conversation
If this change is liked, the |
I have to ask around to see what this actually does.
"this account" likely needs to represent many associations, because we're sort of a 'rosetta stone' for many types of schedulers. Or at least it should represent all the associations per cluster.
Could be right. Again, I need to ask around. As you may surmise, I edited that file by hand to provide May I ask what |
It appears we don't use it in OnDemand, so yea maybe we can just get rid of it. And if we ever need it again, we'll just add it back. |
$ sacctmgr -nP show users withassoc format=account,cluster,partition,qos where user=$(whoami)
pi_simonleary_umass_edu|unity||long,normal,short
pi_tbernard_umass_edu|unity||long,normal,short |
I agree. I started work on another PR which combines the |
We do have associations with partitions, however, they're just special cases. For example, we have QOSes |
|
Removed those edits since they would be no longer used |
here as well: OSC/ondemand@c38d407 |
You seem to have a conflicting PR in #891. Which do you want? |
I would want this to be merged and then I'll resolve the conflict |
They aren't mutually exclusive, after a merge conflict resolution that will still deduplicate |
The |
Sorry, that's backwards. If an association has a partition and QOSes, then those QOSes can only be used in that partition, and OOD could actually be reading that data so that |
I have not confirmed this behavior, I'm setting up a docker compose slurm cluster to test this out. It could also be that |
I meant more like the net result after all these changes. I'm saying, isn't the net result of |
My intention was to resolve the merge conflict by deleting |
At the time I wasn't sure if deleting it was a good idea, so I thought we would talk about deleting it first and then I would know what to do with 891. |
It seems very two steps forward, one step back. Instead I'd prefer we just take one step forward and end up in the same place. It's easier for me to manage now, but then also easier to trace through |
ok, I merged 891 into this branch. |
Thanks! I'll need just a bit to double/triple check that we can get rid of this api. |
OK I'm done messing with this, no more commits should trickle in. |
|
||
with_modified_env({ OOD_UPCASE_ACCOUNTS: 'true'}) do | ||
expect(subject.accounts.map(&:to_s).uniq).to eq(expected_accounts) | ||
expect(subject.accounts.map(&:to_s).uniq.to_set).to eq(expected_accounts.to_set) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, now that this can return duplicates I think we shouldn't use to_set
and in fact ensure that duplicates are returned as that's.
It's possible (probable/) that I should not have started with uniq
, but with no second pair of eyes, it slipped through.
In any case, if returning duplicates is expected out of this API, then we should ensure that we test for that duplication. Maybe we need to test against tuples with 2 keys account & cluster pairs?
f5020db
to
0a62e97
Compare
The definition for
AccountInfo.queue
is "the queue this account can use", but this is problematic:AccountInfo
is just one slurm association, so there are other "accounts" for the same slurm account with potentially other queues (or no queue)I can't find any usage of this attribute. Please strike down this PR if I'm just not understanding or if this attribute is important.