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

TASK-6442 - Add Resources Management functionality #2535

Open
wants to merge 55 commits into
base: develop
Choose a base branch
from
Open

Conversation

pfurio
Copy link
Member

@pfurio pfurio commented Dec 10, 2024

No description provided.

jtarraga and others added 30 commits October 3, 2024 15:01
…alyisis resources for the current OpenCGA version, and generate clients, #TASK-7088, #TASK-6442
…o the installation folder, #TASK-7088, #TASK-6442
…lization, and add the flag fetchResourceOnInit in the configuration file, #TASK-7088, #TASK-6442
…ng the ResourceManager, #TASK-7139, #TASK-6442
@pfurio pfurio requested a review from j-coll December 10, 2024 11:37
FqnUtils.FQN fqn = FqnUtils.parse(study.getFqn());
String organization = fqn.getOrganization();
try {
URI studyUri = ioManager.getStudyUri(organization, Long.toString(project.getUid()), Long.toString(study.getUid()));
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this responsibility of the StudyManager?
By this I mean "setting and validating expected values to the object to insert"

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I agree it should be its responsibility. However, until we create some kind of session between the manager and the dbadaptor, I'd say that's the best place it could be for integrity reasons.

}

/*
$ cat resources-3.3.0-SNAPSHOT.json | jq
Copy link
Member

Choose a reason for hiding this comment

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

😮

@@ -18,7 +18,8 @@ analysis:
- "org.opencb.opencga"
scratchDir: "/tmp/" # Scratch folder for the analysis.
# Default URL for downloading analysis resources.
resourceUrl: "http://resources.opencb.org/opencb/opencga/analysis/"
resourceUrl: "http://resources.opencb.org/opencb/opencga/analysis/resources-test/"
Copy link
Member

Choose a reason for hiding this comment

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

"resources-test/" is the actual final value, or just a temporary testing change?


public class AnalysisResourceList {

private String analysisId;
Copy link
Member

Choose a reason for hiding this comment

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

Is "analysis" a thing? What is this "analysisId" ? Isn't this a "toolId" ?
The only "analysisId" that we have are the "clinicalAnalysisIds"


public class AnalysisResource {

private String url;
Copy link
Member

Choose a reason for hiding this comment

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

Please, add @DataField annotations to new fields

e.g.

@DataField(description = "I have no idea what this key is for. Wild guess : it's for encryption purposes")
private String key;

import java.util.ArrayList;
import java.util.List;

public class AnalysisResource {
Copy link
Member

Choose a reason for hiding this comment

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

There is a naming discrepancy between "Resource" and "AnalysisResource".
Does the ResourceManager manage AnalysisResources? Are there any other non-analysis resources?
Files can be just a "resource : bool"


// Mark fetching as started
try {
isFetching = true;
Copy link
Member

Choose a reason for hiding this comment

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

What if it's being fetched from another node?

private Configuration configuration;

// Flag to track if all resources are fetching
private boolean isFetching = false;
Copy link
Member

Choose a reason for hiding this comment

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

make it "volatile" or "AtomicBoolean"

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

Successfully merging this pull request may close these issues.

4 participants