wzhero1 commented on code in PR #655: URL: https://github.com/apache/flink-agents/pull/655#discussion_r3263199741
########## runtime/src/main/java/org/apache/flink/agents/runtime/skill/repository/URLSkillRepository.java: ########## @@ -0,0 +1,95 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.agents.runtime.skill.repository; + +import org.apache.flink.agents.runtime.skill.AgentSkill; +import org.apache.flink.agents.runtime.skill.SkillRepository; + +import javax.annotation.Nullable; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; +import java.util.Map; + +/** + * Skill repository backed by an http(s) URL pointing to a zip. + * + * <p>The zip is downloaded to a temp file and extracted into a process-local temp directory. The + * downloaded zip itself is removed once extraction completes; the extracted directory is released + * via {@link #close()} (cascaded through {@code SkillManager} → {@code ResourceContextImpl} → + * {@code ResourceCache} on operator close). A JVM shutdown hook acts as fallback cleanup if {@code + * close()} is never called. + * + * <p>Composes a {@link SkillDirectoryReader} for the on-disk parsing; the materialization happens + * upfront in the constructor (no abuse of {@code super(...)}). + */ +public final class URLSkillRepository implements SkillRepository { + + private static final int REQUEST_TIMEOUT_MS = 90_000; + + private final String url; Review Comment: **Field name `owned` is an adjective without a subject.** maybe `ownerMaterialization` Same applies to `ClasspathSkillRepository.java:73` and `FileSystemSkillRepository.java:51`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
