diff --git a/.env.example b/.env.example
index 286acad..e8c4298 100644
--- a/.env.example
+++ b/.env.example
@@ -1,4 +1,4 @@
-openai_api_key=
+OPENAI_API_KEY=
LANGCHAIN_TRACING_V2=true
LANGCHAIN_ENDPOINT=https://api.smith.langchain.com
LANGCHAIN_PROJECT=autocode
diff --git a/README.md b/README.md
index c0dbce3..e6a6def 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ companies.
1. Install the requirements
```bash
-pip install autocode-py
+pip install -U autocode-py
```
2. Prepare software to be processed as in the [`./example/client`](https://github.com/muazhari/autocode/tree/main/example/client) folder.
@@ -33,7 +33,7 @@ pip install autocode-py
4. Prepare controller as in the [`./example/controller.ipynb`](https://github.com/muazhari/autocode/blob/main/example/controller.ipynb) file.
5. Instantiate `optimization` and execute `optimization.deploy()` in controller.
6. Open dashboard in `http://localhost:{dashboard_port}/` to see the process in real-time.
-7. Wait until all client are ready (need to wait for long time because the libraries need to be re-download for each client & refresh the dashboard manually because of bug).
+7. Wait until all client are ready (need to wait for long time because the libraries need to be re-downloaded for each client).
8. Execute `optimization.run()` in controller.
9. Wait until the run is finished.
10. Analyze and decide the best values.
diff --git a/autocode/dashboard.py b/autocode/dashboard.py
index e7c6ef3..8f0d688 100644
--- a/autocode/dashboard.py
+++ b/autocode/dashboard.py
@@ -55,16 +55,19 @@
client: OptimizationClient = dill.loads(client_cache.value)
variables.update(client.variables)
clients[client.id] = client
- client_df_list.append(client.model_dump(mode="json"))
+ client_json: Dict[str, Any] = client.model_dump(mode="json")
+ client_json["port"] = str(client.port)
+ client_df_list.append(client_json)
- with client_df_placeholder:
- client_df: pd.DataFrame = pd.DataFrame(client_df_list)
- client_df = client_df.astype(dtype=str)
+ client_df: pd.DataFrame = pd.DataFrame(client_df_list)
+
+ with client_df_placeholder.container():
st.dataframe(client_df, height=500)
if len(objective_caches) > 0:
break
+ session.close()
time.sleep(0.01)
if len(objective_caches) == 0 and len(client_caches) == 0:
@@ -91,12 +94,7 @@
else:
st.error("Preparation data cache is not valid.")
-plot_0_placeholder = st.empty()
-plot_1_placeholder = st.empty()
-st.subheader("Objective Space")
-plot_f_df_placeholder = st.empty()
-st.subheader("Solution Space")
-plot_x_df_placeholder = st.empty()
+plot_placeholder = st.empty()
while True:
try:
@@ -137,12 +135,6 @@
decision_index=decision_index
)
- with plot_0_placeholder:
- st.pyplot(plots[0].fig)
-
- with plot_1_placeholder:
- st.pyplot(plots[1].fig)
-
list_dict_x: List[List[Dict[str, Any]]] = []
list_dict_f: List[Dict[str, Any]] = []
for index, (x, f) in enumerate(zip(result.X, result.F)):
@@ -178,13 +170,17 @@
dict_f[f"f{index + 1}"] = f_value
list_dict_f.append(dict_f)
- with plot_f_df_placeholder:
- f_df: pd.DataFrame = pd.DataFrame(list_dict_f)
- st.dataframe(f_df, height=500)
+ f_df: pd.DataFrame = pd.DataFrame(list_dict_f)
- with plot_x_df_placeholder:
+ with plot_placeholder.container():
+ st.subheader("Objective Space")
+ st.pyplot(plots[0].fig)
+ st.pyplot(plots[1].fig)
+ st.subheader("Solution Space")
+ st.dataframe(f_df, height=500)
st.json(list_dict_x, expanded=False)
st.session_state["old_result_caches"].add(cache)
+ session.close()
time.sleep(0.01)
diff --git a/autocode/database.db b/autocode/database.db
index fcdc94d..167e578 100644
Binary files a/autocode/database.db and b/autocode/database.db differ
diff --git a/autocode/model.py b/autocode/model.py
index e18c08f..9c50ba1 100644
--- a/autocode/model.py
+++ b/autocode/model.py
@@ -22,42 +22,35 @@ class BaseModel(PydanticBaseModelV2):
class CodeScoring(BaseModelV1):
"""
- Score code in based on the following statements:
- Error Potentiality - this code is potentially error-prone;
- Readability - this code is easy to read;
- Understandability - the semantic meaning of this code is clear;
- Complexity - this code is complex;
- Modularity - this code should be broken into smaller pieces;
- Overall maintainability - overall, this code is maintainable.
- The score scale from 1 (strongly agree) to 100 (strongly disagree).
- You must score in precision, i.e. 14.3, 47.456, 75.45, 58.58495, 3.141598, etc.
+ Score the code.
"""
- error_potentiality: float = FieldV1(description="Error potential score.")
+ analysis: List[str] = FieldV1(description="Step-by-step analysis before scoring the code.")
readability: float = FieldV1(description="Readability score.")
understandability: float = FieldV1(description="Understandability score.")
complexity: float = FieldV1(description="Complexity score.")
modularity: float = FieldV1(description="Modularity score.")
+ error_potentiality: float = FieldV1(description="Error potential score.")
overall_maintainability: float = FieldV1(description="Overall maintainability score.")
class CodeVariation(BaseModelV1):
"""
- Code variation is a code snippet that is a variation of the original code.
+ Propose code variation.
"""
- variation: Optional[str] = FieldV1(description="Code variation.", default=None)
+ analysis: List[str] = FieldV1(description="Step-by-step analysis before proposing the code variation.")
+ variation: str = FieldV1(description="Proposed code variation.")
class ScoringState(TypedDict):
- code: str
- analysis: str
- score: List[CodeScoring]
+ programming_language: str
+ existing_code: str
+ score: CodeScoring
class VariationState(TypedDict):
- code: str
- analysis: str
- variation: List[CodeVariation]
- new_function_name: str
+ programming_language: str
+ existing_code: str
+ variations: List[CodeVariation]
class OptimizationVariable(BaseModel):
@@ -141,6 +134,7 @@ class OptimizationClient(BaseModel):
class OptimizationPrepareRequest(BaseModel):
+ language: str
variables: Dict[str, OptimizationBinary | OptimizationChoice | OptimizationInteger | OptimizationReal]
host: Optional[str] = Field(default=None)
port: int
diff --git a/autocode/setting.py b/autocode/setting.py
index 4ec3244..8453d11 100644
--- a/autocode/setting.py
+++ b/autocode/setting.py
@@ -12,4 +12,4 @@ class ApplicationSetting(BaseSettings):
server_host: str = Field(default="0.0.0.0")
server_port: int = Field(default=10000)
dashboard_port: int = Field(default=10001)
- openai_api_key: str = Field(default="")
+ OPENAI_API_KEY: str = Field(default="")
diff --git a/autocode/use_case.py b/autocode/use_case.py
index 0ce250f..bbb8bf2 100644
--- a/autocode/use_case.py
+++ b/autocode/use_case.py
@@ -10,8 +10,9 @@
import ray
import sqlalchemy.exc
from langchain_core.output_parsers import PydanticToolsParser
-from langchain_core.prompts import ChatPromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate, \
- AIMessagePromptTemplate
+from langchain_core.prompts import ChatPromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate
+from langchain_core.runnables import RunnableSerializable
+from langchain_core.runnables.utils import Output
from langchain_openai import ChatOpenAI
from langgraph.graph import StateGraph
from pymoo.algorithms.moo.sms import SMSEMOA
@@ -202,161 +203,154 @@ def __init__(
self.variation_graph = self.get_variation_graph()
def get_scoring_graph(self):
- chat = ChatOpenAI(
+ chat: ChatOpenAI = ChatOpenAI(
model="gpt-4o-mini",
- api_key=self.application_setting.openai_api_key
+ api_key=self.application_setting.OPENAI_API_KEY
)
- tools = [CodeScoring]
- parser = PydanticToolsParser(tools=tools)
-
- def node_scoring_analyze(state: ScoringState):
- prompt = ChatPromptTemplate.from_messages([
- SystemMessagePromptTemplate.from_template("""
- You are target group of our study. The target group of our study are software quality analysts, researchers with a background in software quality, and software engineers that are involved with maintaining software. Some participants have up to 15 years of experience in quality assessments. In sum, 70 professionals participated. First, we invited selected experts to participate in the study. Second, we asked them to disseminate the study to interested and qualified colleagues. The survey was also promoted in relevant net- works. The participants are affiliated with companies including Airbus, Audi, BMW, Boston Consulting Group, Celonis, cesdo Software Quality GmbH, CQSE GmbH, Facebook, fortiss, itestra GmbH, Kinexon GmbH, MaibornWolff GmbH, Munich Re, Oracle, and three universities. However, 7 participants did not want to share their affiliation. During the study, we followed a systematic approach to assess software maintainability. The following steps were taken:
- """),
- HumanMessagePromptTemplate.from_template("""
- Analyze readability, understandability, complexity, modularity, and overall maintainability metrics of the following code.
- You must use step by step comprehensive reasoning to explain your analysis.
-
- {code}
-
- """),
- ])
- chain = prompt | chat
- response = chain.invoke({
- "code": state["code"],
- })
- state["analysis"] = response.content
- return state
+ parser: PydanticToolsParser = PydanticToolsParser(
+ tools=[CodeScoring]
+ )
def node_scoring(state: ScoringState):
prompt = ChatPromptTemplate.from_messages([
SystemMessagePromptTemplate.from_template("""
- You are target group of our study. The target group of our study are software quality analysts, researchers with a background in software quality, and software engineers that are involved with maintaining software. Some participants have up to 15 years of experience in quality assessments. In sum, 70 professionals participated. First, we invited selected experts to participate in the study. Second, we asked them to disseminate the study to interested and qualified colleagues. The survey was also promoted in relevant networks. The participants are affiliated with companies including Airbus, Audi, BMW, Boston Consulting Group, Celonis, cesdo Software Quality GmbH, CQSE GmbH, Facebook, fortiss, itestra GmbH, Kinexon GmbH, MaibornWolff GmbH, Munich Re, Oracle, and three universities. However, 7 participants did not want to share their affiliation. During the study, we followed a systematic approach to assess software maintainability. The following steps were taken:
- """),
- HumanMessagePromptTemplate.from_template("""
- Analyze error potentiality, readability, understandability, complexity, modularity, and overall maintainability metrics of the following code.
- You must use step by step comprehensive reasoning to explain your analysis.
-
- {code}
-
- """),
- AIMessagePromptTemplate.from_template("""
- {analysis}
- """),
+ You are target group of our study. The target group of our study are software quality analysts, researchers with a background in software quality, and software engineers that are involved with maintaining software.
+ Some participants have up to 15 years of experience in quality assessments.
+ In sum, 70 professionals participated.
+ First, we invited selected experts to participate in the study.
+ Second, we asked them to disseminate the study to interested and qualified colleagues.
+ The survey was also promoted in relevant networks.
+ The participants are affiliated with companies including Airbus, Audi, BMW, Boston Consulting Group, Celonis, cesdo Software Quality GmbH, CQSE GmbH, Facebook, fortiss, itestra GmbH, Kinexon GmbH, MaibornWolff GmbH, Munich Re, Oracle, and three universities.
+ However, 7 participants did not want to share their affiliation.
+ During the study, we followed a systematic approach to assess software maintainability.
+ The following steps were taken:
+ """),
HumanMessagePromptTemplate.from_template("""
- Based on your analysis and the provided code, score the code based on the following criteria:
- Error potentiality - this code is potentially error-prone;
- Readability - this code is easy to read;
- Understandability - the semantic meaning of this code is clear;
- Complexity - this code is complex;
- Modularity - this code should be broken into smaller pieces;
- Overall maintainability - overall, this code is maintainable.
- The score scale from 1 (strongly agree) to 100 (strongly disagree).
- You must score in precision, i.e. 14, 47.456, 75, 58.58495, 3.141598, etc.
- """),
+ Comprehensively step-by-step analyze then score the existing code using a "CodeScoring" tool.
+ Readability - this code is easy to read;
+ Understandability - the semantic meaning of this code is clear;
+ Complexity - this code is complex;
+ Modularity - this code should be broken into smaller pieces;
+ Error Potentiality - this code is potentially error-prone;
+ Overall maintainability - overall, this code is maintainable.
+ The score scale from 0 (strongly disagree) to 100 (strongly agree).
+ You must score the code in precision, example: 14.3, 42.456, 99.45, 78.58495, 3.141598, 0.579, etc.
+ You must in context to the programming language.
+ Ignore the function name, input-output parameters, and input-output types.
+
+ {programming_language}
+
+
+ {existing_code}
+
+ """),
])
- chain = prompt | chat.bind_tools(tools=tools) | parser
- response = chain.invoke({
- "code": state["code"],
- "analysis": state["analysis"]
+ chain: RunnableSerializable = (
+ prompt |
+ chat.bind_tools(
+ tools=parser.tools,
+ strict=True,
+ tool_choice="required"
+ ) |
+ parser
+ )
+ response: Output = chain.invoke({
+ "programming_language": state["programming_language"],
+ "existing_code": state["existing_code"],
})
- state["score"] = response
+ state["score"] = response[0]
+
return state
graph = StateGraph(ScoringState)
graph.set_entry_point(node_scoring.__name__)
- # graph.add_node(node_scoring_analyze.__name__, node_scoring_analyze)
graph.add_node(node_scoring.__name__, node_scoring)
- # graph.add_edge(node_scoring_analyze.__name__, node_scoring.__name__)
graph.set_finish_point(node_scoring.__name__)
compiled_graph = graph.compile()
return compiled_graph
def get_variation_graph(self):
- chat = ChatOpenAI(
+ chat: ChatOpenAI = ChatOpenAI(
model="gpt-4o-mini",
- api_key=self.application_setting.openai_api_key
+ api_key=self.application_setting.OPENAI_API_KEY
)
- tools = [CodeVariation]
- parser = PydanticToolsParser(tools=tools)
-
- def node_variation_analyze(state: VariationState):
- prompt = ChatPromptTemplate.from_messages([
- SystemMessagePromptTemplate.from_template("""
- You are target group of our study. The target group of our study are software quality analysts, researchers with a background in software quality, and software engineers that are involved with maintaining software. Some participants have up to 15 years of experience in quality assessments. In sum, 70 professionals participated. First, we invited selected experts to participate in the study. Second, we asked them to disseminate the study to interested and qualified colleagues. The survey was also promoted in relevant net- works. The participants are affiliated with companies including Airbus, Audi, BMW, Boston Consulting Group, Celonis, cesdo Software Quality GmbH, CQSE GmbH, Facebook, fortiss, itestra GmbH, Kinexon GmbH, MaibornWolff GmbH, Munich Re, Oracle, and three universities. However, 7 participants did not want to share their affiliation. During the study, we followed a systematic approach to assess software maintainability. The following steps were taken:
- """),
- HumanMessagePromptTemplate.from_template("""
- Analyze the existing code to propose many possible variations.
- You can use libraries in the possible variations.
-
- {code}
-
- """),
- ])
- chain = prompt | chat
- response = chain.invoke({
- "code": state["code"],
- })
- state["analysis"] = response.content
- return state
+ parser: PydanticToolsParser = PydanticToolsParser(
+ tools=[CodeVariation]
+ )
def node_variation(state: VariationState):
prompt = ChatPromptTemplate.from_messages([
SystemMessagePromptTemplate.from_template("""
- You are target group of our study. The target group of our study are software quality analysts, researchers with a background in software quality, and software engineers that are involved with maintaining software. Some participants have up to 15 years of experience in quality assessments. In sum, 70 professionals participated. First, we invited selected experts to participate in the study. Second, we asked them to disseminate the study to interested and qualified colleagues. The survey was also promoted in relevant networks. The participants are affiliated with companies including Airbus, Audi, BMW, Boston Consulting Group, Celonis, cesdo Software Quality GmbH, CQSE GmbH, Facebook, fortiss, itestra GmbH, Kinexon GmbH, MaibornWolff GmbH, Munich Re, Oracle, and three universities. However, 7 participants did not want to share their affiliation. During the study, we followed a systematic approach to assess software maintainability. The following steps were taken:
- """),
- HumanMessagePromptTemplate.from_template("""
- Analyze the existing code to propose many possible variations.
- You can use libraries in the possible variations.
-
- {code}
-
- """),
- AIMessagePromptTemplate.from_template("""
- {analysis}
+ You are target group of our study. The target group of our study are software quality analysts, researchers with a background in software quality, and software engineers that are involved with maintaining software.
+ Some participants have up to 15 years of experience in quality assessments.
+ In sum, 70 professionals participated.
+ First, we invited selected experts to participate in the study.
+ Second, we asked them to disseminate the study to interested and qualified colleagues.
+ The survey was also promoted in relevant networks.
+ The participants are affiliated with companies including Airbus, Audi, BMW, Boston Consulting Group, Celonis, cesdo Software Quality GmbH, CQSE GmbH, Facebook, fortiss, itestra GmbH, Kinexon GmbH, MaibornWolff GmbH, Munich Re, Oracle, and three universities.
+ However, 7 participants did not want to share their affiliation.
+ During the study, we followed a systematic approach to assess software maintainability.
+ The following steps were taken:
"""),
HumanMessagePromptTemplate.from_template("""
- Generate necessary code variations using "CodeVariation" tools.
- If you are using libraries, ensure to import them.
- Ignore to import "autocode" library, it is already imported.
- Ensure function name, input-output parameters, and input-output types in the code variations are exactly same as the existing code.
+ Comprehensively step-by-step analyze the existing code then propose necessary code variations using "CodeVariation" tools.
+ You must in context to the programming language.
+ You can use other libraries in the code variations.
+ If you are using other libraries, ensure to import them.
+ Do not try to use "autocode" library in the code variations.
+ Do not try to add, remove, and change the function name, input-output parameters, and input-output types in the code variations, make them exactly as in the existing code.
+
+ {programming_language}
+
+
+ {existing_code}
+
"""),
])
- chain = prompt | chat.bind_tools(tools=tools) | parser
- response = chain.invoke({
- "code": state["code"],
- "analysis": state["analysis"],
+ chain: RunnableSerializable = (
+ prompt |
+ chat.bind_tools(
+ tools=parser.tools,
+ strict=True,
+ tool_choice="auto"
+ ) |
+ parser
+ )
+ response: Output = chain.invoke({
+ "programming_language": state["programming_language"],
+ "existing_code": state["existing_code"],
})
- state["variation"] = response
+ state["variations"] = response
+
return state
graph = StateGraph(VariationState)
graph.set_entry_point(node_variation.__name__)
- # graph.add_node(node_variation_analyze.__name__, node_variation_analyze)
graph.add_node(node_variation.__name__, node_variation)
- # graph.add_edge(node_variation_analyze.__name__, node_variation.__name__)
graph.set_finish_point(node_variation.__name__)
compiled_graph = graph.compile()
return compiled_graph
- async def function_scoring(self, function: OptimizationValueFunction) -> List[CodeScoring]:
+ async def function_scoring(self, language: str, function: OptimizationValueFunction) -> CodeScoring:
state: ScoringState = await self.scoring_graph.ainvoke({
- "code": function.string
+ "programming_language": language,
+ "existing_code": function.string
})
return state["score"]
- async def generate_function_variation(self, function: OptimizationValueFunction) -> List[CodeVariation]:
+ async def generate_function_variation(self, language: str, function: OptimizationValueFunction) -> List[
+ CodeVariation]:
state: VariationState = await self.variation_graph.ainvoke({
- "code": function.string,
+ "programming_language": language,
+ "existing_code": function.string,
})
- return state["variation"]
+ return state["variations"]
class OptimizationProblemRunner:
@@ -425,7 +419,7 @@ def prepare(self, request: OptimizationPrepareRequest) -> OptimizationPrepareRes
if self.client_name_to_variables.get(client.name, None) is not None:
client.variables = self.client_name_to_variables[client.name]
else:
- list_variation_futures: List[Coroutine] = []
+ list_code_variation_futures: List[Coroutine] = []
list_variables: List[OptimizationVariable] = []
list_functions: List[OptimizationValueFunction] = []
@@ -434,17 +428,22 @@ def prepare(self, request: OptimizationPrepareRequest) -> OptimizationPrepareRes
for option_id, option in variable.options.items():
if option.type == OptimizationValueFunction.__name__:
function: OptimizationValueFunction = option.data
- future_variation: Coroutine = self.llm_use_case.generate_function_variation(function)
- list_variation_futures.append(future_variation)
+ future_code_variation: Coroutine = self.llm_use_case.generate_function_variation(
+ language=request.language,
+ function=function
+ )
+ list_code_variation_futures.append(future_code_variation)
list_variables.append(variable)
list_functions.append(function)
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
- list_variations = asyncio.get_event_loop().run_until_complete(asyncio.gather(*list_variation_futures))
- for variable, variations, function in zip(list_variables, list_variations, list_functions):
- for variation in variations:
+ list_code_variations = asyncio.get_event_loop().run_until_complete(
+ asyncio.gather(*list_code_variation_futures)
+ )
+ for variable, code_variations, function in zip(list_variables, list_code_variations, list_functions):
+ for code_variation in code_variations:
new_option_id: str = str(uuid.uuid4())
copied_function: OptimizationValueFunction = copy.deepcopy(function)
new_function_name: str = "variation_" + uuid.uuid4().hex
@@ -454,31 +453,35 @@ def prepare(self, request: OptimizationPrepareRequest) -> OptimizationPrepareRes
copied_function.string = re.sub(
pattern=r"func (.+?)\(",
repl="func " + new_function_name + "(",
- string=variation.variation
+ string=code_variation.variation
)
variable.options[new_option_id] = OptimizationValue(
id=new_option_id,
data=copied_function
)
- list_functions: List[str] = []
+ list_functions: List[OptimizationValueFunction] = []
list_scoring_futures: List[Coroutine] = []
for variable_id, variable in client.variables.items():
if variable.type == OptimizationChoice.__name__:
for option_id, option in variable.options.items():
if option.type == OptimizationValueFunction.__name__:
- future_scoring: Coroutine = self.llm_use_case.function_scoring(option.data)
+ function: OptimizationValueFunction = option.data
+ future_scoring: Coroutine = self.llm_use_case.function_scoring(
+ language=request.language,
+ function=function
+ )
list_scoring_futures.append(future_scoring)
- list_functions.append(option.data)
+ list_functions.append(function)
list_scores = asyncio.get_event_loop().run_until_complete(asyncio.gather(*list_scoring_futures))
for function, score in zip(list_functions, list_scores):
- function.understandability = score[0].understandability
- function.error_potentiality = score[0].error_potentiality
- function.readability = score[0].readability
- function.complexity = score[0].complexity
- function.modularity = score[0].modularity
- function.overall_maintainability = score[0].overall_maintainability
+ function.understandability = score.understandability
+ function.readability = score.readability
+ function.complexity = score.complexity
+ function.modularity = score.modularity
+ function.error_potentiality = score.error_potentiality
+ function.overall_maintainability = score.overall_maintainability
for variable in client.variables.values():
variable.set_client_id(client.id)
diff --git a/example/client/app_account/go.mod b/example/client/app_account/go.mod
index 057df91..25cfd6b 100644
--- a/example/client/app_account/go.mod
+++ b/example/client/app_account/go.mod
@@ -4,7 +4,7 @@ go 1.22.5
require (
github.com/gorilla/mux v1.8.1
- github.com/muazhari/autocode-go v0.0.0-20240806052715-4093b1b479f4
+ github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7
github.com/stretchr/testify v1.9.0
)
diff --git a/example/client/app_account/go.sum b/example/client/app_account/go.sum
index a4f7cff..08b5c31 100644
--- a/example/client/app_account/go.sum
+++ b/example/client/app_account/go.sum
@@ -11,8 +11,8 @@ github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ib
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
-github.com/muazhari/autocode-go v0.0.0-20240806052715-4093b1b479f4 h1:/tm83P28LJYCTU7TOSKNiqp5KH+Gxa5BWe6vWUQFH0A=
-github.com/muazhari/autocode-go v0.0.0-20240806052715-4093b1b479f4/go.mod h1:pKKR6T6V1G0M3vdBtIIX65hIweojOWg0Lsz/G5UlzUA=
+github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7 h1:dVYgEhQcF+wMmt4kfLY68QiDKB2dUxqxVZkMxiJgl1U=
+github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7/go.mod h1:pKKR6T6V1G0M3vdBtIIX65hIweojOWg0Lsz/G5UlzUA=
github.com/muazhari/gomacro-custom v0.0.0-20240731093833-a6136ef7aaa6 h1:bVd+/pTg3Vmmev3bfvqFMYfBtCI1WLJFT4OgTOCpYmk=
github.com/muazhari/gomacro-custom v0.0.0-20240731093833-a6136ef7aaa6/go.mod h1:TpqeUBTRIqg+V3AdDQkZWvzlbvUm5Lj5toOWN9Ifkao=
github.com/peterh/liner v1.2.2 h1:aJ4AOodmL+JxOZZEL2u9iJf8omNRpqHc/EbrK+3mAXw=
diff --git a/example/client/app_gateway/go.mod b/example/client/app_gateway/go.mod
index 6c9171d..a43f71b 100644
--- a/example/client/app_gateway/go.mod
+++ b/example/client/app_gateway/go.mod
@@ -4,7 +4,7 @@ go 1.22.5
require (
github.com/gorilla/mux v1.8.1
- github.com/muazhari/autocode-go v0.0.0-20240806052715-4093b1b479f4
+ github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7
)
require (
diff --git a/example/client/app_gateway/go.sum b/example/client/app_gateway/go.sum
index a4f7cff..08b5c31 100644
--- a/example/client/app_gateway/go.sum
+++ b/example/client/app_gateway/go.sum
@@ -11,8 +11,8 @@ github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ib
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
-github.com/muazhari/autocode-go v0.0.0-20240806052715-4093b1b479f4 h1:/tm83P28LJYCTU7TOSKNiqp5KH+Gxa5BWe6vWUQFH0A=
-github.com/muazhari/autocode-go v0.0.0-20240806052715-4093b1b479f4/go.mod h1:pKKR6T6V1G0M3vdBtIIX65hIweojOWg0Lsz/G5UlzUA=
+github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7 h1:dVYgEhQcF+wMmt4kfLY68QiDKB2dUxqxVZkMxiJgl1U=
+github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7/go.mod h1:pKKR6T6V1G0M3vdBtIIX65hIweojOWg0Lsz/G5UlzUA=
github.com/muazhari/gomacro-custom v0.0.0-20240731093833-a6136ef7aaa6 h1:bVd+/pTg3Vmmev3bfvqFMYfBtCI1WLJFT4OgTOCpYmk=
github.com/muazhari/gomacro-custom v0.0.0-20240731093833-a6136ef7aaa6/go.mod h1:TpqeUBTRIqg+V3AdDQkZWvzlbvUm5Lj5toOWN9Ifkao=
github.com/peterh/liner v1.2.2 h1:aJ4AOodmL+JxOZZEL2u9iJf8omNRpqHc/EbrK+3mAXw=
diff --git a/example/client/app_product/go.mod b/example/client/app_product/go.mod
index 93a6b35..2902b97 100644
--- a/example/client/app_product/go.mod
+++ b/example/client/app_product/go.mod
@@ -4,7 +4,7 @@ go 1.22.5
require (
github.com/gorilla/mux v1.8.1
- github.com/muazhari/autocode-go v0.0.0-20240806052715-4093b1b479f4
+ github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7
github.com/stretchr/testify v1.9.0
)
diff --git a/example/client/app_product/go.sum b/example/client/app_product/go.sum
index a4f7cff..08b5c31 100644
--- a/example/client/app_product/go.sum
+++ b/example/client/app_product/go.sum
@@ -11,8 +11,8 @@ github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ib
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
-github.com/muazhari/autocode-go v0.0.0-20240806052715-4093b1b479f4 h1:/tm83P28LJYCTU7TOSKNiqp5KH+Gxa5BWe6vWUQFH0A=
-github.com/muazhari/autocode-go v0.0.0-20240806052715-4093b1b479f4/go.mod h1:pKKR6T6V1G0M3vdBtIIX65hIweojOWg0Lsz/G5UlzUA=
+github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7 h1:dVYgEhQcF+wMmt4kfLY68QiDKB2dUxqxVZkMxiJgl1U=
+github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7/go.mod h1:pKKR6T6V1G0M3vdBtIIX65hIweojOWg0Lsz/G5UlzUA=
github.com/muazhari/gomacro-custom v0.0.0-20240731093833-a6136ef7aaa6 h1:bVd+/pTg3Vmmev3bfvqFMYfBtCI1WLJFT4OgTOCpYmk=
github.com/muazhari/gomacro-custom v0.0.0-20240731093833-a6136ef7aaa6/go.mod h1:TpqeUBTRIqg+V3AdDQkZWvzlbvUm5Lj5toOWN9Ifkao=
github.com/peterh/liner v1.2.2 h1:aJ4AOodmL+JxOZZEL2u9iJf8omNRpqHc/EbrK+3mAXw=
diff --git a/example/controller.ipynb b/example/controller.ipynb
index e7fdcc7..6c86ecf 100644
--- a/example/controller.ipynb
+++ b/example/controller.ipynb
@@ -3,8 +3,8 @@
{
"metadata": {
"ExecuteTime": {
- "end_time": "2024-08-06T12:56:02.952049Z",
- "start_time": "2024-08-06T12:55:59.119293Z"
+ "end_time": "2024-08-07T11:31:43.001353Z",
+ "start_time": "2024-08-07T11:31:37.824723Z"
}
},
"cell_type": "code",
@@ -12,11 +12,12 @@
"from autocode import Optimization\n",
"\n",
"optimization: Optimization = Optimization(\n",
- " num_cpus=12,\n",
+ " num_cpus=2,\n",
" server_host=\"0.0.0.0\",\n",
" server_port=10000,\n",
" dashboard_port=10001,\n",
- ")"
+ ")\n",
+ "optimization.reset()"
],
"id": "fe6274905d54ad44",
"outputs": [
@@ -24,14 +25,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "2024-08-06 19:56:02,398\tINFO worker.py:1743 -- Started a local Ray instance. View the dashboard at \u001B[1m\u001B[32mhttp://172.25.4.192:8265 \u001B[39m\u001B[22m\n"
+ "2024-08-07 18:31:42,454\tINFO worker.py:1743 -- Started a local Ray instance. View the dashboard at \u001B[1m\u001B[32mhttp://172.25.4.192:8265 \u001B[39m\u001B[22m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
- "Available resources: {'accelerator_type:G': 1.0, 'node:__internal_head__': 1.0, 'node:172.25.4.192': 1.0, 'CPU': 12.0, 'object_store_memory': 4375123968.0, 'memory': 8750247936.0, 'GPU': 1.0}\n",
+ "Available resources: {'accelerator_type:G': 1.0, 'node:__internal_head__': 1.0, 'node:172.25.4.192': 1.0, 'CPU': 12.0, 'memory': 9207683483.0, 'object_store_memory': 4603841740.0, 'GPU': 1.0}\n",
"Server is healthy.\n"
]
}
@@ -41,35 +42,8 @@
{
"metadata": {
"ExecuteTime": {
- "end_time": "2024-08-06T12:56:05.770631Z",
- "start_time": "2024-08-06T12:56:05.713214Z"
- }
- },
- "cell_type": "code",
- "source": [
- "import dotenv\n",
- "from autocode import OptimizationUseCase, ApplicationSetting\n",
- "from autocode.container import ApplicationContainer\n",
- "\n",
- "dotenv.load_dotenv(dotenv.find_dotenv())\n",
- "application_container: ApplicationContainer = ApplicationContainer()\n",
- "application_setting: ApplicationSetting = application_container.settings.application()\n",
- "application_setting.num_cpus = 12\n",
- "application_setting.server_host = \"0.0.0.0\"\n",
- "application_setting.server_port = 10000\n",
- "application_setting.dashboard_port = 10001\n",
- "optimization_use_case: OptimizationUseCase = application_container.use_cases.optimization()\n",
- "# optimization_use_case.reset()"
- ],
- "id": "e79f7e07e3b46f41",
- "outputs": [],
- "execution_count": 2
- },
- {
- "metadata": {
- "ExecuteTime": {
- "end_time": "2024-08-06T12:56:41.474338Z",
- "start_time": "2024-08-06T12:56:07.168477Z"
+ "end_time": "2024-08-07T14:31:18.035304Z",
+ "start_time": "2024-08-07T14:30:04.597839Z"
}
},
"cell_type": "code",
@@ -89,104 +63,201 @@
"text": [
"#0 building with \"default\" instance using docker driver\n",
"\n",
- "#1 [app-account internal] load build definition from .Dockerfile\n",
+ "#1 [app-product internal] load build definition from .Dockerfile\n",
"#1 transferring dockerfile: 119B 0.0s done\n",
"#1 DONE 0.0s\n",
"\n",
- "#2 [app-gateway internal] load build definition from .Dockerfile\n",
+ "#2 [app-account internal] load build definition from .Dockerfile\n",
"#2 transferring dockerfile: 119B 0.0s done\n",
"#2 DONE 0.0s\n",
"\n",
- "#3 [app-product internal] load build definition from .Dockerfile\n",
+ "#3 [app-gateway internal] load build definition from .Dockerfile\n",
"#3 transferring dockerfile: 119B 0.0s done\n",
"#3 DONE 0.0s\n",
"\n",
- "#4 [app-product internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 2.1s\n",
+ "#4 [app-gateway internal] load metadata for docker.io/library/golang:latest\n",
+ "#4 DONE 1.9s\n",
"\n",
"#5 [app-gateway internal] load .dockerignore\n",
- "#5 transferring context: 2B 0.0s done\n",
+ "#5 transferring context: 2B done\n",
"#5 DONE 0.0s\n",
"\n",
- "#6 [app-product internal] load .dockerignore\n",
- "#6 transferring context: 2B 0.0s done\n",
+ "#6 [app-account internal] load .dockerignore\n",
+ "#6 transferring context: 2B done\n",
"#6 DONE 0.0s\n",
"\n",
- "#7 [app-account 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
+ "#7 [app-product internal] load .dockerignore\n",
+ "#7 transferring context: 2B 0.0s done\n",
"#7 DONE 0.0s\n",
"\n",
- "#8 [app-account internal] load .dockerignore\n",
- "#8 transferring context: 2B 0.0s done\n",
+ "#8 [app-account 1/5] FROM docker.io/library/golang:latest@sha256:2bd56f00ff47baf33e64eae7996b65846c7cb5e0a46e0a882ef179fd89654afa\n",
"#8 DONE 0.0s\n",
"\n",
"#9 [app-gateway internal] load build context\n",
- "#9 transferring context: 299B 0.1s done\n",
- "#9 DONE 0.1s\n",
+ "#9 transferring context: 5.04kB 0.0s done\n",
+ "#9 DONE 0.0s\n",
"\n",
- "#10 [app-gateway 2/5] WORKDIR /workdir\n",
- "#10 CACHED\n",
+ "#10 [app-account internal] load build context\n",
+ "#10 transferring context: 5.06kB 0.0s done\n",
+ "#10 DONE 0.0s\n",
"\n",
- "#11 [app-gateway 3/5] COPY . .\n",
+ "#11 [app-account 2/5] WORKDIR /workdir\n",
"#11 CACHED\n",
"\n",
- "#12 [app-gateway 4/5] RUN go mod tidy\n",
- "#12 CACHED\n",
+ "#12 [app-product internal] load build context\n",
+ "#12 transferring context: 5.06kB 0.0s done\n",
+ "#12 DONE 0.0s\n",
"\n",
- "#13 [app-gateway 5/5] RUN go get ./...\n",
- "#13 CACHED\n",
+ "#13 [app-gateway 3/5] COPY . .\n",
+ "#13 DONE 0.0s\n",
"\n",
- "#14 [app-gateway] exporting to image\n",
- "#14 exporting layers done\n",
- "#14 writing image sha256:f4c5ffc1277bcf5eb84e30894a5868ccf4c4174312c7c29dd87f397afe597ead done\n",
- "#14 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
+ "#14 [app-account 3/5] COPY . .\n",
"#14 DONE 0.0s\n",
"\n",
- "#15 [app-product internal] load build context\n",
- "#15 transferring context: 335B 0.1s done\n",
- "#15 DONE 0.1s\n",
+ "#15 [app-product 3/5] COPY . .\n",
+ "#15 DONE 0.0s\n",
"\n",
- "#16 [app-account internal] load build context\n",
- "#16 transferring context: 335B 0.1s done\n",
- "#16 DONE 0.1s\n",
+ "#16 [app-account 4/5] RUN go mod tidy\n",
+ "#16 0.504 go: downloading github.com/stretchr/testify v1.9.0\n",
+ "#16 0.505 go: downloading github.com/gorilla/mux v1.8.1\n",
+ "#16 0.508 go: downloading github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7\n",
+ "#16 0.944 go: downloading github.com/muazhari/gomacro-custom v0.0.0-20240731093833-a6136ef7aaa6\n",
+ "#16 0.944 go: downloading github.com/google/uuid v1.6.0\n",
+ "#16 0.944 go: downloading github.com/valyala/fasthttp v1.55.0\n",
+ "#16 1.056 go: downloading gopkg.in/yaml.v3 v3.0.1\n",
+ "#16 1.056 go: downloading github.com/davecgh/go-spew v1.1.1\n",
+ "#16 1.056 go: downloading github.com/pmezard/go-difflib v1.0.0\n",
+ "#16 ...\n",
"\n",
"#17 [app-product 4/5] RUN go mod tidy\n",
- "#17 CACHED\n",
+ "#17 0.502 go: downloading github.com/stretchr/testify v1.9.0\n",
+ "#17 0.504 go: downloading github.com/gorilla/mux v1.8.1\n",
+ "#17 0.505 go: downloading github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7\n",
+ "#17 0.963 go: downloading gopkg.in/yaml.v3 v3.0.1\n",
+ "#17 0.963 go: downloading github.com/davecgh/go-spew v1.1.1\n",
+ "#17 0.964 go: downloading github.com/pmezard/go-difflib v1.0.0\n",
+ "#17 0.964 go: downloading github.com/google/uuid v1.6.0\n",
+ "#17 0.964 go: downloading github.com/valyala/fasthttp v1.55.0\n",
+ "#17 0.964 go: downloading github.com/muazhari/gomacro-custom v0.0.0-20240731093833-a6136ef7aaa6\n",
+ "#17 5.221 go: downloading github.com/klauspost/compress v1.17.9\n",
+ "#17 5.221 go: downloading github.com/andybalholm/brotli v1.1.0\n",
+ "#17 5.221 go: downloading github.com/valyala/bytebufferpool v1.0.0\n",
+ "#17 6.088 go: downloading gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405\n",
+ "#17 ...\n",
"\n",
- "#18 [app-product 3/5] COPY . .\n",
- "#18 CACHED\n",
+ "#16 [app-account 4/5] RUN go mod tidy\n",
+ "#16 8.155 go: downloading github.com/klauspost/compress v1.17.9\n",
+ "#16 8.155 go: downloading github.com/andybalholm/brotli v1.1.0\n",
+ "#16 8.155 go: downloading github.com/valyala/bytebufferpool v1.0.0\n",
+ "#16 8.900 go: downloading gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405\n",
+ "#16 ...\n",
+ "\n",
+ "#18 [app-gateway 4/5] RUN go mod tidy\n",
+ "#18 0.506 go: downloading github.com/gorilla/mux v1.8.1\n",
+ "#18 0.506 go: downloading github.com/muazhari/autocode-go v0.0.0-20240807125218-6ca4153954b7\n",
+ "#18 0.507 go: downloading github.com/stretchr/testify v1.9.0\n",
+ "#18 1.040 go: downloading github.com/valyala/fasthttp v1.55.0\n",
+ "#18 1.040 go: downloading github.com/muazhari/gomacro-custom v0.0.0-20240731093833-a6136ef7aaa6\n",
+ "#18 1.041 go: downloading github.com/google/uuid v1.6.0\n",
+ "#18 1.178 go: downloading github.com/davecgh/go-spew v1.1.1\n",
+ "#18 1.178 go: downloading gopkg.in/yaml.v3 v3.0.1\n",
+ "#18 1.178 go: downloading github.com/pmezard/go-difflib v1.0.0\n",
+ "#18 8.407 go: downloading github.com/andybalholm/brotli v1.1.0\n",
+ "#18 8.408 go: downloading github.com/klauspost/compress v1.17.9\n",
+ "#18 8.408 go: downloading github.com/valyala/bytebufferpool v1.0.0\n",
+ "#18 10.06 go: downloading gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405\n",
+ "#18 11.98 go: downloading golang.org/x/tools v0.14.0\n",
+ "#18 11.98 go: downloading github.com/peterh/liner v1.2.2\n",
+ "#18 11.98 go: downloading github.com/mattn/go-runewidth v0.0.15\n",
+ "#18 ...\n",
"\n",
- "#19 [app-account 3/5] COPY . .\n",
- "#19 CACHED\n",
+ "#17 [app-product 4/5] RUN go mod tidy\n",
+ "#17 13.31 go: downloading github.com/peterh/liner v1.2.2\n",
+ "#17 13.31 go: downloading golang.org/x/tools v0.14.0\n",
+ "#17 13.32 go: downloading github.com/mattn/go-runewidth v0.0.15\n",
+ "#17 13.40 go: downloading golang.org/x/sys v0.21.0\n",
+ "#17 13.44 go: downloading github.com/rivo/uniseg v0.2.0\n",
+ "#17 ...\n",
"\n",
- "#10 [app-account 2/5] WORKDIR /workdir\n",
- "#10 CACHED\n",
+ "#16 [app-account 4/5] RUN go mod tidy\n",
+ "#16 18.40 go: downloading golang.org/x/tools v0.14.0\n",
+ "#16 18.41 go: downloading github.com/peterh/liner v1.2.2\n",
+ "#16 18.41 go: downloading github.com/mattn/go-runewidth v0.0.15\n",
+ "#16 21.93 go: downloading golang.org/x/sys v0.21.0\n",
+ "#16 21.97 go: downloading github.com/rivo/uniseg v0.2.0\n",
+ "#16 ...\n",
+ "\n",
+ "#18 [app-gateway 4/5] RUN go mod tidy\n",
+ "#18 16.49 go: downloading golang.org/x/sys v0.21.0\n",
+ "#18 16.68 go: downloading github.com/rivo/uniseg v0.2.0\n",
+ "#18 ...\n",
"\n",
- "#20 [app-account 4/5] RUN go mod tidy\n",
- "#20 CACHED\n",
+ "#17 [app-product 4/5] RUN go mod tidy\n",
+ "#17 26.49 go: downloading golang.org/x/mod v0.13.0\n",
+ "#17 26.49 go: downloading golang.org/x/sync v0.4.0\n",
+ "#17 ...\n",
"\n",
- "#21 [app-account 5/5] RUN go get ./...\n",
- "#21 CACHED\n",
+ "#16 [app-account 4/5] RUN go mod tidy\n",
+ "#16 32.03 go: downloading golang.org/x/mod v0.13.0\n",
+ "#16 32.03 go: downloading golang.org/x/sync v0.4.0\n",
+ "#16 ...\n",
"\n",
- "#22 [app-product 5/5] RUN go get ./...\n",
- "#22 CACHED\n",
+ "#18 [app-gateway 4/5] RUN go mod tidy\n",
+ "#18 32.68 go: downloading golang.org/x/mod v0.13.0\n",
+ "#18 32.68 go: downloading golang.org/x/sync v0.4.0\n",
+ "#18 ...\n",
"\n",
- "#23 [app-account] exporting to image\n",
- "#23 exporting layers done\n",
- "#23 writing image sha256:3d6da7ef3da4053ba142861579056b3e30722d89a5588e95af465385db95d517 done\n",
- "#23 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
- "#23 DONE 0.0s\n",
+ "#17 [app-product 4/5] RUN go mod tidy\n",
+ "#17 DONE 60.9s\n",
+ "\n",
+ "#19 [app-product 5/5] RUN go get ./...\n",
+ "#19 DONE 1.4s\n",
+ "\n",
+ "#18 [app-gateway 4/5] RUN go mod tidy\n",
+ "#18 ...\n",
+ "\n",
+ "#20 [app-product] exporting to image\n",
+ "#20 exporting layers\n",
+ "#20 exporting layers 0.4s done\n",
+ "#20 writing image sha256:4482d7e68dc4e3ff889e1dc560a814e47dda3ac7c10805bbdb815c92f9f3f9ef done\n",
+ "#20 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
+ "#20 DONE 0.4s\n",
+ "\n",
+ "#21 [app-product] resolving provenance for metadata file\n",
+ "#21 DONE 0.0s\n",
+ "\n",
+ "#18 [app-gateway 4/5] RUN go mod tidy\n",
+ "#18 DONE 63.8s\n",
+ "\n",
+ "#16 [app-account 4/5] RUN go mod tidy\n",
+ "#16 ...\n",
+ "\n",
+ "#22 [app-gateway 5/5] RUN go get ./...\n",
+ "#22 DONE 0.8s\n",
+ "\n",
+ "#16 [app-account 4/5] RUN go mod tidy\n",
+ "#16 ...\n",
+ "\n",
+ "#23 [app-gateway] exporting to image\n",
+ "#23 exporting layers 0.4s done\n",
+ "#23 writing image sha256:bb4698dc73e6f0b18e2432d43a1aeee80fbb262702c2fdaa45c6e5923c3c431a done\n",
+ "#23 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
+ "#23 DONE 0.4s\n",
"\n",
"#24 [app-gateway] resolving provenance for metadata file\n",
"#24 DONE 0.0s\n",
"\n",
- "#25 [app-product] exporting to image\n",
- "#25 exporting layers done\n",
- "#25 writing image sha256:e0224c219203055a3da7518d4bf76dd5d481ea680119f438776f4d0a94aa8b22 done\n",
- "#25 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
- "#25 DONE 0.0s\n",
+ "#16 [app-account 4/5] RUN go mod tidy\n",
+ "#16 DONE 65.5s\n",
"\n",
- "#26 [app-product] resolving provenance for metadata file\n",
- "#26 DONE 0.0s\n",
+ "#25 [app-account 5/5] RUN go get ./...\n",
+ "#25 DONE 0.6s\n",
+ "\n",
+ "#26 [app-account] exporting to image\n",
+ "#26 exporting layers 0.3s done\n",
+ "#26 writing image sha256:9431857543db398269e173d840e28a9f0ac3a665cba76798340965e0bb336987 done\n",
+ "#26 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
+ "#26 DONE 0.3s\n",
"\n",
"#27 [app-account] resolving provenance for metadata file\n",
"#27 DONE 0.0s\n"
@@ -196,15 +267,20 @@
"name": "stderr",
"output_type": "stream",
"text": [
+ " Network autocode-worker-0_default Creating\n",
+ " Network autocode-worker-0_default Created\n",
+ " Container autocode-worker-0-app-account-1 Creating\n",
+ " Container autocode-worker-0-app-gateway-1 Creating\n",
+ " Container autocode-worker-0-app-product-1 Creating\n",
+ " Container autocode-worker-0-app-account-1 Created\n",
" Container autocode-worker-0-app-product-1 Created\n",
" Container autocode-worker-0-app-gateway-1 Created\n",
- " Container autocode-worker-0-app-account-1 Created\n",
" Container autocode-worker-0-app-product-1 Starting\n",
" Container autocode-worker-0-app-gateway-1 Starting\n",
" Container autocode-worker-0-app-account-1 Starting\n",
+ " Container autocode-worker-0-app-product-1 Started\n",
" Container autocode-worker-0-app-account-1 Started\n",
- " Container autocode-worker-0-app-gateway-1 Started\n",
- " Container autocode-worker-0-app-product-1 Started\n"
+ " Container autocode-worker-0-app-gateway-1 Started\n"
]
},
{
@@ -213,11 +289,11 @@
"text": [
"#0 building with \"default\" instance using docker driver\n",
"\n",
- "#1 [app-product internal] load build definition from .Dockerfile\n",
+ "#1 [app-gateway internal] load build definition from .Dockerfile\n",
"#1 transferring dockerfile: 119B 0.0s done\n",
"#1 DONE 0.0s\n",
"\n",
- "#2 [app-gateway internal] load build definition from .Dockerfile\n",
+ "#2 [app-product internal] load build definition from .Dockerfile\n",
"#2 transferring dockerfile: 119B 0.0s done\n",
"#2 DONE 0.0s\n",
"\n",
@@ -226,20 +302,20 @@
"#3 DONE 0.0s\n",
"\n",
"#4 [app-account internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 0.3s\n",
+ "#4 DONE 1.2s\n",
"\n",
"#5 [app-product internal] load .dockerignore\n",
"#5 transferring context: 2B 0.0s done\n",
"#5 DONE 0.0s\n",
"\n",
- "#6 [app-account 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
+ "#6 [app-gateway 1/5] FROM docker.io/library/golang:latest@sha256:2bd56f00ff47baf33e64eae7996b65846c7cb5e0a46e0a882ef179fd89654afa\n",
"#6 DONE 0.0s\n",
"\n",
- "#7 [app-gateway internal] load .dockerignore\n",
+ "#7 [app-account internal] load .dockerignore\n",
"#7 transferring context: 2B 0.0s done\n",
"#7 DONE 0.0s\n",
"\n",
- "#8 [app-account internal] load .dockerignore\n",
+ "#8 [app-gateway internal] load .dockerignore\n",
"#8 transferring context: 2B 0.0s done\n",
"#8 DONE 0.0s\n",
"\n",
@@ -270,43 +346,43 @@
"#16 [app-product 3/5] COPY . .\n",
"#16 CACHED\n",
"\n",
- "#17 [app-account 3/5] COPY . .\n",
+ "#17 [app-product 5/5] RUN go get ./...\n",
"#17 CACHED\n",
"\n",
"#18 [app-account 4/5] RUN go mod tidy\n",
"#18 CACHED\n",
"\n",
- "#19 [app-account 2/5] WORKDIR /workdir\n",
+ "#19 [app-product 2/5] WORKDIR /workdir\n",
"#19 CACHED\n",
"\n",
- "#20 [app-account 5/5] RUN go get ./...\n",
+ "#20 [app-account 3/5] COPY . .\n",
"#20 CACHED\n",
"\n",
- "#21 [app-product 5/5] RUN go get ./...\n",
+ "#21 [app-account 5/5] RUN go get ./...\n",
"#21 CACHED\n",
"\n",
"#22 [app-gateway] exporting to image\n",
"#22 exporting layers done\n",
- "#22 writing image sha256:ce10a1271da49aeb4e4cd49ec115acb9dba0e6ccc7cdb3a8fd8cb41a6e1d167d done\n",
+ "#22 writing image sha256:cd7ab7f9a7b66c181619a268695088e957b29b3dbb3bd774f04f5df304e73a40 done\n",
"#22 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
"#22 DONE 0.0s\n",
"\n",
"#23 [app-product] exporting to image\n",
"#23 exporting layers done\n",
- "#23 writing image sha256:870ab11aebc06e828ed10f354042773c80bf6254a1368477d7a183cc22b394da done\n",
+ "#23 writing image sha256:611728c1bf6d24cab8c134510c040f79c639a9049846dab0f7a8e63678272004 done\n",
"#23 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
"#23 DONE 0.0s\n",
"\n",
"#24 [app-account] exporting to image\n",
"#24 exporting layers done\n",
- "#24 writing image sha256:b7b6adc410287cb2036bb20c80e1fe9ab7b57b1d006636e890fa0bf1c90c2bc0 done\n",
+ "#24 writing image sha256:b54cbf0aed71707492fe18d7afd50f640d672ae5302f544dab982e66d0fc84cf done\n",
"#24 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
"#24 DONE 0.0s\n",
"\n",
- "#25 [app-gateway] resolving provenance for metadata file\n",
+ "#25 [app-product] resolving provenance for metadata file\n",
"#25 DONE 0.0s\n",
"\n",
- "#26 [app-product] resolving provenance for metadata file\n",
+ "#26 [app-gateway] resolving provenance for metadata file\n",
"#26 DONE 0.0s\n",
"\n",
"#27 [app-account] resolving provenance for metadata file\n",
@@ -317,1285 +393,30 @@
"name": "stderr",
"output_type": "stream",
"text": [
+ " Network autocode-worker-1_default Creating\n",
+ " Network autocode-worker-1_default Created\n",
+ " Container autocode-worker-1-app-account-1 Creating\n",
+ " Container autocode-worker-1-app-product-1 Creating\n",
+ " Container autocode-worker-1-app-gateway-1 Creating\n",
+ " Container autocode-worker-1-app-gateway-1 Created\n",
" Container autocode-worker-1-app-account-1 Created\n",
" Container autocode-worker-1-app-product-1 Created\n",
- " Container autocode-worker-1-app-gateway-1 Created\n",
- " Container autocode-worker-1-app-account-1 Starting\n",
" Container autocode-worker-1-app-product-1 Starting\n",
" Container autocode-worker-1-app-gateway-1 Starting\n",
+ " Container autocode-worker-1-app-account-1 Starting\n",
+ " Container autocode-worker-1-app-gateway-1 Started\n",
" Container autocode-worker-1-app-product-1 Started\n",
- " Container autocode-worker-1-app-account-1 Started\n",
- " Container autocode-worker-1-app-gateway-1 Started\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "#0 building with \"default\" instance using docker driver\n",
- "\n",
- "#1 [app-gateway internal] load build definition from .Dockerfile\n",
- "#1 transferring dockerfile: 119B 0.0s done\n",
- "#1 DONE 0.0s\n",
- "\n",
- "#2 [app-product internal] load build definition from .Dockerfile\n",
- "#2 transferring dockerfile: 119B 0.0s done\n",
- "#2 DONE 0.0s\n",
- "\n",
- "#3 [app-account internal] load build definition from .Dockerfile\n",
- "#3 transferring dockerfile: 119B 0.0s done\n",
- "#3 DONE 0.0s\n",
- "\n",
- "#4 [app-account internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 0.4s\n",
- "\n",
- "#5 [app-gateway internal] load .dockerignore\n",
- "#5 transferring context: 2B 0.0s done\n",
- "#5 DONE 0.0s\n",
- "\n",
- "#6 [app-account internal] load .dockerignore\n",
- "#6 transferring context: 2B 0.0s done\n",
- "#6 DONE 0.0s\n",
- "\n",
- "#7 [app-account 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
- "#7 DONE 0.0s\n",
- "\n",
- "#8 [app-product internal] load .dockerignore\n",
- "#8 transferring context: 2B 0.0s done\n",
- "#8 DONE 0.0s\n",
- "\n",
- "#9 [app-gateway internal] load build context\n",
- "#9 transferring context: 299B 0.0s done\n",
- "#9 DONE 0.0s\n",
- "\n",
- "#10 [app-product internal] load build context\n",
- "#10 transferring context: 335B 0.0s done\n",
- "#10 DONE 0.0s\n",
- "\n",
- "#11 [app-account internal] load build context\n",
- "#11 transferring context: 335B 0.0s done\n",
- "#11 DONE 0.0s\n",
- "\n",
- "#12 [app-gateway 3/5] COPY . .\n",
- "#12 CACHED\n",
- "\n",
- "#13 [app-gateway 4/5] RUN go mod tidy\n",
- "#13 CACHED\n",
- "\n",
- "#14 [app-gateway 5/5] RUN go get ./...\n",
- "#14 CACHED\n",
- "\n",
- "#15 [app-product 3/5] COPY . .\n",
- "#15 CACHED\n",
- "\n",
- "#16 [app-product 4/5] RUN go mod tidy\n",
- "#16 CACHED\n",
- "\n",
- "#17 [app-product 5/5] RUN go get ./...\n",
- "#17 CACHED\n",
- "\n",
- "#18 [app-account 3/5] COPY . .\n",
- "#18 CACHED\n",
- "\n",
- "#19 [app-account 4/5] RUN go mod tidy\n",
- "#19 CACHED\n",
- "\n",
- "#20 [app-account 2/5] WORKDIR /workdir\n",
- "#20 CACHED\n",
- "\n",
- "#21 [app-account 5/5] RUN go get ./...\n",
- "#21 CACHED\n",
- "\n",
- "#22 [app-account] exporting to image\n",
- "#22 exporting layers done\n",
- "#22 writing image sha256:f544d1aa5f2121ade34cc9032f990cb347456f0e806e1370e39ad240d0b72b15 done\n",
- "#22 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
- "#22 DONE 0.0s\n",
- "\n",
- "#23 [app-gateway] exporting to image\n",
- "#23 exporting layers done\n",
- "#23 writing image sha256:7d966022f6400734973f64917b088f296d6a45547a2435cb4500f6699d7ebe6f done\n",
- "#23 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
- "#23 DONE 0.0s\n",
- "\n",
- "#24 [app-product] exporting to image\n",
- "#24 exporting layers done\n",
- "#24 writing image sha256:329659d3c3d9e004e2a82cdcfb7c8f1cb0fbe8ca43bb68923d5d584304e5a6ab done\n",
- "#24 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
- "#24 DONE 0.0s\n",
- "\n",
- "#25 [app-account] resolving provenance for metadata file\n",
- "#25 DONE 0.0s\n",
- "\n",
- "#26 [app-gateway] resolving provenance for metadata file\n",
- "#26 DONE 0.0s\n",
- "\n",
- "#27 [app-product] resolving provenance for metadata file\n",
- "#27 DONE 0.0s\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " Network autocode-worker-2_default Creating\n",
- " Network autocode-worker-2_default Created\n",
- " Container autocode-worker-2-app-product-1 Creating\n",
- " Container autocode-worker-2-app-account-1 Creating\n",
- " Container autocode-worker-2-app-gateway-1 Creating\n",
- " Container autocode-worker-2-app-gateway-1 Created\n",
- " Container autocode-worker-2-app-product-1 Created\n",
- " Container autocode-worker-2-app-account-1 Created\n",
- " Container autocode-worker-2-app-product-1 Starting\n",
- " Container autocode-worker-2-app-gateway-1 Starting\n",
- " Container autocode-worker-2-app-account-1 Starting\n",
- " Container autocode-worker-2-app-product-1 Started\n",
- " Container autocode-worker-2-app-gateway-1 Started\n",
- " Container autocode-worker-2-app-account-1 Started\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "#0 building with \"default\" instance using docker driver\n",
- "\n",
- "#1 [app-account internal] load build definition from .Dockerfile\n",
- "#1 transferring dockerfile: 119B 0.0s done\n",
- "#1 DONE 0.0s\n",
- "\n",
- "#2 [app-product internal] load build definition from .Dockerfile\n",
- "#2 transferring dockerfile: 119B 0.0s done\n",
- "#2 DONE 0.0s\n",
- "\n",
- "#3 [app-gateway internal] load build definition from .Dockerfile\n",
- "#3 transferring dockerfile: 119B 0.0s done\n",
- "#3 DONE 0.0s\n",
- "\n",
- "#4 [app-gateway internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 1.2s\n",
- "\n",
- "#5 [app-account internal] load .dockerignore\n",
- "#5 transferring context: 2B 0.0s done\n",
- "#5 DONE 0.0s\n",
- "\n",
- "#6 [app-gateway internal] load .dockerignore\n",
- "#6 transferring context: 2B 0.0s done\n",
- "#6 DONE 0.0s\n",
- "\n",
- "#7 [app-gateway 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
- "#7 DONE 0.0s\n",
- "\n",
- "#8 [app-product internal] load .dockerignore\n",
- "#8 transferring context: 2B 0.0s done\n",
- "#8 DONE 0.0s\n",
- "\n",
- "#9 [app-gateway internal] load build context\n",
- "#9 transferring context: 299B 0.0s done\n",
- "#9 DONE 0.0s\n",
- "\n",
- "#10 [app-account internal] load build context\n",
- "#10 transferring context: 335B 0.0s done\n",
- "#10 DONE 0.0s\n",
- "\n",
- "#11 [app-product internal] load build context\n",
- "#11 transferring context: 335B 0.0s done\n",
- "#11 DONE 0.0s\n",
- "\n",
- "#12 [app-account 3/5] COPY . .\n",
- "#12 CACHED\n",
- "\n",
- "#13 [app-account 4/5] RUN go mod tidy\n",
- "#13 CACHED\n",
- "\n",
- "#14 [app-account 5/5] RUN go get ./...\n",
- "#14 CACHED\n",
- "\n",
- "#15 [app-product 3/5] COPY . .\n",
- "#15 CACHED\n",
- "\n",
- "#16 [app-product 4/5] RUN go mod tidy\n",
- "#16 CACHED\n",
- "\n",
- "#17 [app-product 5/5] RUN go get ./...\n",
- "#17 CACHED\n",
- "\n",
- "#18 [app-gateway 3/5] COPY . .\n",
- "#18 CACHED\n",
- "\n",
- "#19 [app-gateway 4/5] RUN go mod tidy\n",
- "#19 CACHED\n",
- "\n",
- "#20 [app-account 2/5] WORKDIR /workdir\n",
- "#20 CACHED\n",
- "\n",
- "#21 [app-gateway 5/5] RUN go get ./...\n",
- "#21 CACHED\n",
- "\n",
- "#22 [app-product] exporting to image\n",
- "#22 exporting layers done\n",
- "#22 writing image sha256:fc79ef83d63925a832fc4f261f8866f8b7a73e2314f10f56b7cde014ceaac26a done\n",
- "#22 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
- "#22 DONE 0.0s\n",
- "\n",
- "#23 [app-account] exporting to image\n",
- "#23 exporting layers done\n",
- "#23 writing image sha256:c369728f7df20cf92b1bba83fac37baf574c719b50265a7e4c2e01853ed6530b done\n",
- "#23 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
- "#23 DONE 0.0s\n",
- "\n",
- "#24 [app-gateway] exporting to image\n",
- "#24 exporting layers done\n",
- "#24 writing image sha256:c96181e48bccd0ac6d614deead562e0a2b62d29c55e115e3f435d129c0f67af7 done\n",
- "#24 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
- "#24 DONE 0.0s\n",
- "\n",
- "#25 [app-account] resolving provenance for metadata file\n",
- "#25 DONE 0.0s\n",
- "\n",
- "#26 [app-product] resolving provenance for metadata file\n",
- "#26 DONE 0.0s\n",
- "\n",
- "#27 [app-gateway] resolving provenance for metadata file\n",
- "#27 DONE 0.0s\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " Network autocode-worker-3_default Creating\n",
- " Network autocode-worker-3_default Created\n",
- " Container autocode-worker-3-app-gateway-1 Creating\n",
- " Container autocode-worker-3-app-account-1 Creating\n",
- " Container autocode-worker-3-app-product-1 Creating\n",
- " Container autocode-worker-3-app-product-1 Created\n",
- " Container autocode-worker-3-app-account-1 Created\n",
- " Container autocode-worker-3-app-gateway-1 Created\n",
- " Container autocode-worker-3-app-account-1 Starting\n",
- " Container autocode-worker-3-app-product-1 Starting\n",
- " Container autocode-worker-3-app-gateway-1 Starting\n",
- " Container autocode-worker-3-app-gateway-1 Started\n",
- " Container autocode-worker-3-app-product-1 Started\n",
- " Container autocode-worker-3-app-account-1 Started\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "#0 building with \"default\" instance using docker driver\n",
- "\n",
- "#1 [app-account internal] load build definition from .Dockerfile\n",
- "#1 transferring dockerfile: 119B 0.0s done\n",
- "#1 DONE 0.0s\n",
- "\n",
- "#2 [app-gateway internal] load build definition from .Dockerfile\n",
- "#2 transferring dockerfile: 119B 0.0s done\n",
- "#2 DONE 0.0s\n",
- "\n",
- "#3 [app-product internal] load build definition from .Dockerfile\n",
- "#3 transferring dockerfile: 119B 0.0s done\n",
- "#3 DONE 0.0s\n",
- "\n",
- "#4 [app-product internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 0.4s\n",
- "\n",
- "#5 [app-account internal] load .dockerignore\n",
- "#5 transferring context: 2B 0.0s done\n",
- "#5 DONE 0.0s\n",
- "\n",
- "#6 [app-gateway internal] load .dockerignore\n",
- "#6 transferring context: 2B 0.0s done\n",
- "#6 DONE 0.0s\n",
- "\n",
- "#7 [app-gateway 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
- "#7 DONE 0.0s\n",
- "\n",
- "#8 [app-product internal] load .dockerignore\n",
- "#8 transferring context: 2B 0.0s done\n",
- "#8 DONE 0.0s\n",
- "\n",
- "#9 [app-gateway internal] load build context\n",
- "#9 transferring context: 299B 0.0s done\n",
- "#9 DONE 0.0s\n",
- "\n",
- "#10 [app-account internal] load build context\n",
- "#10 transferring context: 335B 0.0s done\n",
- "#10 DONE 0.0s\n",
- "\n",
- "#11 [app-product internal] load build context\n",
- "#11 transferring context: 335B 0.0s done\n",
- "#11 DONE 0.0s\n",
- "\n",
- "#12 [app-gateway 4/5] RUN go mod tidy\n",
- "#12 CACHED\n",
- "\n",
- "#13 [app-gateway 3/5] COPY . .\n",
- "#13 CACHED\n",
- "\n",
- "#14 [app-gateway 5/5] RUN go get ./...\n",
- "#14 CACHED\n",
- "\n",
- "#15 [app-account 4/5] RUN go mod tidy\n",
- "#15 CACHED\n",
- "\n",
- "#16 [app-account 3/5] COPY . .\n",
- "#16 CACHED\n",
- "\n",
- "#17 [app-account 5/5] RUN go get ./...\n",
- "#17 CACHED\n",
- "\n",
- "#18 [app-product 4/5] RUN go mod tidy\n",
- "#18 CACHED\n",
- "\n",
- "#19 [app-account 2/5] WORKDIR /workdir\n",
- "#19 CACHED\n",
- "\n",
- "#20 [app-product 3/5] COPY . .\n",
- "#20 CACHED\n",
- "\n",
- "#21 [app-product 5/5] RUN go get ./...\n",
- "#21 CACHED\n",
- "\n",
- "#22 [app-gateway] exporting to image\n",
- "#22 exporting layers done\n",
- "#22 writing image sha256:fd4db656bd20d2aef2871788a3840cfc92dd1943ac6c4dbd3518230373c97407 done\n",
- "#22 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
- "#22 DONE 0.0s\n",
- "\n",
- "#23 [app-product] exporting to image\n",
- "#23 exporting layers done\n",
- "#23 writing image sha256:45e68bf28ef3689fa8e676e179945b0ab3cdda5a0fe9a2cfb2bc334d41afab8d done\n",
- "#23 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
- "#23 DONE 0.0s\n",
- "\n",
- "#24 [app-account] exporting to image\n",
- "#24 exporting layers done\n",
- "#24 writing image sha256:48860552161807a41d35cf9a90d3eb1f27b906d0436c9d5ff1cd4bc54dfdecea done\n",
- "#24 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
- "#24 DONE 0.0s\n",
- "\n",
- "#25 [app-gateway] resolving provenance for metadata file\n",
- "#25 DONE 0.0s\n",
- "\n",
- "#26 [app-product] resolving provenance for metadata file\n",
- "#26 DONE 0.0s\n",
- "\n",
- "#27 [app-account] resolving provenance for metadata file\n",
- "#27 DONE 0.0s\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " Network autocode-worker-4_default Creating\n",
- " Network autocode-worker-4_default Created\n",
- " Container autocode-worker-4-app-account-1 Creating\n",
- " Container autocode-worker-4-app-product-1 Creating\n",
- " Container autocode-worker-4-app-gateway-1 Creating\n",
- " Container autocode-worker-4-app-product-1 Created\n",
- " Container autocode-worker-4-app-account-1 Created\n",
- " Container autocode-worker-4-app-gateway-1 Created\n",
- " Container autocode-worker-4-app-gateway-1 Starting\n",
- " Container autocode-worker-4-app-account-1 Starting\n",
- " Container autocode-worker-4-app-product-1 Starting\n",
- " Container autocode-worker-4-app-gateway-1 Started\n",
- " Container autocode-worker-4-app-account-1 Started\n",
- " Container autocode-worker-4-app-product-1 Started\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "#0 building with \"default\" instance using docker driver\n",
- "\n",
- "#1 [app-gateway internal] load build definition from .Dockerfile\n",
- "#1 transferring dockerfile: 119B 0.0s done\n",
- "#1 DONE 0.0s\n",
- "\n",
- "#2 [app-product internal] load build definition from .Dockerfile\n",
- "#2 transferring dockerfile: 119B 0.0s done\n",
- "#2 DONE 0.0s\n",
- "\n",
- "#3 [app-account internal] load build definition from .Dockerfile\n",
- "#3 transferring dockerfile: 119B 0.0s done\n",
- "#3 DONE 0.0s\n",
- "\n",
- "#4 [app-account internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 0.5s\n",
- "\n",
- "#5 [app-gateway internal] load .dockerignore\n",
- "#5 transferring context: 2B 0.0s done\n",
- "#5 DONE 0.0s\n",
- "\n",
- "#6 [app-account internal] load .dockerignore\n",
- "#6 transferring context: 2B 0.0s done\n",
- "#6 DONE 0.0s\n",
- "\n",
- "#7 [app-product 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
- "#7 DONE 0.0s\n",
- "\n",
- "#8 [app-product internal] load .dockerignore\n",
- "#8 transferring context: 2B 0.0s done\n",
- "#8 DONE 0.0s\n",
- "\n",
- "#9 [app-gateway internal] load build context\n",
- "#9 transferring context: 299B 0.0s done\n",
- "#9 DONE 0.0s\n",
- "\n",
- "#10 [app-account internal] load build context\n",
- "#10 transferring context: 335B 0.0s done\n",
- "#10 DONE 0.0s\n",
- "\n",
- "#11 [app-gateway 3/5] COPY . .\n",
- "#11 CACHED\n",
- "\n",
- "#12 [app-gateway 4/5] RUN go mod tidy\n",
- "#12 CACHED\n",
- "\n",
- "#13 [app-product internal] load build context\n",
- "#13 transferring context: 335B 0.0s done\n",
- "#13 DONE 0.0s\n",
- "\n",
- "#14 [app-gateway 5/5] RUN go get ./...\n",
- "#14 CACHED\n",
- "\n",
- "#15 [app-account 4/5] RUN go mod tidy\n",
- "#15 CACHED\n",
- "\n",
- "#16 [app-account 3/5] COPY . .\n",
- "#16 CACHED\n",
- "\n",
- "#17 [app-account 5/5] RUN go get ./...\n",
- "#17 CACHED\n",
- "\n",
- "#18 [app-product 3/5] COPY . .\n",
- "#18 CACHED\n",
- "\n",
- "#19 [app-product 4/5] RUN go mod tidy\n",
- "#19 CACHED\n",
- "\n",
- "#20 [app-product 2/5] WORKDIR /workdir\n",
- "#20 CACHED\n",
- "\n",
- "#21 [app-product 5/5] RUN go get ./...\n",
- "#21 CACHED\n",
- "\n",
- "#22 [app-account] exporting to image\n",
- "#22 exporting layers done\n",
- "#22 writing image sha256:dad2eedaf241be32b71d88f9021330ccbd4c7a2c588c2df9c1e019edd2c96fa8 done\n",
- "#22 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
- "#22 DONE 0.0s\n",
- "\n",
- "#23 [app-gateway] exporting to image\n",
- "#23 exporting layers done\n",
- "#23 writing image sha256:279f9ff249d3db55e4259d98768f8221a03bf811d05ea285136b01d1c0e3c26f done\n",
- "#23 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
- "#23 DONE 0.0s\n",
- "\n",
- "#24 [app-product] exporting to image\n",
- "#24 exporting layers done\n",
- "#24 writing image sha256:b58eb6aa2ef18032c31f7b6a2f1bc19d617a2b66ed8b884575c2cc12dd85c57e done\n",
- "#24 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
- "#24 DONE 0.0s\n",
- "\n",
- "#25 [app-gateway] resolving provenance for metadata file\n",
- "#25 DONE 0.0s\n",
- "\n",
- "#26 [app-account] resolving provenance for metadata file\n",
- "#26 DONE 0.0s\n",
- "\n",
- "#27 [app-product] resolving provenance for metadata file\n",
- "#27 DONE 0.0s\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " Network autocode-worker-5_default Creating\n",
- " Network autocode-worker-5_default Created\n",
- " Container autocode-worker-5-app-gateway-1 Creating\n",
- " Container autocode-worker-5-app-product-1 Creating\n",
- " Container autocode-worker-5-app-account-1 Creating\n",
- " Container autocode-worker-5-app-gateway-1 Created\n",
- " Container autocode-worker-5-app-product-1 Created\n",
- " Container autocode-worker-5-app-account-1 Created\n",
- " Container autocode-worker-5-app-account-1 Starting\n",
- " Container autocode-worker-5-app-product-1 Starting\n",
- " Container autocode-worker-5-app-gateway-1 Starting\n",
- " Container autocode-worker-5-app-gateway-1 Started\n",
- " Container autocode-worker-5-app-account-1 Started\n",
- " Container autocode-worker-5-app-product-1 Started\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "#0 building with \"default\" instance using docker driver\n",
- "\n",
- "#1 [app-gateway internal] load build definition from .Dockerfile\n",
- "#1 transferring dockerfile: 119B 0.0s done\n",
- "#1 DONE 0.0s\n",
- "\n",
- "#2 [app-account internal] load build definition from .Dockerfile\n",
- "#2 transferring dockerfile: 119B 0.0s done\n",
- "#2 DONE 0.0s\n",
- "\n",
- "#3 [app-product internal] load build definition from .Dockerfile\n",
- "#3 transferring dockerfile: 119B 0.0s done\n",
- "#3 DONE 0.0s\n",
- "\n",
- "#4 [app-product internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 0.5s\n",
- "\n",
- "#5 [app-gateway internal] load .dockerignore\n",
- "#5 transferring context: 2B 0.0s done\n",
- "#5 DONE 0.0s\n",
- "\n",
- "#6 [app-product internal] load .dockerignore\n",
- "#6 transferring context: 2B 0.0s done\n",
- "#6 DONE 0.0s\n",
- "\n",
- "#7 [app-account 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
- "#7 DONE 0.0s\n",
- "\n",
- "#8 [app-account internal] load .dockerignore\n",
- "#8 transferring context: 2B 0.0s done\n",
- "#8 DONE 0.0s\n",
- "\n",
- "#9 [app-gateway internal] load build context\n",
- "#9 transferring context: 299B 0.0s done\n",
- "#9 DONE 0.0s\n",
- "\n",
- "#10 [app-product internal] load build context\n",
- "#10 transferring context: 335B 0.0s done\n",
- "#10 DONE 0.0s\n",
- "\n",
- "#11 [app-account internal] load build context\n",
- "#11 transferring context: 335B 0.0s done\n",
- "#11 DONE 0.0s\n",
- "\n",
- "#12 [app-gateway 3/5] COPY . .\n",
- "#12 CACHED\n",
- "\n",
- "#13 [app-gateway 4/5] RUN go mod tidy\n",
- "#13 CACHED\n",
- "\n",
- "#14 [app-gateway 5/5] RUN go get ./...\n",
- "#14 CACHED\n",
- "\n",
- "#15 [app-account 4/5] RUN go mod tidy\n",
- "#15 CACHED\n",
- "\n",
- "#16 [app-account 3/5] COPY . .\n",
- "#16 CACHED\n",
- "\n",
- "#17 [app-account 5/5] RUN go get ./...\n",
- "#17 CACHED\n",
- "\n",
- "#18 [app-product 3/5] COPY . .\n",
- "#18 CACHED\n",
- "\n",
- "#19 [app-product 2/5] WORKDIR /workdir\n",
- "#19 CACHED\n",
- "\n",
- "#20 [app-product 4/5] RUN go mod tidy\n",
- "#20 CACHED\n",
- "\n",
- "#21 [app-product 5/5] RUN go get ./...\n",
- "#21 CACHED\n",
- "\n",
- "#22 [app-account] exporting to image\n",
- "#22 exporting layers done\n",
- "#22 writing image sha256:1c3507453ac47261f58b5c19372e53f8f46bbf073f661fb74999825d77d43118 done\n",
- "#22 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
- "#22 DONE 0.0s\n",
- "\n",
- "#23 [app-gateway] exporting to image\n",
- "#23 exporting layers done\n",
- "#23 writing image sha256:424525b36e1b07eaf6120721a8226e494ec83dba5a8d29c17df68f6be690f45a done\n",
- "#23 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
- "#23 DONE 0.0s\n",
- "\n",
- "#24 [app-product] exporting to image\n",
- "#24 exporting layers done\n",
- "#24 writing image sha256:af4b87d0554226662519e5733e196dca667e0beffa07f0f87d9cc90d01f031f6 done\n",
- "#24 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
- "#24 DONE 0.0s\n",
- "\n",
- "#25 [app-account] resolving provenance for metadata file\n",
- "#25 DONE 0.0s\n",
- "\n",
- "#26 [app-gateway] resolving provenance for metadata file\n",
- "#26 DONE 0.0s\n",
- "\n",
- "#27 [app-product] resolving provenance for metadata file\n",
- "#27 DONE 0.0s\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " Network autocode-worker-6_default Creating\n",
- " Network autocode-worker-6_default Created\n",
- " Container autocode-worker-6-app-account-1 Creating\n",
- " Container autocode-worker-6-app-product-1 Creating\n",
- " Container autocode-worker-6-app-gateway-1 Creating\n",
- " Container autocode-worker-6-app-account-1 Created\n",
- " Container autocode-worker-6-app-product-1 Created\n",
- " Container autocode-worker-6-app-gateway-1 Created\n",
- " Container autocode-worker-6-app-product-1 Starting\n",
- " Container autocode-worker-6-app-gateway-1 Starting\n",
- " Container autocode-worker-6-app-account-1 Starting\n",
- " Container autocode-worker-6-app-account-1 Started\n",
- " Container autocode-worker-6-app-product-1 Started\n",
- " Container autocode-worker-6-app-gateway-1 Started\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "#0 building with \"default\" instance using docker driver\n",
- "\n",
- "#1 [app-gateway internal] load build definition from .Dockerfile\n",
- "#1 transferring dockerfile: 119B 0.0s done\n",
- "#1 DONE 0.0s\n",
- "\n",
- "#2 [app-account internal] load build definition from .Dockerfile\n",
- "#2 transferring dockerfile: 119B 0.0s done\n",
- "#2 DONE 0.0s\n",
- "\n",
- "#3 [app-product internal] load build definition from .Dockerfile\n",
- "#3 transferring dockerfile: 119B 0.0s done\n",
- "#3 DONE 0.0s\n",
- "\n",
- "#4 [app-product internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 0.5s\n",
- "\n",
- "#5 [app-account internal] load .dockerignore\n",
- "#5 transferring context: 2B 0.0s done\n",
- "#5 DONE 0.0s\n",
- "\n",
- "#6 [app-gateway 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
- "#6 DONE 0.0s\n",
- "\n",
- "#7 [app-product internal] load .dockerignore\n",
- "#7 transferring context: 2B 0.0s done\n",
- "#7 DONE 0.0s\n",
- "\n",
- "#8 [app-gateway internal] load .dockerignore\n",
- "#8 transferring context: 2B 0.0s done\n",
- "#8 DONE 0.0s\n",
- "\n",
- "#9 [app-gateway internal] load build context\n",
- "#9 transferring context: 299B 0.0s done\n",
- "#9 DONE 0.0s\n",
- "\n",
- "#10 [app-account internal] load build context\n",
- "#10 transferring context: 335B 0.0s done\n",
- "#10 DONE 0.0s\n",
- "\n",
- "#11 [app-product internal] load build context\n",
- "#11 transferring context: 335B 0.0s done\n",
- "#11 DONE 0.0s\n",
- "\n",
- "#12 [app-gateway 3/5] COPY . .\n",
- "#12 CACHED\n",
- "\n",
- "#13 [app-gateway 4/5] RUN go mod tidy\n",
- "#13 CACHED\n",
- "\n",
- "#14 [app-gateway 5/5] RUN go get ./...\n",
- "#14 CACHED\n",
- "\n",
- "#15 [app-account 4/5] RUN go mod tidy\n",
- "#15 CACHED\n",
- "\n",
- "#16 [app-account 3/5] COPY . .\n",
- "#16 CACHED\n",
- "\n",
- "#17 [app-account 5/5] RUN go get ./...\n",
- "#17 CACHED\n",
- "\n",
- "#18 [app-product 4/5] RUN go mod tidy\n",
- "#18 CACHED\n",
- "\n",
- "#19 [app-product 3/5] COPY . .\n",
- "#19 CACHED\n",
- "\n",
- "#20 [app-product 2/5] WORKDIR /workdir\n",
- "#20 CACHED\n",
- "\n",
- "#21 [app-product 5/5] RUN go get ./...\n",
- "#21 CACHED\n",
- "\n",
- "#22 [app-account] exporting to image\n",
- "#22 exporting layers done\n",
- "#22 writing image sha256:23693c2337d00330db716165ae09a8c97080033aa76d33c318293a1a01acaf4b done\n",
- "#22 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
- "#22 DONE 0.0s\n",
- "\n",
- "#23 [app-gateway] exporting to image\n",
- "#23 exporting layers done\n",
- "#23 writing image sha256:e66d5276983a37ad8787be5b8e07fde17e91fc51eeed2df59f48242b27af3aa0 done\n",
- "#23 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
- "#23 DONE 0.0s\n",
- "\n",
- "#24 [app-product] exporting to image\n",
- "#24 exporting layers done\n",
- "#24 writing image sha256:fb8ffb50290c2aac74588a683f37495cb9d359590280847497613806dbe94e61 done\n",
- "#24 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
- "#24 DONE 0.0s\n",
- "\n",
- "#25 [app-account] resolving provenance for metadata file\n",
- "#25 DONE 0.0s\n",
- "\n",
- "#26 [app-gateway] resolving provenance for metadata file\n",
- "#26 DONE 0.0s\n",
- "\n",
- "#27 [app-product] resolving provenance for metadata file\n",
- "#27 DONE 0.0s\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " Network autocode-worker-7_default Creating\n",
- " Network autocode-worker-7_default Created\n",
- " Container autocode-worker-7-app-product-1 Creating\n",
- " Container autocode-worker-7-app-account-1 Creating\n",
- " Container autocode-worker-7-app-gateway-1 Creating\n",
- " Container autocode-worker-7-app-gateway-1 Created\n",
- " Container autocode-worker-7-app-account-1 Created\n",
- " Container autocode-worker-7-app-product-1 Created\n",
- " Container autocode-worker-7-app-gateway-1 Starting\n",
- " Container autocode-worker-7-app-account-1 Starting\n",
- " Container autocode-worker-7-app-product-1 Starting\n",
- " Container autocode-worker-7-app-account-1 Started\n",
- " Container autocode-worker-7-app-gateway-1 Started\n",
- " Container autocode-worker-7-app-product-1 Started\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "#0 building with \"default\" instance using docker driver\n",
- "\n",
- "#1 [app-account internal] load build definition from .Dockerfile\n",
- "#1 transferring dockerfile: 119B 0.0s done\n",
- "#1 DONE 0.0s\n",
- "\n",
- "#2 [app-gateway internal] load build definition from .Dockerfile\n",
- "#2 transferring dockerfile: 119B 0.0s done\n",
- "#2 DONE 0.0s\n",
- "\n",
- "#3 [app-product internal] load build definition from .Dockerfile\n",
- "#3 transferring dockerfile: 119B 0.0s done\n",
- "#3 DONE 0.0s\n",
- "\n",
- "#4 [app-product internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 0.8s\n",
- "\n",
- "#5 [app-account internal] load .dockerignore\n",
- "#5 transferring context: 2B 0.0s done\n",
- "#5 DONE 0.0s\n",
- "\n",
- "#6 [app-product 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
- "#6 DONE 0.0s\n",
- "\n",
- "#7 [app-gateway internal] load .dockerignore\n",
- "#7 transferring context: 2B 0.0s done\n",
- "#7 DONE 0.0s\n",
- "\n",
- "#8 [app-product internal] load .dockerignore\n",
- "#8 transferring context: 2B 0.0s done\n",
- "#8 DONE 0.0s\n",
- "\n",
- "#9 [app-gateway internal] load build context\n",
- "#9 transferring context: 299B 0.0s done\n",
- "#9 DONE 0.0s\n",
- "\n",
- "#10 [app-account internal] load build context\n",
- "#10 transferring context: 335B 0.0s done\n",
- "#10 DONE 0.0s\n",
- "\n",
- "#11 [app-product internal] load build context\n",
- "#11 transferring context: 335B 0.0s done\n",
- "#11 DONE 0.0s\n",
- "\n",
- "#12 [app-gateway 3/5] COPY . .\n",
- "#12 CACHED\n",
- "\n",
- "#13 [app-gateway 4/5] RUN go mod tidy\n",
- "#13 CACHED\n",
- "\n",
- "#14 [app-gateway 5/5] RUN go get ./...\n",
- "#14 CACHED\n",
- "\n",
- "#15 [app-product 4/5] RUN go mod tidy\n",
- "#15 CACHED\n",
- "\n",
- "#16 [app-product 3/5] COPY . .\n",
- "#16 CACHED\n",
- "\n",
- "#17 [app-product 5/5] RUN go get ./...\n",
- "#17 CACHED\n",
- "\n",
- "#18 [app-account 3/5] COPY . .\n",
- "#18 CACHED\n",
- "\n",
- "#19 [app-account 2/5] WORKDIR /workdir\n",
- "#19 CACHED\n",
- "\n",
- "#20 [app-account 4/5] RUN go mod tidy\n",
- "#20 CACHED\n",
- "\n",
- "#21 [app-account 5/5] RUN go get ./...\n",
- "#21 CACHED\n",
- "\n",
- "#22 [app-gateway] exporting to image\n",
- "#22 exporting layers done\n",
- "#22 writing image sha256:29a1105a85c2a4da50cf2b7bd62fb9293a8f80de68ebe1274c7971bc522b97be done\n",
- "#22 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
- "#22 DONE 0.0s\n",
- "\n",
- "#23 [app-account] exporting to image\n",
- "#23 exporting layers done\n",
- "#23 writing image sha256:45d16b9017cd5e787e74b6f1b88e728eb4580077ce1052f7dd3fb0003b7454f9 done\n",
- "#23 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
- "#23 DONE 0.0s\n",
- "\n",
- "#24 [app-product] exporting to image\n",
- "#24 exporting layers done\n",
- "#24 writing image sha256:6e76293cb7f236c981cf3f930dc83c8a07c4497afc48d7a28ae08fc2e742b88c done\n",
- "#24 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
- "#24 DONE 0.0s\n",
- "\n",
- "#25 [app-gateway] resolving provenance for metadata file\n",
- "#25 DONE 0.0s\n",
- "\n",
- "#26 [app-account] resolving provenance for metadata file\n",
- "#26 DONE 0.0s\n",
- "\n",
- "#27 [app-product] resolving provenance for metadata file\n",
- "#27 DONE 0.0s\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " Network autocode-worker-8_default Creating\n",
- " Network autocode-worker-8_default Created\n",
- " Container autocode-worker-8-app-gateway-1 Creating\n",
- " Container autocode-worker-8-app-account-1 Creating\n",
- " Container autocode-worker-8-app-product-1 Creating\n",
- " Container autocode-worker-8-app-account-1 Created\n",
- " Container autocode-worker-8-app-gateway-1 Created\n",
- " Container autocode-worker-8-app-product-1 Created\n",
- " Container autocode-worker-8-app-gateway-1 Starting\n",
- " Container autocode-worker-8-app-account-1 Starting\n",
- " Container autocode-worker-8-app-product-1 Starting\n",
- " Container autocode-worker-8-app-gateway-1 Started\n",
- " Container autocode-worker-8-app-product-1 Started\n",
- " Container autocode-worker-8-app-account-1 Started\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "#0 building with \"default\" instance using docker driver\n",
- "\n",
- "#1 [app-product internal] load build definition from .Dockerfile\n",
- "#1 transferring dockerfile: 119B 0.0s done\n",
- "#1 DONE 0.0s\n",
- "\n",
- "#2 [app-account internal] load build definition from .Dockerfile\n",
- "#2 transferring dockerfile: 119B 0.0s done\n",
- "#2 DONE 0.0s\n",
- "\n",
- "#3 [app-gateway internal] load build definition from .Dockerfile\n",
- "#3 transferring dockerfile: 119B 0.0s done\n",
- "#3 DONE 0.0s\n",
- "\n",
- "#4 [app-gateway internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 0.8s\n",
- "\n",
- "#5 [app-gateway internal] load .dockerignore\n",
- "#5 transferring context: 2B 0.0s done\n",
- "#5 DONE 0.0s\n",
- "\n",
- "#6 [app-product internal] load .dockerignore\n",
- "#6 transferring context: 2B 0.0s done\n",
- "#6 DONE 0.0s\n",
- "\n",
- "#7 [app-account 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
- "#7 DONE 0.0s\n",
- "\n",
- "#8 [app-account internal] load .dockerignore\n",
- "#8 transferring context: 2B 0.0s done\n",
- "#8 DONE 0.0s\n",
- "\n",
- "#9 [app-gateway internal] load build context\n",
- "#9 transferring context: 299B 0.0s done\n",
- "#9 DONE 0.0s\n",
- "\n",
- "#10 [app-gateway 3/5] COPY . .\n",
- "#10 CACHED\n",
- "\n",
- "#11 [app-gateway 4/5] RUN go mod tidy\n",
- "#11 CACHED\n",
- "\n",
- "#12 [app-gateway 5/5] RUN go get ./...\n",
- "#12 CACHED\n",
- "\n",
- "#13 [app-product internal] load build context\n",
- "#13 transferring context: 335B 0.0s done\n",
- "#13 DONE 0.0s\n",
- "\n",
- "#14 [app-account internal] load build context\n",
- "#14 transferring context: 335B 0.0s done\n",
- "#14 DONE 0.0s\n",
- "\n",
- "#15 [app-product 4/5] RUN go mod tidy\n",
- "#15 CACHED\n",
- "\n",
- "#16 [app-product 3/5] COPY . .\n",
- "#16 CACHED\n",
- "\n",
- "#17 [app-gateway] exporting to image\n",
- "#17 exporting layers done\n",
- "#17 writing image sha256:11581c16d5b3accbf3b24f79eb6efd26971a0739b8328853a93dda40a2abf310 done\n",
- "#17 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
- "#17 DONE 0.0s\n",
- "\n",
- "#18 [app-account 4/5] RUN go mod tidy\n",
- "#18 CACHED\n",
- "\n",
- "#19 [app-account 2/5] WORKDIR /workdir\n",
- "#19 CACHED\n",
- "\n",
- "#20 [app-account 3/5] COPY . .\n",
- "#20 CACHED\n",
- "\n",
- "#21 [app-product 5/5] RUN go get ./...\n",
- "#21 CACHED\n",
- "\n",
- "#22 [app-account 5/5] RUN go get ./...\n",
- "#22 CACHED\n",
- "\n",
- "#23 [app-product] exporting to image\n",
- "#23 exporting layers done\n",
- "#23 writing image sha256:c86a3ad287055ff9060395f320c87930f9b0c851975c16fe711bfe75a07e6eb0 done\n",
- "#23 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
- "#23 DONE 0.0s\n",
- "\n",
- "#24 [app-account] exporting to image\n",
- "#24 exporting layers done\n",
- "#24 writing image sha256:f76a119d1ceab6de8561205fe0ea5a9cdf139016fde1c404a35f161fec40da3c done\n",
- "#24 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
- "#24 DONE 0.0s\n",
- "\n",
- "#25 [app-gateway] resolving provenance for metadata file\n",
- "#25 DONE 0.0s\n",
- "\n",
- "#26 [app-product] resolving provenance for metadata file\n",
- "#26 DONE 0.0s\n",
- "\n",
- "#27 [app-account] resolving provenance for metadata file\n",
- "#27 DONE 0.0s\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " Network autocode-worker-9_default Creating\n",
- " Network autocode-worker-9_default Created\n",
- " Container autocode-worker-9-app-account-1 Creating\n",
- " Container autocode-worker-9-app-product-1 Creating\n",
- " Container autocode-worker-9-app-gateway-1 Creating\n",
- " Container autocode-worker-9-app-gateway-1 Created\n",
- " Container autocode-worker-9-app-account-1 Created\n",
- " Container autocode-worker-9-app-product-1 Created\n",
- " Container autocode-worker-9-app-gateway-1 Starting\n",
- " Container autocode-worker-9-app-product-1 Starting\n",
- " Container autocode-worker-9-app-account-1 Starting\n",
- " Container autocode-worker-9-app-product-1 Started\n",
- " Container autocode-worker-9-app-account-1 Started\n",
- " Container autocode-worker-9-app-gateway-1 Started\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "#0 building with \"default\" instance using docker driver\n",
- "\n",
- "#1 [app-gateway internal] load build definition from .Dockerfile\n",
- "#1 transferring dockerfile: 119B 0.0s done\n",
- "#1 DONE 0.0s\n",
- "\n",
- "#2 [app-product internal] load build definition from .Dockerfile\n",
- "#2 transferring dockerfile: 119B 0.0s done\n",
- "#2 DONE 0.0s\n",
- "\n",
- "#3 [app-account internal] load build definition from .Dockerfile\n",
- "#3 transferring dockerfile: 119B 0.0s done\n",
- "#3 DONE 0.0s\n",
- "\n",
- "#4 [app-account internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 0.8s\n",
- "\n",
- "#5 [app-gateway internal] load .dockerignore\n",
- "#5 transferring context: 2B 0.0s done\n",
- "#5 DONE 0.0s\n",
- "\n",
- "#6 [app-account 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
- "#6 DONE 0.0s\n",
- "\n",
- "#7 [app-product internal] load .dockerignore\n",
- "#7 transferring context: 2B 0.0s done\n",
- "#7 DONE 0.0s\n",
- "\n",
- "#8 [app-account internal] load .dockerignore\n",
- "#8 transferring context: 2B done\n",
- "#8 DONE 0.0s\n",
- "\n",
- "#9 [app-gateway internal] load build context\n",
- "#9 transferring context: 299B 0.0s done\n",
- "#9 DONE 0.0s\n",
- "\n",
- "#10 [app-product internal] load build context\n",
- "#10 transferring context: 335B 0.0s done\n",
- "#10 DONE 0.0s\n",
- "\n",
- "#11 [app-gateway 3/5] COPY . .\n",
- "#11 CACHED\n",
- "\n",
- "#12 [app-gateway 4/5] RUN go mod tidy\n",
- "#12 CACHED\n",
- "\n",
- "#13 [app-account internal] load build context\n",
- "#13 transferring context: 335B 0.0s done\n",
- "#13 DONE 0.0s\n",
- "\n",
- "#14 [app-gateway 5/5] RUN go get ./...\n",
- "#14 CACHED\n",
- "\n",
- "#15 [app-product 4/5] RUN go mod tidy\n",
- "#15 CACHED\n",
- "\n",
- "#16 [app-product 3/5] COPY . .\n",
- "#16 CACHED\n",
- "\n",
- "#17 [app-product 5/5] RUN go get ./...\n",
- "#17 CACHED\n",
- "\n",
- "#18 [app-account 4/5] RUN go mod tidy\n",
- "#18 CACHED\n",
- "\n",
- "#19 [app-account 3/5] COPY . .\n",
- "#19 CACHED\n",
- "\n",
- "#20 [app-account 2/5] WORKDIR /workdir\n",
- "#20 CACHED\n",
- "\n",
- "#21 [app-account 5/5] RUN go get ./...\n",
- "#21 CACHED\n",
- "\n",
- "#22 [app-gateway] exporting to image\n",
- "#22 exporting layers done\n",
- "#22 writing image sha256:ce89624b67a9378bad97f942eff6282bc65686658f9a6ba3442b5dae2f2e3759 done\n",
- "#22 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
- "#22 DONE 0.0s\n",
- "\n",
- "#23 [app-product] exporting to image\n",
- "#23 exporting layers done\n",
- "#23 writing image sha256:538f748bc94f352d54cf624dab91c301fdc4121fdcb6ea7603570b962377e864 done\n",
- "#23 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
- "#23 DONE 0.0s\n",
- "\n",
- "#24 [app-account] exporting to image\n",
- "#24 exporting layers done\n",
- "#24 writing image sha256:73023280a1a34941f6d30ae9edad6469272e3beb6a43d5f747fe86d59665b327 done\n",
- "#24 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
- "#24 DONE 0.0s\n",
- "\n",
- "#25 [app-product] resolving provenance for metadata file\n",
- "#25 DONE 0.0s\n",
- "\n",
- "#26 [app-gateway] resolving provenance for metadata file\n",
- "#26 DONE 0.0s\n",
- "\n",
- "#27 [app-account] resolving provenance for metadata file\n",
- "#27 DONE 0.0s\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " Network autocode-worker-10_default Creating\n",
- " Network autocode-worker-10_default Created\n",
- " Container autocode-worker-10-app-product-1 Creating\n",
- " Container autocode-worker-10-app-account-1 Creating\n",
- " Container autocode-worker-10-app-gateway-1 Creating\n",
- " Container autocode-worker-10-app-gateway-1 Created\n",
- " Container autocode-worker-10-app-account-1 Created\n",
- " Container autocode-worker-10-app-product-1 Created\n",
- " Container autocode-worker-10-app-account-1 Starting\n",
- " Container autocode-worker-10-app-gateway-1 Starting\n",
- " Container autocode-worker-10-app-product-1 Starting\n",
- " Container autocode-worker-10-app-account-1 Started\n",
- " Container autocode-worker-10-app-product-1 Started\n",
- " Container autocode-worker-10-app-gateway-1 Started\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "#0 building with \"default\" instance using docker driver\n",
- "\n",
- "#1 [app-product internal] load build definition from .Dockerfile\n",
- "#1 transferring dockerfile: 119B 0.0s done\n",
- "#1 DONE 0.0s\n",
- "\n",
- "#2 [app-account internal] load build definition from .Dockerfile\n",
- "#2 transferring dockerfile: 119B 0.0s done\n",
- "#2 DONE 0.0s\n",
- "\n",
- "#3 [app-gateway internal] load build definition from .Dockerfile\n",
- "#3 transferring dockerfile: 119B 0.0s done\n",
- "#3 DONE 0.0s\n",
- "\n",
- "#4 [app-gateway internal] load metadata for docker.io/library/golang:latest\n",
- "#4 DONE 0.7s\n",
- "\n",
- "#5 [app-gateway internal] load .dockerignore\n",
- "#5 transferring context: 2B 0.0s done\n",
- "#5 DONE 0.0s\n",
- "\n",
- "#6 [app-product 1/5] FROM docker.io/library/golang:latest@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf\n",
- "#6 DONE 0.0s\n",
- "\n",
- "#7 [app-account internal] load .dockerignore\n",
- "#7 transferring context: 2B 0.0s done\n",
- "#7 DONE 0.0s\n",
- "\n",
- "#8 [app-product internal] load .dockerignore\n",
- "#8 transferring context: 2B 0.0s done\n",
- "#8 DONE 0.0s\n",
- "\n",
- "#9 [app-gateway internal] load build context\n",
- "#9 transferring context: 299B 0.0s done\n",
- "#9 DONE 0.0s\n",
- "\n",
- "#10 [app-account internal] load build context\n",
- "#10 transferring context: 335B 0.0s done\n",
- "#10 DONE 0.0s\n",
- "\n",
- "#11 [app-product internal] load build context\n",
- "#11 transferring context: 335B 0.0s done\n",
- "#11 DONE 0.0s\n",
- "\n",
- "#12 [app-gateway 3/5] COPY . .\n",
- "#12 CACHED\n",
- "\n",
- "#13 [app-gateway 4/5] RUN go mod tidy\n",
- "#13 CACHED\n",
- "\n",
- "#14 [app-gateway 5/5] RUN go get ./...\n",
- "#14 CACHED\n",
- "\n",
- "#15 [app-account 3/5] COPY . .\n",
- "#15 CACHED\n",
- "\n",
- "#16 [app-account 4/5] RUN go mod tidy\n",
- "#16 CACHED\n",
- "\n",
- "#17 [app-account 5/5] RUN go get ./...\n",
- "#17 CACHED\n",
- "\n",
- "#18 [app-product 3/5] COPY . .\n",
- "#18 CACHED\n",
- "\n",
- "#19 [app-account 2/5] WORKDIR /workdir\n",
- "#19 CACHED\n",
- "\n",
- "#20 [app-product 4/5] RUN go mod tidy\n",
- "#20 CACHED\n",
- "\n",
- "#21 [app-product 5/5] RUN go get ./...\n",
- "#21 CACHED\n",
- "\n",
- "#22 [app-gateway] exporting to image\n",
- "#22 exporting layers done\n",
- "#22 writing image sha256:5deb36b1f2f6b1d30a7d8d15b029e7c3461b8232128bb011e00c1f505bf57b28 done\n",
- "#22 naming to docker.io/muazhari/autocode-example-app-gateway:latest done\n",
- "#22 DONE 0.0s\n",
- "\n",
- "#23 [app-account] exporting to image\n",
- "#23 exporting layers done\n",
- "#23 writing image sha256:21ff29ce88ff822369aa138cb99a3c0fa934289535fa5e6dc48ae5842609cdac done\n",
- "#23 naming to docker.io/muazhari/autocode-example-app-account:latest done\n",
- "#23 DONE 0.0s\n",
- "\n",
- "#24 [app-product] exporting to image\n",
- "#24 exporting layers done\n",
- "#24 writing image sha256:5cafc1bc1c5f087ea138b9d6a3f798a36f2c5c8aabef99291605b0503d2d8b78 done\n",
- "#24 naming to docker.io/muazhari/autocode-example-app-product:latest done\n",
- "#24 DONE 0.0s\n",
- "\n",
- "#25 [app-gateway] resolving provenance for metadata file\n",
- "#25 DONE 0.0s\n",
- "\n",
- "#26 [app-account] resolving provenance for metadata file\n",
- "#26 DONE 0.0s\n",
- "\n",
- "#27 [app-product] resolving provenance for metadata file\n",
- "#27 DONE 0.0s\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " Network autocode-worker-11_default Creating\n",
- " Network autocode-worker-11_default Created\n",
- " Container autocode-worker-11-app-gateway-1 Creating\n",
- " Container autocode-worker-11-app-account-1 Creating\n",
- " Container autocode-worker-11-app-product-1 Creating\n",
- " Container autocode-worker-11-app-gateway-1 Created\n",
- " Container autocode-worker-11-app-product-1 Created\n",
- " Container autocode-worker-11-app-account-1 Created\n",
- " Container autocode-worker-11-app-account-1 Starting\n",
- " Container autocode-worker-11-app-product-1 Starting\n",
- " Container autocode-worker-11-app-gateway-1 Starting\n",
- " Container autocode-worker-11-app-gateway-1 Started\n",
- " Container autocode-worker-11-app-account-1 Started\n",
- " Container autocode-worker-11-app-product-1 Started\n"
+ " Container autocode-worker-1-app-account-1 Started\n"
]
}
],
- "execution_count": 3
+ "execution_count": 21
},
{
"metadata": {
"ExecuteTime": {
- "end_time": "2024-08-06T13:20:52.765726Z",
- "start_time": "2024-08-06T13:20:52.666906Z"
+ "end_time": "2024-08-07T14:20:15.227546Z",
+ "start_time": "2024-08-07T14:20:15.223748Z"
}
},
"cell_type": "code",
@@ -1669,7 +490,7 @@
],
"id": "5daf173cc5c82482",
"outputs": [],
- "execution_count": 4
+ "execution_count": 16
},
{
"metadata": {
diff --git a/example/controller.py b/example/controller.py
index 8c8174a..afed8bf 100644
--- a/example/controller.py
+++ b/example/controller.py
@@ -1,11 +1,9 @@
-import dotenv
import uvicorn
from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from autocode import OptimizationUseCase, ApplicationContainer, ApplicationSetting
-dotenv.load_dotenv(dotenv.find_dotenv())
application_container: ApplicationContainer = ApplicationContainer()
application_setting: ApplicationSetting = application_container.settings.application()
application_setting.num_cpus = 2
diff --git a/example/controller2.py b/example/controller2.py
index f6789a8..71e3a3e 100644
--- a/example/controller2.py
+++ b/example/controller2.py
@@ -1,8 +1,5 @@
-import dotenv
-
from autocode import OptimizationUseCase, ApplicationContainer, ApplicationSetting
-dotenv.load_dotenv(dotenv.find_dotenv())
application_container: ApplicationContainer = ApplicationContainer()
application_setting: ApplicationSetting = application_container.settings.application()
application_setting.num_cpus = 2
@@ -20,6 +17,7 @@
OptimizationObjective(
type="minimize",
),
+
OptimizationObjective(
type="maximize",
),
@@ -39,9 +37,6 @@
type="maximize",
),
- OptimizationObjective(
- type="minimize",
- ),
OptimizationObjective(
type="maximize",
),
@@ -64,8 +59,19 @@
def evaluator(inputs: List[OptimizationEvaluateRunResponse]) -> Dict[str, Any]:
+ f_gateway: List[float] = []
+ f_account: List[float] = []
+ f_product: List[float] = []
+ for input in inputs:
+ if "gateway" in input.get_client().name:
+ f_gateway = input.objectives
+ elif "account" in input.get_client().name:
+ f_account = input.objectives
+ elif "product" in input.get_client().name:
+ f_product = input.objectives
+
output: Dict[str, Any] = {
- "F": inputs[0].objectives + inputs[1].objectives,
+ "F": f_gateway + f_account + f_product
}
return output
diff --git a/example/requirements.txt b/example/requirements.txt
index 2dc3e05..059762d 100644
--- a/example/requirements.txt
+++ b/example/requirements.txt
@@ -12,5 +12,5 @@ numpy<2
python-on-whales
uvicorn
langchain
-langchain-openai
+langchain-openai>=0.1.21rc1
langgraph
\ No newline at end of file
diff --git a/setup.py b/setup.py
index b78dc69..5fe27e5 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@
setup(
name='autocode-py',
- version='0.0.1.post6',
+ version='0.0.1.post8',
author='muazhari',
url='https://github.com/muazhari/autocode',
description='autocode: Auto Code Improvement by Metrics Optimization.',
@@ -38,7 +38,7 @@
'python-on-whales',
'uvicorn',
'langchain',
- 'langchain-openai',
+ 'langchain-openai>=0.1.21rc1',
'langgraph',
],
)