Skip to content

Retire sandbox and SSS resources#495

Draft
Martin-Rehr wants to merge 13 commits intonextfrom
retire/sandbox-and-sss
Draft

Retire sandbox and SSS resources#495
Martin-Rehr wants to merge 13 commits intonextfrom
retire/sandbox-and-sss

Conversation

@Martin-Rehr
Copy link
Contributor

Retire sandbox and SSS resources

@Martin-Rehr Martin-Rehr requested a review from a team March 19, 2026 10:51
@Martin-Rehr Martin-Rehr self-assigned this Mar 19, 2026
@Martin-Rehr Martin-Rehr added the refactor Non-functional changes to simplify or clean up label Mar 19, 2026
@Martin-Rehr Martin-Rehr marked this pull request as draft March 19, 2026 11:30
@Martin-Rehr Martin-Rehr removed the request for review from a team March 19, 2026 11:30
Copy link
Contributor

@jonasbardino jonasbardino left a comment

Choose a reason for hiding this comment

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

Approved with a couple of comments to look into

@jonasbardino jonasbardino added this to the Retire legacy components milestone Mar 19, 2026
@jonasbardino
Copy link
Contributor

I think the mig/java-bin dir can also go.

new_keys.append(k)

lookupdict = dict(list(lookupdict.items()) + list(sumdict.items()))
keys = list(set(new_keys))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this removal is too greedy. AFAICT it should not remove the entire for-loop and in particular the else case, but only the if part and the sums+concat lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are absolutely right, good catch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looking at the code once more I'll say that the whole section should be eliminated as suggested in the commit

Copy link
Contributor

Choose a reason for hiding this comment

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

Without being an expert in this code it appears to handle any kind of resource in the 'machine' conditional and specifically general (non-sandbox) resources in the else case, so I don't see why that part should go. It looks like such non-sandbox resource IDs are added to keys after the loop and used in the for k in keys loop later.

That said, I doubt we have this backend in action anywhere. The whole couchdb stats work was grid.dk AFAIK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did you look at the complete code?

As far as I can tell this section sums up sandbox resources and add non-sandbox resources unconditionally to the new_keys that in the end is assigned to keys:
keys = list(set(new_keys))

All resources are assigned to keys prior to this section, that is if we drop this section all resources will be treated as non-sandboxed resources.

self.logger.info('backfill remaining: %(CPUCOUNT)s %(NODECOUNT)s'
% remaining)
next_job = self.schedule(remaining, must_match={
next_job = self.schedule(remaining, must_match={ # pylint: disable=assignment-from-none
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like pylint disables unless strictly needed, and would much prefer that we fix the potential None issue it complains about.
It's perfectly okay to make a simple placeholder 'Fix assign from None lint warning in scheduler' PR, which just highlights the issue and then point to that as proof that it is nothing new. Then we can always fix the issue later.
The easiest is to just add a line to the offending file in the PR branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So we should just accept that the linter fails at this one and create a PR for it ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I'd do like in #338 and point to a similar new PR here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I can't wrap my head around how you then verify that this PR is correct linting wise, but will remove # pylint: disable=assignment-from-none again when ready for merge.

Copy link
Contributor

Choose a reason for hiding this comment

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

Link to the placeholder PR triggering the exact same lint warnings here and write a comment here confirming that this job only reports those lint errors in the lint job output. Done.

Copy link
Contributor

@jonasbardino jonasbardino left a comment

Choose a reason for hiding this comment

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

There are a few new issues to fix before merging. Please refer to my inline comments.

Copy link
Contributor

@jonasbardino jonasbardino left a comment

Choose a reason for hiding this comment

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

No, I did not actually suggest reintroducing java as a job handling language (genjobscriptjava) as that was specific to wrap and deliver jobs to oneclick resources AFAIK.
I just requested that the simple N-queens example executing a pre-compiled java executable (jar) under any job handler (probably bash) using whatever java env available at the given resource does not get thrown out in the process. Just like I wouldn't throw out python example jobs in case we decided to retire the python job handler (genjobscriptpython).

@Martin-Rehr
Copy link
Contributor Author

No, I did not actually suggest reintroducing java as a job handling language (genjobscriptjava) as that was specific to wrap and deliver jobs to oneclick resources AFAIK. I just requested that the simple N-queens example executing a pre-compiled java executable (jar) under any job handler (probably bash) using whatever java env available at the given resource does not get thrown out in the process. Just like I wouldn't throw out python example jobs in case we decided to retire the python job handler (genjobscriptpython).

Right, I misread the example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Non-functional changes to simplify or clean up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants