Skip to content

Conversation

Robin-Van-de-Merghel
Copy link
Contributor

BEGINRELEASENOTES

*SiteDirector
CHANGE: Connect SiteDirector to DiracX to use secrets.

ENDRELEASENOTES

@Robin-Van-de-Merghel Robin-Van-de-Merghel changed the title Robin add diracx auth Robin add diracx secrets in SiteDirector Jul 1, 2025
@Robin-Van-de-Merghel
Copy link
Contributor Author

Rebased on #8233

@Robin-Van-de-Merghel Robin-Van-de-Merghel changed the title Robin add diracx secrets in SiteDirector [V9.0] feat: Robin add diracx secrets in SiteDirector Jul 1, 2025
@Robin-Van-de-Merghel Robin-Van-de-Merghel changed the title [V9.0] feat: Robin add diracx secrets in SiteDirector [9.0] feat: Robin add diracx secrets in SiteDirector Jul 1, 2025
return cls.pilotAgentsDB.deletePilot(pilotIDs)

# And list[str]????
# pilot_id>>>S<<<
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree this is not intuitive, and this was done before we introduced typing, but I think list[str] is the "default" case

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 can't be list[str] the default. In fact, if it is, it will instantly crash. In pseudo code:

if its_a_str:
  # Add in db as if it was 1 stamp

if its_an_int:
  # Transform to a list

# Add in db as if it was multiple IDs

If we have a list[str], the code will go in the last case and try to insert stamps as IDs.

# AdditionalEnv[i] format:
# {"secret": "1_l0v3_1c3cr34m", ...}
# We merge them to have the right format: '("key" "value") (...)'
currentEnv = " ".join([f"({key} {value})" for key, value in additionalEnv[i]])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See if we need also \"

pilotOptions.append(f"--pipInstallOptions={queueDict['PipInstallOptions']}")

# FIXME: Get secret
# if "secret" in queueDict:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be removed

# FIXME: Get secret
# if "secret" in queueDict:
# pilotOptions.append(f"--pilotSecret={queueDict['...']}")
# FIXME: Get clientID
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If someone has an idea.

@aldbr
Copy link
Contributor

aldbr commented Jul 3, 2025

The more I think about it, the more I wonder whether it makes sense to go that far at the moment: may be we shouldn't try to adapt the DIRAC agents and should stop to the legacy adaptor within DIRAC.

Why?

  • Because then we need to define how DIRAC will interact with DiracX: should it be a user defined in the config? Should it get a special token?
  • Then we also need to adapt DiracX for this temporary use case.

It's not super clear, but IIUC, in the roadmap we state that the Pilot Submission should be implemented once the Tasks and the Pilot authentication will be available: https://github.com/DIRACGrid/diracx/blob/main/docs/roadmap.md#current-status

A DiracX Site Director would be able to contact diracx-logic directly, without passing by the routers, which would be much easier to manage I think.

Any opinion?

@fstagni
Copy link
Contributor

fstagni commented Jul 3, 2025

I tend to agree with you.

@Robin-Van-de-Merghel Robin-Van-de-Merghel changed the title [9.0] feat: Robin add diracx secrets in SiteDirector [9.0] feat: Add diracx secrets in SiteDirector Jul 3, 2025
@Robin-Van-de-Merghel
Copy link
Contributor Author

Discussed above: won't be done. It will be done in DiracX directly.

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