Skip to content

Commit

Permalink
Waiving
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Stepanov <astepano@redhat.com>
  • Loading branch information
Andrei-Stepanov committed Mar 19, 2024
1 parent dfcb6fc commit 214dbbf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/actions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,17 @@ export const submitWaiver = (reason: string, client: ApolloClient<object>) => {
let waiveError: string;
const { artifact, ciTest } = getState().waive;
const testcaseName = ciTest?.name;
if (_.isNil(_.get(artifact, 'payload.nvr')) || _.isNil(testcaseName)) {
return;
}
// NOTE: We know that artifact.payload is not null thanks to the check at the
// top of the function. Moreover, we know that payload has the nvr property,
// so we assert the type of the payload here.
const nvr = getANvr(artifact!);
if (_.isNil(nvr) || _.isNil(testcaseName)) {
const waiveError = `Cannot submit waiver for: ${nvr}, ${testcaseName}`;
dispatch(
waiveSlice.submitWaiver({ waiveError, reason: 'bad call' }),
);
return;
}
if (!nvr) {
waiveError = 'Could not get NVR, please contact support.';
dispatch(waiveSlice.submitWaiver({ waiveError, reason: '' }));
Expand Down
2 changes: 1 addition & 1 deletion src/components/WaiveForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const WaiveForm: React.FC<{}> = () => {
const agreementLabel = 'I agree and acknowledge the above information';

const metadataAggrementText = waiver.ciTest?.waiveMessage;
const agreementText = `Waiving test results may have an impact on the RHEL release process. Broken builds can lead to broken RHEL
const agreementText = `You should have active kerberos session. Waiving test results may have an impact on the RHEL release process. Broken builds can lead to broken RHEL
composes and unverified or failed builds can cause issues in system integration. Before waiving these tests it is good to check
other possible options, in particular some CI-systems can fail due to outages and different circumstances. It is good to restart
the test or to contact CI-owners for assistance. Proceed waiving test-result only when other efforts have not succeeded.`;
Expand Down
3 changes: 3 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,9 @@ export const getANvr = (artifact: Artifact): string | undefined => {
if (isArtifactRpm(artifact)) {
return _.get(artifact, 'hit_source.nvr');
}
if (isArtifactMbs(artifact)) {
return _.get(artifact, 'hit_source.nvr');
}
};

export const getATaskid = (artifact: Artifact): string | undefined => {
Expand Down

0 comments on commit 214dbbf

Please sign in to comment.