Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file publishing should report errors #10

Open
jclulow opened this issue Nov 8, 2022 · 0 comments
Open

file publishing should report errors #10

jclulow opened this issue Nov 8, 2022 · 0 comments

Comments

@jclulow
Copy link
Collaborator

jclulow commented Nov 8, 2022

At present, if you add a [[publish]] directive to the TOML, but something about it was wrong, we not only do not fail the job but we don't even report the problem. This happens in wollogong, in the basic variety code:

            /*
             * Resolve any publishing directives.  For now, we do not handle
             * publish rules that did not match any output from the actual job.
             * We also do not yet correctly handle a failure to publish, which
             * will require more nuance in reported errors from Dropshot and
             * Progenitor.  This feature is broadly still experimental.
             */
            for p in c.publish.iter() {
                if let Some(o) =
                    outputs.iter().find(|o| o.path == p.from_output)
                {
                    b.job_output_publish(
                        jid,
                        &o.id,
                        &buildomat_openapi::types::JobOutputPublish {
                            series: p.series.to_string(),
                            version: cs.head_sha.to_string(),
                            name: p.name.to_string(),
                        },
                    )
                    .await
                    .ok();
                }
            }

/*
* Resolve any publishing directives. For now, we do not handle
* publish rules that did not match any output from the actual job.
* We also do not yet correctly handle a failure to publish, which
* will require more nuance in reported errors from Dropshot and
* Progenitor. This feature is broadly still experimental.
*/
for p in c.publish.iter() {
if let Some(o) =
outputs.iter().find(|o| o.path == p.from_output)
{
b.job_output_publish(
jid,
&o.id,
&buildomat_openapi::types::JobOutputPublish {
series: p.series.to_string(),
version: cs.head_sha.to_string(),
name: p.name.to_string(),
},
)
.await
.ok();
}
}

It is probably time to consider this less experimental:

  • publish directives for files not produced as output artefacts should be reported and fail the job
  • publish failures for otherwise present output artefacts should be also be reported and fail the job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant